Open CASCADE Technology  7.4.0
Public Member Functions | Protected Member Functions

Graphic3d_Layer Class Reference

Presentations list sorted within priorities. More...

#include <Graphic3d_Layer.hxx>

Inheritance diagram for Graphic3d_Layer:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_Layer (Graphic3d_ZLayerId theId, Standard_Integer theNbPriorities, const Handle< Select3D_BVHBuilder3d > &theBuilder)
 Initializes associated priority list and layer properties. More...
 
virtual ~Graphic3d_Layer ()
 Destructor. More...
 
Graphic3d_ZLayerId LayerId () const
 Return layer id. More...
 
const Handle< Select3D_BVHBuilder3d > & FrustumCullingBVHBuilder () const
 Returns BVH tree builder for frustom culling. More...
 
void SetFrustumCullingBVHBuilder (const Handle< Select3D_BVHBuilder3d > &theBuilder)
 Assigns BVH tree builder for frustom culling. 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 Graphic3d_CStructure *theStruct, Standard_Integer thePriority, Standard_Boolean isForChangePriority=Standard_False)
 
bool Remove (const Graphic3d_CStructure *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 NbStructuresNotCulled () const
 Number of NOT culled structures in the layer. More...
 
Standard_Integer NbPriorities () const
 Returns the number of available priority levels. More...
 
Standard_Boolean Append (const Graphic3d_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 Graphic3d_ArrayOfIndexedMapOfStructureArrayOfStructures () const
 Returns array of structures. More...
 
void InvalidateBVHData ()
 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 (Standard_Integer theViewId, const Handle< Graphic3d_Camera > &theCamera, Standard_Integer theWindowWidth, Standard_Integer theWindowHeight, Standard_Boolean theToIncludeAuxiliary) const
 Returns layer bounding box. More...
 
Standard_Real considerZoomPersistenceObjects (Standard_Integer theViewId, const Handle< Graphic3d_Camera > &theCamera, Standard_Integer theWindowWidth, Standard_Integer theWindowHeight) const
 Returns zoom-scale factor. More...
 
void UpdateCulling (Standard_Integer theViewId, const Graphic3d_CullingTool &theSelector, const Graphic3d_RenderingParams::FrustumCulling theFrustumCullingState)
 Update culling state - should be called before rendering. Traverses through BVH tree to determine which structures are in view volume. More...
 
bool IsCulled () const
 Returns TRUE if layer is empty or has been discarded entirely by culling test. More...
 
Standard_Integer NbOfTransformPersistenceObjects () const
 Returns number of transform persistence objects. More...
 
const Graphic3d_BvhCStructureSetCullableStructuresBVH () const
 Returns set of Graphic3d_CStructures structures for building BVH tree. More...
 
const Graphic3d_BvhCStructureSetTrsfPersCullableTrsfPersStructuresBVH () const
 Returns set of transform persistent Graphic3d_CStructures for building BVH tree. More...
 
const NCollection_IndexedMap< const Graphic3d_CStructure * > & NonCullableStructures () const
 Returns indexed map of always rendered structures. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Member Functions

void updateBVH () const
 Updates BVH trees if their state has been invalidated. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

Presentations list sorted within priorities.

Constructor & Destructor Documentation

◆ Graphic3d_Layer()

Graphic3d_Layer::Graphic3d_Layer ( Graphic3d_ZLayerId  theId,
Standard_Integer  theNbPriorities,
const Handle< Select3D_BVHBuilder3d > &  theBuilder 
)

Initializes associated priority list and layer properties.

◆ ~Graphic3d_Layer()

virtual Graphic3d_Layer::~Graphic3d_Layer ( )
virtual

Destructor.

Member Function Documentation

◆ Add()

void Graphic3d_Layer::Add ( const Graphic3d_CStructure theStruct,
Standard_Integer  thePriority,
Standard_Boolean  isForChangePriority = Standard_False 
)

◆ Append()

Standard_Boolean Graphic3d_Layer::Append ( const Graphic3d_Layer theOther)

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

◆ ArrayOfStructures()

const Graphic3d_ArrayOfIndexedMapOfStructure& Graphic3d_Layer::ArrayOfStructures ( ) const
inline

Returns array of structures.

◆ BoundingBox()

Bnd_Box Graphic3d_Layer::BoundingBox ( Standard_Integer  theViewId,
const Handle< Graphic3d_Camera > &  theCamera,
Standard_Integer  theWindowWidth,
Standard_Integer  theWindowHeight,
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

◆ considerZoomPersistenceObjects()

Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects ( Standard_Integer  theViewId,
const Handle< Graphic3d_Camera > &  theCamera,
Standard_Integer  theWindowWidth,
Standard_Integer  theWindowHeight 
) const

Returns zoom-scale factor.

◆ CullableStructuresBVH()

const Graphic3d_BvhCStructureSet& Graphic3d_Layer::CullableStructuresBVH ( ) const
inline

Returns set of Graphic3d_CStructures structures for building BVH tree.

◆ CullableTrsfPersStructuresBVH()

const Graphic3d_BvhCStructureSetTrsfPers& Graphic3d_Layer::CullableTrsfPersStructuresBVH ( ) const
inline

Returns set of transform persistent Graphic3d_CStructures for building BVH tree.

◆ FrustumCullingBVHBuilder()

const Handle< Select3D_BVHBuilder3d >& Graphic3d_Layer::FrustumCullingBVHBuilder ( ) const
inline

Returns BVH tree builder for frustom culling.

◆ InvalidateBoundingBox()

void Graphic3d_Layer::InvalidateBoundingBox ( ) const
inline

Marks cached bounding box as obsolete.

◆ InvalidateBVHData()

void Graphic3d_Layer::InvalidateBVHData ( )

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

◆ IsCulled()

bool Graphic3d_Layer::IsCulled ( ) const
inline

Returns TRUE if layer is empty or has been discarded entirely by culling test.

◆ IsImmediate()

Standard_Boolean Graphic3d_Layer::IsImmediate ( ) const
inline

Return true if layer was marked with immediate flag.

◆ LayerId()

Graphic3d_ZLayerId Graphic3d_Layer::LayerId ( ) const
inline

Return layer id.

◆ LayerSettings()

const Graphic3d_ZLayerSettings& Graphic3d_Layer::LayerSettings ( ) const
inline

Returns settings of the layer object.

◆ NbOfTransformPersistenceObjects()

Standard_Integer Graphic3d_Layer::NbOfTransformPersistenceObjects ( ) const
inline

Returns number of transform persistence objects.

◆ NbPriorities()

Standard_Integer Graphic3d_Layer::NbPriorities ( ) const
inline

Returns the number of available priority levels.

◆ NbStructures()

Standard_Integer Graphic3d_Layer::NbStructures ( ) const
inline
Returns
the number of structures

◆ NbStructuresNotCulled()

Standard_Integer Graphic3d_Layer::NbStructuresNotCulled ( ) const
inline

Number of NOT culled structures in the layer.

◆ NonCullableStructures()

const NCollection_IndexedMap<const Graphic3d_CStructure*>& Graphic3d_Layer::NonCullableStructures ( ) const
inline

Returns indexed map of always rendered structures.

◆ Remove()

bool Graphic3d_Layer::Remove ( const Graphic3d_CStructure 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.

◆ SetFrustumCullingBVHBuilder()

void Graphic3d_Layer::SetFrustumCullingBVHBuilder ( const Handle< Select3D_BVHBuilder3d > &  theBuilder)
inline

Assigns BVH tree builder for frustom culling.

◆ SetLayerSettings()

void Graphic3d_Layer::SetLayerSettings ( const Graphic3d_ZLayerSettings theSettings)

Sets settings of the layer object.

◆ updateBVH()

void Graphic3d_Layer::updateBVH ( ) const
protected

Updates BVH trees if their state has been invalidated.

◆ UpdateCulling()

void Graphic3d_Layer::UpdateCulling ( Standard_Integer  theViewId,
const Graphic3d_CullingTool theSelector,
const Graphic3d_RenderingParams::FrustumCulling  theFrustumCullingState 
)

Update culling state - should be called before rendering. Traverses through BVH tree to determine which structures are in view volume.


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