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

OpenGl_Layer Class Reference

Presentations list sorted within priorities. More...

#include <OpenGl_Layer.hxx>

Public Member Functions

 OpenGl_Layer (const Standard_Integer theNbPriorities=11)
 Initializes associated priority list and layer properties. More...
 
virtual ~OpenGl_Layer ()
 Destructor. More...
 
Standard_Boolean IsImmediate () const
 Return true if layer was marked with immediate flag. More...
 
const Graphic3d_ZLayerSettingsLayerSettings () const
 Returns settings of the layer object. More...
 
void SetLayerSettings (const Graphic3d_ZLayerSettings &theSettings)
 Sets settings of the layer object. More...
 
void Add (const OpenGl_Structure *theStruct, const Standard_Integer thePriority, Standard_Boolean isForChangePriority=Standard_False)
 
bool Remove (const OpenGl_Structure *theStruct, Standard_Integer &thePriority, Standard_Boolean isForChangePriority=Standard_False)
 Remove structure and returns its priority, if the structure is not found, method returns negative value. More...
 
Standard_Integer NbStructures () const
 
Standard_Integer NbPriorities () const
 Returns the number of available priority levels. More...
 
Standard_Boolean Append (const OpenGl_Layer &theOther)
 Append layer of acceptable type (with similar number of priorities or less). Returns Standard_False if the list can not be accepted. More...
 
const OpenGl_ArrayOfIndexedMapOfStructureArrayOfStructures () const
 Returns array of OpenGL structures. More...
 
void InvalidateBVHData () const
 Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. More...
 
void InvalidateBoundingBox () const
 Marks cached bounding box as obsolete. More...
 
Bnd_Box BoundingBox (const Standard_Integer theViewId, const Handle< Graphic3d_Camera > &theCamera, const Standard_Integer theWindowWidth, const Standard_Integer theWindowHeight, const Standard_Boolean theToIncludeAuxiliary) const
 Returns layer bounding box. More...
 
Standard_Real considerZoomPersistenceObjects (const Standard_Integer theViewId, const Handle< Graphic3d_Camera > &theCamera, const Standard_Integer theWindowWidth, const Standard_Integer theWindowHeight) const
 Returns zoom-scale factor. More...
 
void Render (const Handle< OpenGl_Workspace > &theWorkspace, const OpenGl_GlobalLayerSettings &theDefaultSettings) const
 
Standard_Integer NbOfTransformPersistenceObjects () const
 Returns number of transform persistence objects. More...
 

Protected Member Functions

void updateBVH () const
 Updates BVH trees if their state has been invalidated. More...
 
void traverse (OpenGl_BVHTreeSelector &theSelector) const
 Traverses through BVH tree to determine which structures are in view volume. More...
 
void renderAll (const Handle< OpenGl_Workspace > &theWorkspace) const
 Iterates through the hierarchical list of existing structures and renders them all. More...
 
void renderTraverse (const Handle< OpenGl_Workspace > &theWorkspace) const
 Iterates through the hierarchical list of existing structures and renders only overlapping ones. More...
 

Detailed Description

Presentations list sorted within priorities.

Constructor & Destructor Documentation

OpenGl_Layer::OpenGl_Layer ( const Standard_Integer  theNbPriorities = 11)

Initializes associated priority list and layer properties.

virtual OpenGl_Layer::~OpenGl_Layer ( )
virtual

Destructor.

Member Function Documentation

void OpenGl_Layer::Add ( const OpenGl_Structure theStruct,
const Standard_Integer  thePriority,
Standard_Boolean  isForChangePriority = Standard_False 
)
Standard_Boolean OpenGl_Layer::Append ( const OpenGl_Layer theOther)

Append layer of acceptable type (with similar number of priorities or less). Returns Standard_False if the list can not be accepted.

const OpenGl_ArrayOfIndexedMapOfStructure& OpenGl_Layer::ArrayOfStructures ( ) const
inline

Returns array of OpenGL structures.

Bnd_Box OpenGl_Layer::BoundingBox ( const Standard_Integer  theViewId,
const Handle< Graphic3d_Camera > &  theCamera,
const Standard_Integer  theWindowWidth,
const Standard_Integer  theWindowHeight,
const Standard_Boolean  theToIncludeAuxiliary 
) const

Returns layer bounding box.

Parameters
theViewIdview index to consider View Affinity in structure
theCameracamera definition
theWindowWidthviewport width (for applying transformation-persistence)
theWindowHeightviewport height (for applying transformation-persistence)
theToIncludeAuxiliaryconsider also auxiliary presentations (with infinite flag or with trihedron transformation persistence)
Returns
computed bounding box
Standard_Real OpenGl_Layer::considerZoomPersistenceObjects ( const Standard_Integer  theViewId,
const Handle< Graphic3d_Camera > &  theCamera,
const Standard_Integer  theWindowWidth,
const Standard_Integer  theWindowHeight 
) const

Returns zoom-scale factor.

void OpenGl_Layer::InvalidateBoundingBox ( ) const
inline

Marks cached bounding box as obsolete.

void OpenGl_Layer::InvalidateBVHData ( ) const

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

Standard_Boolean OpenGl_Layer::IsImmediate ( ) const
inline

Return true if layer was marked with immediate flag.

const Graphic3d_ZLayerSettings& OpenGl_Layer::LayerSettings ( ) const
inline

Returns settings of the layer object.

Standard_Integer OpenGl_Layer::NbOfTransformPersistenceObjects ( ) const
inline

Returns number of transform persistence objects.

Standard_Integer OpenGl_Layer::NbPriorities ( ) const
inline

Returns the number of available priority levels.

Standard_Integer OpenGl_Layer::NbStructures ( ) const
inline
Returns
the number of structures
bool OpenGl_Layer::Remove ( const OpenGl_Structure theStruct,
Standard_Integer thePriority,
Standard_Boolean  isForChangePriority = Standard_False 
)

Remove structure and returns its priority, if the structure is not found, method returns negative value.

void OpenGl_Layer::Render ( const Handle< OpenGl_Workspace > &  theWorkspace,
const OpenGl_GlobalLayerSettings theDefaultSettings 
) const
void OpenGl_Layer::renderAll ( const Handle< OpenGl_Workspace > &  theWorkspace) const
protected

Iterates through the hierarchical list of existing structures and renders them all.

void OpenGl_Layer::renderTraverse ( const Handle< OpenGl_Workspace > &  theWorkspace) const
protected

Iterates through the hierarchical list of existing structures and renders only overlapping ones.

void OpenGl_Layer::SetLayerSettings ( const Graphic3d_ZLayerSettings theSettings)

Sets settings of the layer object.

void OpenGl_Layer::traverse ( OpenGl_BVHTreeSelector theSelector) const
protected

Traverses through BVH tree to determine which structures are in view volume.

void OpenGl_Layer::updateBVH ( ) const
protected

Updates BVH trees if their state has been invalidated.


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