Class defining the list of layers. More...
#include <OpenGl_LayerList.hxx>
Data Structures | |
| class | OpenGl_LayerStack |
| Stack of references to existing layers of predefined maximum size. More... | |
Public Member Functions | |
| OpenGl_LayerList () | |
| Constructor. | |
| virtual | ~OpenGl_LayerList () |
| Destructor. | |
| Standard_Integer | NbPriorities () const |
| Method returns the number of available priorities. | |
| Standard_Integer | NbStructures () const |
| Number of displayed structures. | |
| Standard_Integer | NbImmediateStructures () const |
| Return number of structures within immediate layers. | |
| void | InsertLayerBefore (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter) |
| Insert a new layer with id. | |
| void | InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore) |
| Insert a new layer with id. | |
| void | RemoveLayer (const Graphic3d_ZLayerId theLayerId) |
| Remove layer by its id. | |
| void | AddStructure (const OpenGl_Structure *theStruct, const Graphic3d_ZLayerId theLayerId, const Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority=Standard_False) |
| Add structure to list with given priority. The structure will be inserted to specified layer. If the layer isn't found, the structure will be put to default bottom-level layer. | |
| void | RemoveStructure (const OpenGl_Structure *theStructure) |
| Remove structure from structure list and return its previous priority. | |
| void | ChangeLayer (const OpenGl_Structure *theStructure, const Graphic3d_ZLayerId theOldLayerId, const Graphic3d_ZLayerId theNewLayerId) |
| Change structure z layer If the new layer is not presented, the structure will be displayed in default z layer. | |
| void | ChangePriority (const OpenGl_Structure *theStructure, const Graphic3d_ZLayerId theLayerId, const Graphic3d_DisplayPriority theNewPriority) |
| Changes structure priority within its ZLayer. | |
| OpenGl_Layer & | Layer (const Graphic3d_ZLayerId theLayerId) |
| Returns reference to the layer with given ID. | |
| const OpenGl_Layer & | Layer (const Graphic3d_ZLayerId theLayerId) const |
| Returns reference to the layer with given ID. | |
| void | SetLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings) |
| Assign new settings to the layer. | |
| void | UpdateCulling (const Handle< OpenGl_Workspace > &theWorkspace, const Standard_Boolean theToDrawImmediate) |
| Update culling state - should be called before rendering. | |
| void | Render (const Handle< OpenGl_Workspace > &theWorkspace, const Standard_Boolean theToDrawImmediate, const OpenGl_LayerFilter theFilterMode, const Graphic3d_ZLayerId theLayersToProcess, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo) const |
| Render this element. | |
| const NCollection_List< Handle< Graphic3d_Layer > > & | Layers () const |
| Returns the set of OpenGL Z-layers. | |
| const NCollection_DataMap< Graphic3d_ZLayerId, Handle< Graphic3d_Layer > > & | LayerIDs () const |
| Returns the map of Z-layer IDs to indexes. | |
| void | InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) |
| Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. | |
| Standard_Size | ModificationStateOfRaytracable () const |
| Returns structure modification state (for ray-tracing). | |
| const Handle< BVH_Builder3d > & | FrustumCullingBVHBuilder () const |
| Returns BVH tree builder for frustum culling. | |
| void | SetFrustumCullingBVHBuilder (const Handle< BVH_Builder3d > &theBuilder) |
| Assigns BVH tree builder for frustum culling. | |
| void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
| Dumps the content of me into the stream. | |
Protected Member Functions | |
| void | renderTransparent (const Handle< OpenGl_Workspace > &theWorkspace, OpenGl_LayerStack::iterator &theLayerIter, const OpenGl_GlobalLayerSettings &theGlobalSettings, OpenGl_FrameBuffer *theReadDrawFbo, OpenGl_FrameBuffer *theOitAccumFbo) const |
| Render transparent objects using blending operator. Additional accumulation framebuffer is used for blended order-independent transparency algorithm. It should support floating-point color components and share depth with main reading/drawing framebuffer. | |
| void | renderLayer (const Handle< OpenGl_Workspace > &theWorkspace, const OpenGl_GlobalLayerSettings &theDefaultSettings, const Graphic3d_Layer &theLayer) const |
Protected Attributes | |
| NCollection_List< Handle< Graphic3d_Layer > > | myLayers |
| NCollection_DataMap< Graphic3d_ZLayerId, Handle< Graphic3d_Layer > > | myLayerIds |
| Handle< BVH_Builder3d > | myBVHBuilder |
| BVH tree builder for frustum culling. | |
| Standard_Integer | myNbStructures |
| Standard_Integer | myImmediateNbStructures |
| number of structures within immediate layers | |
| Standard_Size | myModifStateOfRaytraceable |
| OpenGl_LayerStack | myTransparentToProcess |
| Collection of references to layers with transparency gathered during rendering pass. | |
Class defining the list of layers.
| OpenGl_LayerList::OpenGl_LayerList | ( | ) |
Constructor.
|
virtual |
Destructor.
| void OpenGl_LayerList::AddStructure | ( | const OpenGl_Structure * | theStruct, |
| const Graphic3d_ZLayerId | theLayerId, | ||
| const Graphic3d_DisplayPriority | thePriority, | ||
| Standard_Boolean | isForChangePriority = Standard_False ) |
Add structure to list with given priority. The structure will be inserted to specified layer. If the layer isn't found, the structure will be put to default bottom-level layer.
| void OpenGl_LayerList::ChangeLayer | ( | const OpenGl_Structure * | theStructure, |
| const Graphic3d_ZLayerId | theOldLayerId, | ||
| const Graphic3d_ZLayerId | theNewLayerId ) |
Change structure z layer If the new layer is not presented, the structure will be displayed in default z layer.
| void OpenGl_LayerList::ChangePriority | ( | const OpenGl_Structure * | theStructure, |
| const Graphic3d_ZLayerId | theLayerId, | ||
| const Graphic3d_DisplayPriority | theNewPriority ) |
Changes structure priority within its ZLayer.
| void OpenGl_LayerList::DumpJson | ( | Standard_OStream & | theOStream, |
| Standard_Integer | theDepth = -1 ) const |
Dumps the content of me into the stream.
|
inline |
Returns BVH tree builder for frustum culling.
| void OpenGl_LayerList::InsertLayerAfter | ( | const Graphic3d_ZLayerId | theNewLayerId, |
| const Graphic3d_ZLayerSettings & | theSettings, | ||
| const Graphic3d_ZLayerId | theLayerBefore ) |
Insert a new layer with id.
| void OpenGl_LayerList::InsertLayerBefore | ( | const Graphic3d_ZLayerId | theNewLayerId, |
| const Graphic3d_ZLayerSettings & | theSettings, | ||
| const Graphic3d_ZLayerId | theLayerAfter ) |
Insert a new layer with id.
| void OpenGl_LayerList::InvalidateBVHData | ( | const Graphic3d_ZLayerId | theLayerId | ) |
Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.
|
inline |
Returns reference to the layer with given ID.
|
inline |
Returns reference to the layer with given ID.
|
inline |
Returns the map of Z-layer IDs to indexes.
|
inline |
Returns the set of OpenGL Z-layers.
|
inline |
Returns structure modification state (for ray-tracing).
|
inline |
Return number of structures within immediate layers.
|
inline |
Method returns the number of available priorities.
|
inline |
Number of displayed structures.
| void OpenGl_LayerList::RemoveLayer | ( | const Graphic3d_ZLayerId | theLayerId | ) |
Remove layer by its id.
| void OpenGl_LayerList::RemoveStructure | ( | const OpenGl_Structure * | theStructure | ) |
Remove structure from structure list and return its previous priority.
| void OpenGl_LayerList::Render | ( | const Handle< OpenGl_Workspace > & | theWorkspace, |
| const Standard_Boolean | theToDrawImmediate, | ||
| const OpenGl_LayerFilter | theFilterMode, | ||
| const Graphic3d_ZLayerId | theLayersToProcess, | ||
| OpenGl_FrameBuffer * | theReadDrawFbo, | ||
| OpenGl_FrameBuffer * | theOitAccumFbo ) const |
Render this element.
|
protected |
|
protected |
Render transparent objects using blending operator. Additional accumulation framebuffer is used for blended order-independent transparency algorithm. It should support floating-point color components and share depth with main reading/drawing framebuffer.
| [in] | theWorkspace | the currently used workspace for rendering. |
| theLayerIter | [in/out] the current iterator of transparent layers to process. | |
| [in] | theGlobalSettings | the set of global settings used for rendering. |
| [in] | theReadDrawFbo | the framebuffer for reading depth and writing final color. |
| [in] | theOitAccumFbo | the framebuffer for accumulating color and coverage for OIT process. |
| void OpenGl_LayerList::SetFrustumCullingBVHBuilder | ( | const Handle< BVH_Builder3d > & | theBuilder | ) |
Assigns BVH tree builder for frustum culling.
| void OpenGl_LayerList::SetLayerSettings | ( | const Graphic3d_ZLayerId | theLayerId, |
| const Graphic3d_ZLayerSettings & | theSettings ) |
Assign new settings to the layer.
| void OpenGl_LayerList::UpdateCulling | ( | const Handle< OpenGl_Workspace > & | theWorkspace, |
| const Standard_Boolean | theToDrawImmediate ) |
Update culling state - should be called before rendering.
|
protected |
BVH tree builder for frustum culling.
|
protected |
number of structures within immediate layers
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
Collection of references to layers with transparency gathered during rendering pass.