8 #ifndef META_OCEAN_RENDERING_GLES_TRAVERSER_H
9 #define META_OCEAN_RENDERING_GLES_TRAVERSER_H
30 namespace GLESceneGraph
174 renderable_(renderable),
175 attributeSet_(attributeSet),
176 camera_T_renderable_(camera_T_renderable),
177 normalMatrix_(normalMatrix),
186 ocean_assert(renderable_ && attributeSet_);
188 renderable_->render(framebuffer, projection, camera_T_renderable_, camera_T_world, normalMatrix_, *attributeSet_, lights_);
194 ocean_assert(renderable_);
196 renderable_->render(projection, camera_T_renderable_, camera_T_world, normalMatrix_, shaderProgram);
VectorT3< T > translation() const
Returns the translation of the transformation.
Definition: HomogenousMatrix4.h:1381
This class is the base class for all rendering engines like.
Definition: Engine.h:46
This class implements a base for all GLESceneGraph framebuffers.
Definition: rendering/glescenegraph/GLESFramebuffer.h:34
This class implements a container for an OpenGL ES shader program.
Definition: GLESShaderProgram.h:53
This class stores the data which is necessary to render one renderable.
Definition: GLESTraverser.h:46
HomogenousMatrix4 camera_T_renderable_
The transformation between the renderable and the camera.
Definition: GLESTraverser.h:98
void render(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projection, const HomogenousMatrix4 &camera_T_world) const
Renders all elements which have been gathered.
Definition: GLESTraverser.h:183
const SmartObjectRef< GLESRenderable > & renderable() const
Returns the renderable of this traverser object.
Definition: GLESTraverser.h:199
static bool compareDistance(const TraverserObject &left, const TraverserObject &right)
Returns whether the distance of the left object is closer to the camera than the right object.
Definition: GLESTraverser.h:204
Lights lights_
The lights used the render this renderable.
Definition: GLESTraverser.h:104
TraverserObject(const RenderableRef &renderable, const AttributeSetRef &attributeSet, const HomogenousMatrix4 &camera_T_renderable, const SquareMatrix3 &normalMatrix, const Lights &lights)
Creates a new traverser object.
Definition: GLESTraverser.h:173
SmartObjectRef< GLESAttributeSet > attributeSet_
The attribute set which is connected with the renderable.
Definition: GLESTraverser.h:95
SquareMatrix3 normalMatrix_
The normal transformation matrix with is the transposed inverse of the upper 3x3 model view matrix.
Definition: GLESTraverser.h:101
SmartObjectRef< GLESRenderable > renderable_
The renderable object.
Definition: GLESTraverser.h:92
This class implements a traverser for renderables.
Definition: GLESTraverser.h:39
TraverserObjects depthTraverserObjects_
The renderable object with depth attribute.
Definition: GLESTraverser.h:161
void render(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projection, const HomogenousMatrix4 &camera_T_world)
Renders all gathered elements.
std::vector< TraverserObject > TraverserObjects
Definition of a vector holding traverser objects.
Definition: GLESTraverser.h:110
void clear()
Removes all gathered renderables from this traverser.
void addRenderable(const RenderableRef &renderable, const AttributeSetRef &attributeSet, const HomogenousMatrix4 &camera_T_renderable, const SquareMatrix3 &normalMatrix, const Lights &lights)
Adds a new renderable to this traverser.
TraverserObjects blendTraverserObjects_
The renderable object with blend attribute.
Definition: GLESTraverser.h:167
TraverserObjects defaultTraverserObjects_
The renderable object with depth and blend attributes.
Definition: GLESTraverser.h:164
GLESTraverser()=default
Creates a traverser object.
GLESShaderProgramRef shaderProgramColorId_
The shader able to render objects with individual color ids.
Definition: GLESTraverser.h:170
RenderableRef renderableFromColorId(const uint32_t colorId) const
Lookups the renderable which has been rendered with a given color id.
void renderColorIds(const Engine &engine, const SquareMatrix4 &projection, const HomogenousMatrix4 &camera_T_world)
Renders all gathered elements with an individual color id.
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
bool isSingular() const
Returns whether this matrix is singular (and thus cannot be inverted).
Definition: SquareMatrix4.h:1040
T sqr() const
Returns the square of the vector length.
Definition: Vector3.h:670
std::vector< LightPair > Lights
Definition of a set holding light sources.
Definition: GLESLightSource.h:44
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15