Open CASCADE Technology  7.1.0.beta
Public Member Functions | Protected Attributes

OpenGl_LayerList Class Reference

Class defining the list of layers. More...

#include <OpenGl_LayerList.hxx>

Public Member Functions

 OpenGl_LayerList (const Standard_Integer theNbPriorities=11)
 Constructor. More...
 
virtual ~OpenGl_LayerList ()
 Destructor. More...
 
Standard_Integer NbPriorities () const
 Method returns the number of available priorities. More...
 
Standard_Integer NbStructures () const
 Number of displayed structures. More...
 
Standard_Integer NbImmediateStructures () const
 Return number of structures within immediate layers. More...
 
void AddLayer (const Graphic3d_ZLayerId theLayerId)
 Insert a new layer with id. More...
 
void RemoveLayer (const Graphic3d_ZLayerId theLayerId)
 Remove layer by its id. More...
 
void AddStructure (const OpenGl_Structure *theStruct, const Graphic3d_ZLayerId theLayerId, const Standard_Integer 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. More...
 
void RemoveStructure (const OpenGl_Structure *theStructure)
 Remove structure from structure list and return its previous priority. More...
 
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. More...
 
void ChangePriority (const OpenGl_Structure *theStructure, const Graphic3d_ZLayerId theLayerId, const Standard_Integer theNewPriority)
 Changes structure priority within its ZLayer. More...
 
OpenGl_LayerLayer (const Graphic3d_ZLayerId theLayerId)
 Returns reference to the layer with given ID. More...
 
const OpenGl_LayerLayer (const Graphic3d_ZLayerId theLayerId) const
 Returns reference to the layer with given ID. More...
 
void SetLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings)
 Assign new settings to the layer. More...
 
void Render (const Handle< OpenGl_Workspace > &theWorkspace, const Standard_Boolean theToDrawImmediate, const OpenGl_LayerFilter theLayersToProcess) const
 Render this element. More...
 
const OpenGl_SequenceOfLayersLayers () const
 Returns the set of OpenGL Z-layers. More...
 
const OpenGl_LayerSeqIdsLayerIDs () const
 Returns the map of Z-layer IDs to indexes. More...
 
void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId)
 Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. More...
 
Standard_Size ModificationStateOfRaytracable () const
 Returns structure modification state (for ray-tracing). More...
 

Protected Attributes

OpenGl_SequenceOfLayers myLayers
 
OpenGl_LayerSeqIds myLayerIds
 
Standard_Integer myDefaultLayerIndex
 index of Graphic3d_ZLayerId_Default layer in myLayers sequence More...
 
Standard_Integer myNbPriorities
 
Standard_Integer myNbStructures
 
Standard_Integer myImmediateNbStructures
 number of structures within immediate layers More...
 
Standard_Size myModifStateOfRaytraceable
 

Detailed Description

Class defining the list of layers.

Constructor & Destructor Documentation

OpenGl_LayerList::OpenGl_LayerList ( const Standard_Integer  theNbPriorities = 11)

Constructor.

virtual OpenGl_LayerList::~OpenGl_LayerList ( )
virtual

Destructor.

Member Function Documentation

void OpenGl_LayerList::AddLayer ( const Graphic3d_ZLayerId  theLayerId)

Insert a new layer with id.

void OpenGl_LayerList::AddStructure ( const OpenGl_Structure theStruct,
const Graphic3d_ZLayerId  theLayerId,
const Standard_Integer  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 Standard_Integer  theNewPriority 
)

Changes structure priority within its ZLayer.

void OpenGl_LayerList::InvalidateBVHData ( const Graphic3d_ZLayerId  theLayerId)

Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.

OpenGl_Layer& OpenGl_LayerList::Layer ( const Graphic3d_ZLayerId  theLayerId)

Returns reference to the layer with given ID.

const OpenGl_Layer& OpenGl_LayerList::Layer ( const Graphic3d_ZLayerId  theLayerId) const

Returns reference to the layer with given ID.

const OpenGl_LayerSeqIds& OpenGl_LayerList::LayerIDs ( ) const
inline

Returns the map of Z-layer IDs to indexes.

const OpenGl_SequenceOfLayers& OpenGl_LayerList::Layers ( ) const
inline

Returns the set of OpenGL Z-layers.

Standard_Size OpenGl_LayerList::ModificationStateOfRaytracable ( ) const
inline

Returns structure modification state (for ray-tracing).

Standard_Integer OpenGl_LayerList::NbImmediateStructures ( ) const
inline

Return number of structures within immediate layers.

Standard_Integer OpenGl_LayerList::NbPriorities ( ) const
inline

Method returns the number of available priorities.

Standard_Integer OpenGl_LayerList::NbStructures ( ) const
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  theLayersToProcess 
) const

Render this element.

void OpenGl_LayerList::SetLayerSettings ( const Graphic3d_ZLayerId  theLayerId,
const Graphic3d_ZLayerSettings theSettings 
)

Assign new settings to the layer.

Field Documentation

Standard_Integer OpenGl_LayerList::myDefaultLayerIndex
protected

index of Graphic3d_ZLayerId_Default layer in myLayers sequence

Standard_Integer OpenGl_LayerList::myImmediateNbStructures
protected

number of structures within immediate layers

OpenGl_LayerSeqIds OpenGl_LayerList::myLayerIds
protected
OpenGl_SequenceOfLayers OpenGl_LayerList::myLayers
protected
Standard_Size OpenGl_LayerList::myModifStateOfRaytraceable
mutableprotected
Standard_Integer OpenGl_LayerList::myNbPriorities
protected
Standard_Integer OpenGl_LayerList::myNbStructures
protected

The documentation for this class was generated from the following file: