Open CASCADE Technology
6.8.0
|
Implementation of low-level graphic structure. More...
#include <OpenGl_Structure.hxx>
Data Structures | |
class | GroupIterator |
Auxiliary wrapper to iterate OpenGl_Group sequence. More... | |
Public Member Functions | |
OpenGl_Structure (const Handle< Graphic3d_StructureManager > &theManager) | |
Create empty structure. More... | |
virtual void | UpdateNamedStatus () |
Setup structure graphic state. More... | |
virtual void | Clear () |
Clear graphic data. More... | |
virtual void | Connect (Graphic3d_CStructure &theStructure) |
Connect other structure to this one. More... | |
virtual void | Disconnect (Graphic3d_CStructure &theStructure) |
Disconnect other structure to this one. More... | |
virtual void | UpdateAspects () |
Synchronize structure aspects. More... | |
virtual void | UpdateTransformation () |
Synchronize structure transformation. More... | |
virtual void | HighlightWithColor (const Graphic3d_Vec3 &theColor, const Standard_Boolean theToCreate) |
Highlight entire structure with color. More... | |
virtual void | HighlightWithBndBox (const Handle< Graphic3d_Structure > &theStruct, const Standard_Boolean theToCreate) |
Highlight structure using boundary box. More... | |
virtual Handle < Graphic3d_CStructure > | ShadowLink (const Handle< Graphic3d_StructureManager > &theManager) const |
Create shadow link to this structure. More... | |
virtual Handle< Graphic3d_Group > | NewGroup (const Handle< Graphic3d_Structure > &theStruct) |
Create new group within this structure. More... | |
virtual void | RemoveGroup (const Handle< Graphic3d_Group > &theGroup) |
Remove group from this structure. More... | |
virtual const Graphic3d_SequenceOfGroup & | DrawGroups () const |
OpenGl_GraphicDriver * | GlDriver () const |
Access graphic driver. More... | |
void | SetTransformPersistence (const CALL_DEF_TRANSFORM_PERSISTENCE &ATransPers) |
void | SetAspectLine (const CALL_DEF_CONTEXTLINE &theAspect) |
void | SetAspectFace (const CALL_DEF_CONTEXTFILLAREA &theAspect) |
void | SetAspectMarker (const CALL_DEF_CONTEXTMARKER &theAspect) |
void | SetAspectText (const CALL_DEF_CONTEXTTEXT &theAspect) |
void | clearHighlightBox (const Handle< OpenGl_Context > &theGlCtx) |
void | setHighlightColor (const Handle< OpenGl_Context > &theGlCtx, const Graphic3d_Vec3 &theColor) |
void | clearHighlightColor (const Handle< OpenGl_Context > &theGlCtx) |
Standard_Boolean | IsVisible () const |
void | Clear (const Handle< OpenGl_Context > &theGlCtx) |
void | SetZLayer (const Standard_Integer theLayerIndex) |
Set z layer ID to display the structure in specified layer. More... | |
Standard_Integer | GetZLayer () const |
Get z layer ID. More... | |
virtual void | RenderGeometry (const Handle< OpenGl_Workspace > &theWorkspace) const |
Renders groups of structure without applying any attributes (i.e. transform, material etc). More... | |
virtual void | Render (const Handle< OpenGl_Workspace > &theWorkspace) const |
Renders the structure. More... | |
virtual void | Release (const Handle< OpenGl_Context > &theGlCtx) |
Releases structure resources. More... | |
void | ResetCullingStatus () const |
Marks structure as not overlapping view volume (as it is by default). More... | |
void | MarkAsNotCulled () const |
Marks structure as overlapping the current view volume one. The method is called during traverse of BVH tree. More... | |
Standard_Boolean | IsCulled () const |
Returns Standard_False if the structure hits the current view volume, otherwise returns Standard_True. The default value for all structures before each traverse of BVH tree is Standard_True. More... | |
const Standard_Boolean | IsAlwaysRendered () const |
Checks if the structure should be included into BVH tree or not. More... | |
void | ReleaseGlResources (const Handle< OpenGl_Context > &theGlCtx) |
This method releases GL resources without actual elements destruction. As result structure could be correctly destroyed layer without GL context (after last window was closed for example). More... | |
const OpenGl_ListOfStructure & | ConnectedStructures () const |
Returns list of connected OpenGL structures. More... | |
const OpenGl_AspectFace * | AspectFace () const |
Returns OpenGL face aspect. More... | |
const OpenGl_Matrix * | Transformation () const |
Returns OpenGL transformation matrix. More... | |
const TEL_TRANSFORM_PERSISTENCE * | PersistentTranslation () const |
Returns OpenGL persistent translation. More... | |
Standard_Size | ModificationState () const |
Returns structure modification state (for ray-tracing). More... | |
void | ResetModificationState () const |
Resets structure modification state (for ray-tracing) More... | |
Standard_Boolean | IsRaytracable () const |
Is the structure ray-tracable (contains ray-tracable elements)? More... | |
![]() | |
const Handle < Graphic3d_GraphicDriver > & | GraphicDriver () const |
const Graphic3d_SequenceOfGroup & | Groups () const |
const Graphic3d_SequenceOfHClipPlane & | ClipPlanes () const |
void | SetClipPlanes (const Graphic3d_SequenceOfHClipPlane &thePlanes) |
Pass clip planes to the associated graphic driver structure. More... | |
const Graphic3d_BndBox4f & | BoundingBox () const |
Graphic3d_BndBox4f & | ChangeBoundingBox () |
![]() | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (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 Handle_Standard_Type & | DynamicType () const |
Returns a type information object about this object. More... | |
Standard_Boolean | IsInstance (const 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 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... | |
virtual Handle_Standard_Transient | This () const |
Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
Protected Member Functions | |
virtual | ~OpenGl_Structure () |
void | RegisterAncestorStructure (const OpenGl_Structure *theStructure) const |
Registers ancestor connected structure (for updating ray-tracing state). More... | |
void | UnregisterAncestorStructure (const OpenGl_Structure *theStructure) const |
Unregisters ancestor connected structure (for updating ray-tracing state). More... | |
void | UnregisterFromAncestorStructure () const |
Unregisters structure from ancestor structure (for updating ray-tracing state). More... | |
void | UpdateStateWithAncestorStructures () const |
Updates modification state for structure and its parents. More... | |
void | UpdateRaytracableWithAncestorStructures () const |
Updates ray-tracable status for structure and its parents. More... | |
void | SetRaytracableWithAncestorStructures () const |
Sets ray-tracable status for structure and its parents. More... | |
![]() | |
Graphic3d_CStructure (const Handle< Graphic3d_StructureManager > &theManager) | |
Create empty structure. More... | |
Protected Attributes | |
OpenGl_Matrix * | myTransformation |
TEL_TRANSFORM_PERSISTENCE * | myTransPers |
OpenGl_AspectLine * | myAspectLine |
OpenGl_AspectFace * | myAspectFace |
OpenGl_AspectMarker * | myAspectMarker |
OpenGl_AspectText * | myAspectText |
Handle< OpenGl_Group > | myHighlightBox |
TEL_COLOUR * | myHighlightColor |
int | myNamedStatus |
int | myZLayer |
OpenGl_ListOfStructure | myConnected |
OpenGl_ListOfStructure | myAncestorStructures |
Standard_Boolean | myIsRaytracable |
Standard_Size | myModificationState |
Standard_Boolean | myIsCulled |
A status specifying is structure needs to be rendered after BVH tree traverse. More... | |
Standard_Boolean | myIsMirrored |
Used to tell OpenGl to interpret polygons in clockwise order. More... | |
![]() | |
Handle< Graphic3d_GraphicDriver > | myGraphicDriver |
Graphic3d_SequenceOfGroup | myGroups |
Graphic3d_BndBox4f | myBndBox |
Graphic3d_SequenceOfHClipPlane | myClipPlanes |
Additional Inherited Members | |
![]() | |
int | Id |
int | Priority |
int | PreviousPriority |
CALL_DEF_CONTEXTLINE | ContextLine |
CALL_DEF_CONTEXTFILLAREA | ContextFillArea |
CALL_DEF_CONTEXTMARKER | ContextMarker |
CALL_DEF_CONTEXTTEXT | ContextText |
CALL_DEF_COLOR | HighlightColor |
float | Transformation [4][4] |
Graphic3d_TypeOfComposition | Composition |
int | ContainsFacet |
unsigned | IsInfinite: 1 |
unsigned | stick: 1 |
unsigned | highlight: 1 |
unsigned | visible: 1 |
unsigned | pick: 1 |
unsigned | HLRValidation: 1 |
unsigned | IsForHighlight: 1 |
unsigned | IsMutable: 1 |
unsigned | Is2dText: 1 |
CALL_DEF_TRANSFORM_PERSISTENCE | TransformPersistence |
Implementation of low-level graphic structure.
OpenGl_Structure::OpenGl_Structure | ( | const Handle< Graphic3d_StructureManager > & | theManager | ) |
Create empty structure.
|
protectedvirtual |
|
inline |
Returns OpenGL face aspect.
|
virtual |
Clear graphic data.
Implements Graphic3d_CStructure.
void OpenGl_Structure::Clear | ( | const Handle< OpenGl_Context > & | theGlCtx | ) |
void OpenGl_Structure::clearHighlightBox | ( | const Handle< OpenGl_Context > & | theGlCtx | ) |
void OpenGl_Structure::clearHighlightColor | ( | const Handle< OpenGl_Context > & | theGlCtx | ) |
|
virtual |
Connect other structure to this one.
Implements Graphic3d_CStructure.
|
inline |
Returns list of connected OpenGL structures.
|
virtual |
Disconnect other structure to this one.
Implements Graphic3d_CStructure.
|
inlinevirtual |
Reimplemented in OpenGl_StructureShadow.
Standard_Integer OpenGl_Structure::GetZLayer | ( | ) | const |
Get z layer ID.
|
inline |
Access graphic driver.
|
virtual |
Highlight structure using boundary box.
Implements Graphic3d_CStructure.
|
virtual |
Highlight entire structure with color.
Implements Graphic3d_CStructure.
|
inline |
Checks if the structure should be included into BVH tree or not.
|
inline |
Returns Standard_False if the structure hits the current view volume, otherwise returns Standard_True. The default value for all structures before each traverse of BVH tree is Standard_True.
|
inline |
Is the structure ray-tracable (contains ray-tracable elements)?
|
inline |
|
inline |
Marks structure as overlapping the current view volume one. The method is called during traverse of BVH tree.
|
inline |
Returns structure modification state (for ray-tracing).
|
virtual |
Create new group within this structure.
Implements Graphic3d_CStructure.
|
inline |
Returns OpenGL persistent translation.
|
protected |
Registers ancestor connected structure (for updating ray-tracing state).
|
virtual |
Releases structure resources.
void OpenGl_Structure::ReleaseGlResources | ( | const Handle< OpenGl_Context > & | theGlCtx | ) |
This method releases GL resources without actual elements destruction. As result structure could be correctly destroyed layer without GL context (after last window was closed for example).
Notice however that reusage of this structure after calling this method is incorrect and will lead to broken visualization due to loosed data.
|
virtual |
Remove group from this structure.
Implements Graphic3d_CStructure.
|
virtual |
Renders the structure.
|
virtual |
Renders groups of structure without applying any attributes (i.e. transform, material etc).
|
inline |
Marks structure as not overlapping view volume (as it is by default).
|
inline |
Resets structure modification state (for ray-tracing)
void OpenGl_Structure::SetAspectFace | ( | const CALL_DEF_CONTEXTFILLAREA & | theAspect | ) |
void OpenGl_Structure::SetAspectLine | ( | const CALL_DEF_CONTEXTLINE & | theAspect | ) |
void OpenGl_Structure::SetAspectMarker | ( | const CALL_DEF_CONTEXTMARKER & | theAspect | ) |
void OpenGl_Structure::SetAspectText | ( | const CALL_DEF_CONTEXTTEXT & | theAspect | ) |
void OpenGl_Structure::setHighlightColor | ( | const Handle< OpenGl_Context > & | theGlCtx, |
const Graphic3d_Vec3 & | theColor | ||
) |
|
protected |
Sets ray-tracable status for structure and its parents.
void OpenGl_Structure::SetTransformPersistence | ( | const CALL_DEF_TRANSFORM_PERSISTENCE & | ATransPers | ) |
void OpenGl_Structure::SetZLayer | ( | const Standard_Integer | theLayerIndex | ) |
Set z layer ID to display the structure in specified layer.
|
virtual |
Create shadow link to this structure.
Implements Graphic3d_CStructure.
|
inline |
Returns OpenGL transformation matrix.
|
protected |
Unregisters ancestor connected structure (for updating ray-tracing state).
|
protected |
Unregisters structure from ancestor structure (for updating ray-tracing state).
|
virtual |
Synchronize structure aspects.
Implements Graphic3d_CStructure.
|
virtual |
Setup structure graphic state.
Implements Graphic3d_CStructure.
|
protected |
Updates ray-tracable status for structure and its parents.
|
protected |
Updates modification state for structure and its parents.
|
virtual |
Synchronize structure transformation.
Implements Graphic3d_CStructure.
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
A status specifying is structure needs to be rendered after BVH tree traverse.
|
protected |
Used to tell OpenGl to interpret polygons in clockwise order.
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |