Carna
Version 3.3.2
|
Gathers renderable geometry nodes from scene graph and provides those in a particular order, if required. More...
#include <RenderQueue.h>
Public Member Functions | |
RenderQueue (unsigned int geometryType, unsigned int geometryTypeMask=EXACT_MATCH_GEOMETRY_TYPE_MASK) | |
Creates new instance that enqueues Geometry scene graph nodes if their geometry type AND-linked with geometryTypeMask equals the geometryType of this RenderQueue instance. | |
void | build (const Node &root, const math::Matrix4f &viewTransform) |
Rebuilds this queue by gathering matching geometry nodes from children of root recursively. The argument viewTransform is required for the computation of the model-view matrix. | |
void | rewind () |
Rewinds this queue. This is an \(\mathcal O\left(1\right)\) operation in contrast to build, so prefer it whenever possible. You might also need to updateModelViewTransforms if you use this. | |
void | updateModelViewTransforms (const math::Matrix4f &viewTransform) |
Recomputes the model-view transforms of all enqueued renderables. This only is neccessary in certain cases when you have rewinded this queue previously. Also recomputes the elements order of this queue if necessary. | |
bool | isEmpty () const |
Tells whether this queue has reached it's end. | |
const Renderable & | poll () |
References the next element of the queue and moves ahead. The referenced object stays alive until the queue is deleted or rebuilt. More... | |
const Renderable & | first () const |
References the next element of the queue, but does not move ahead. The referenced object stays alive until the queue is deleted or rebuilt. More... | |
const Renderable & | last () const |
References the last element of the queue. The referenced object stays alive until the queue is deleted or rebuilt. More... | |
Public Attributes | |
const unsigned int | geometryType |
Holds the geometry type that this queue uses for matching geometry nodes. | |
const unsigned int | geometryTypeMask |
Holds the mask that this queue uses for matching geometry nodes. | |
Static Public Attributes | |
static const unsigned int | EXACT_MATCH_GEOMETRY_TYPE_MASK = std::numeric_limits< unsigned int >::max() |
Holds the mask that makes this queue only accept such geometry nodes whose geometry type matches the geometry type of this queue exactly. | |
Gathers renderable geometry nodes from scene graph and provides those in a particular order, if required.
RenderableCompare | Binary function that establishes partial order on Renderable objects. Typical choices are Renderable::BackToFront, Renderable::FrontToBack or Renderable::VideoResourcesOrder. Use void if no particular order is required. |
The geometry nodes are only enqueued if their geometry type matches. The matching is done as follows. First a bit-wise AND operation is applied to the node's geometry type and the mask of this RenderQueue
instance. Than the result from this operation is compared to the geometryType of this instance. Only if they match, the Geometry
node is enqueued.
Definition at line 63 of file RenderQueue.h.
const Renderable & Carna::base::RenderQueue< RenderableCompare >::first | ( | ) | const |
References the next element of the queue, but does not move ahead. The referenced object stays alive until the queue is deleted or rebuilt.
isEmpty() == false
Definition at line 250 of file RenderQueue.h.
const Renderable & Carna::base::RenderQueue< RenderableCompare >::last | ( | ) | const |
References the last element of the queue. The referenced object stays alive until the queue is deleted or rebuilt.
isEmpty() == false
Definition at line 258 of file RenderQueue.h.
const Renderable & Carna::base::RenderQueue< RenderableCompare >::poll | ( | ) |
References the next element of the queue and moves ahead. The referenced object stays alive until the queue is deleted or rebuilt.
isEmpty() == false
Definition at line 242 of file RenderQueue.h.
Documentation generated by Doxygen