Workspace 6.21.5
|
Responsible for creating an ordered queue of WSGLRenderItem for use by the WSGLRenderer. More...
#include <Rendering/OpenGL/wsglrenderqueuebuilder.h>
Signals | |
void | glDataUpdateFinished () |
void | glDataUpdateStarted () |
Protected Member Functions | |
bool | postVisits (Scene &scene) override |
bool | preVisits (Scene &scene) override |
bool | visitImpl (Annotation &annotation) override |
bool | visitImpl (Camera &camera) override |
bool | visitImpl (ClipRegion &clipRegion) override |
bool | visitImpl (Light &light) override |
bool | visitImpl (MeshModelInstance &modelInstance) override |
bool | visitImpl (SceneItemInstance &sceneItemInstance) override |
bool | visitImpl (Transform &transform) override |
Protected Member Functions inherited from SceneProcessor | |
SceneProcessor () | |
SceneProcessor (const SceneProcessor &p) | |
SceneProcessor & | operator= (const SceneProcessor &p) |
virtual bool | postVisits (Scene &scene) |
virtual bool | preVisits (Scene &scene) |
virtual bool | traverseScene (Scene &scene) |
virtual bool | visitImpl (Annotation &annotation) |
virtual bool | visitImpl (Camera &camera) |
virtual bool | visitImpl (ClipRegion &clipRegion) |
virtual bool | visitImpl (Light &light) |
virtual bool | visitImpl (MeshModelInstance &modelInstance) |
virtual bool | visitImpl (SceneItemInstance &sceneItemInstance) |
virtual bool | visitImpl (Transform &transform) |
Protected Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Additional Inherited Members | |
Static Public Attributes inherited from SceneProcessor | |
static const Application::LogManager::MessageCategory | LOG_SCENEPROCESSOR |
The WSGLRenderQueueBuilder will populate a WSGLRenderQueue when its process function is called. The queue can be obtained by calling getRenderQueue. The ordering of items in the queue is handled internally by the render queue in order to minimise the number of OpenGL state changes required when rendering the scene. The items are ordered by each of the following fields in descending priority:
WSGLRenderQueueBuilder | ( | WSGLModelProcessor & | processor, |
WSGLSceneItemSymbolLibrary & | symbolLibrary | ||
) |
processor | The WSGLModelProcessor that will be used to generate OpenGL primitive data and determine the details of WSGLRenderItems. |
symbolLibrary | The library that contains MeshModel symbol data for SceneItems that do not have geometry data associated with them. |
Constructs a new WSGLRenderQueueBuilder. The builder depends upon a WSGLModelProcessor to generate its OpenGL data, and will attach the WSGLTextureBinder to any WSGLRenderItems that it generates. The provided WSGLSceneItemSymbolLibrary will be used to retrieve MeshModel 'symbols' for SceneItems which do not have associated geometry.
|
override |
void clearManipulators | ( | ) |
const WSGLAnnotationList & getAllAnnotations | ( | ) | const |
const LightList & getAllLights | ( | ) | const |
int getNumLayers | ( | ) | const |
int getNumModelsAwaitingSourceUpdate | ( | ) | const |
bool getProcessSymbols | ( | ) | const |
WSGLRenderQueue & getRenderQueue | ( | ) |
const WSGLRenderQueue & getRenderQueue | ( | ) | const |
const Mesh::BoundingBoxMinimal & getSceneBoundingBox | ( | ) | const |
bool getShowCameraFrustums | ( | ) | const |
|
signal |
|
signal |
bool modelSourceUpdateRequested | ( | ) | const |
bool modelsQueuedForProcessing | ( | ) | const |
bool nonSsaoItemsProcessed | ( | ) | const |
|
overrideprotectedvirtual |
scene | The scene that has just been processed. |
PostVisits is invoked by process immediately after processing of the scene is complete. This allows the render queue builder to perform any post-processing it requires.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
scene | The scene that is about to be processed. |
PreVisits is invoked by process immediately before doing any processing of the scene. It allows the render queue builder to do any pre-processing steps.
Reimplemented from SceneProcessor.
void setCameraFrustumSymbolsSelectable | ( | bool | b | ) |
b | Whether or not camera frustums are selectable. |
void setCurrentCamera | ( | const Camera & | camera | ) |
camera | The camera to be used by the renderQueue as the view camera. |
Sets the current camera through which the scene is being viewed. The camera will be used by the render queue builder to test whether or not to bother adding an item to the render queue. If it's not in view of the camera, the item won't be added.
void setCurrentProjectionMatrix | ( | const Mesh::TransformMatrix & | matrix | ) |
matrix | The projection matrix that is in use during the course of the 'process' call. |
void setCurrentViewMatrix | ( | const Mesh::TransformMatrix & | matrix, |
const Mesh::TransformMatrix & | invMatrix | ||
) |
matrix | The view matrix that is in use during the course of the 'process' call. |
invMatrix | The inverse of matrix. Passed in to avoid calculating it repeatedly. |
void setCurrentViewportDimensions | ( | int | width, |
int | height | ||
) |
width | The width of the viewport for the duration of the current frame. |
height | The height of the viewport for the duration of the current frame. |
void setManipulators | ( | const PickedItem & | item, |
const QMap< QString, TransformManipulator * > & | manipulators | ||
) |
item | |
manipulators |
void setProcessSymbols | ( | bool | b | ) |
b | Enable processing of symbols when processing the queue. |
Symbols are representations of items in a scene that do not have any geometry associated with them (e.g. lights, cameras, clip objects). Users may want to display them, or hide them.
void setShowCameraFrustums | ( | bool | b | ) |
b | Whether or not to show camera frustums. |
void setSymbolSize | ( | double | size | ) |
size | The size of symbols. Units are depending on the selected symbol size coordinate system. |
void setSymbolSizeCoordinateSystem | ( | RenderSettings::SymbolSizeCoordinateSystem | coordSys | ) |
coordSys | The coordinate system that the symbol size represents. |
bool specularItemsProcessed | ( | ) | const |
bool transparentItemsProcessed | ( | ) | const |
|
overrideprotectedvirtual |
annotation | The specific Annotation being processed by the WSGLRenderQueueBuilder. |
Adds the annotation to the list of annotations that have been processed. The caller is then able to use the list of annotations in any way they wish.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
camera | The specific Camera being processed by the WSGLRenderQueue. |
Adds the camera to the list of things that need to be processed.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
clipRegion | The specific ClipRegion being processed by the WSGLRenderQueueBuilder. |
Visits the ClipRegion, recording its clipping information relative to other items to be drawn. ClipRegions are accumulated added to WSGLRenderItems in the render queue so that Shaders can make use of them if necessary.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
light | The Light that is being visited by the WSGLRenderQueueBuilder. |
Visits the Light, appending it to the light list for use by the renderer. A visual representation of the light is also added to the render queue if applicable.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
modelInstance | The particular MeshModelInstance currently being visited by the WSGLRenderQueueBuilder. |
Visits the MeshModelInstance, adding it to the WSGLRenderQueue if necessary. The MeshModelInstance will only be added to the render queue if the builder determines that the geometry needs to be rendered. If the item doesn't need to be rendered (e.g. it is invisible or out-of-picture) it will not be added to the queue.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
sceneItemInstance | The specific SceneItemInstance being processed by the WSGLRenderQueueBuilder. |
Visits the SceneItemInstance, retrieving the particular SceneItem it refers to from the SceneItemInstanceLibrary, transforming it as specified by the instance.
Reimplemented from SceneProcessor.
|
overrideprotectedvirtual |
transform | The Transform that is being visited by the WSGLRenderQueueBuilder. |
Visits the Transform, recording its spatial information before proceeding to process its child SceneItems, which may include SceneItems of type Light, Camera or MeshModelInstance.
Reimplemented from SceneProcessor.