Open CASCADE Technology  6.9.0
Public Member Functions | Protected Member Functions | Protected Attributes

OpenGl_Group Class Reference

Implementation of low-level graphic group. More...

#include <OpenGl_Group.hxx>

Inheritance diagram for OpenGl_Group:
Inheritance graph
[legend]

Public Member Functions

 OpenGl_Group (const Handle< Graphic3d_Structure > &theStruct)
 Create empty group. Will throw exception if not created by OpenGl_Structure. More...
 
virtual void Clear (const Standard_Boolean theToUpdateStructureMgr)
 Supress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass Standard_False as <theUpdateStructureMgr>. This used on context and viewer destruction, when the pointer to structure manager in Graphic3d_Structure could be already released (pointers are used here to avoid handle cross-reference);. More...
 
virtual void UpdateAspectLine (const Standard_Boolean theIsGlobal)
 Update line aspect. More...
 
virtual void UpdateAspectFace (const Standard_Boolean theIsGlobal)
 Update fill aspect. More...
 
virtual void UpdateAspectMarker (const Standard_Boolean theIsGlobal)
 Update marker aspect. More...
 
virtual void UpdateAspectText (const Standard_Boolean theIsGlobal)
 Update text aspect. More...
 
virtual void AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theType, const Handle< Graphic3d_IndexBuffer > &theIndices, const Handle< Graphic3d_Buffer > &theAttribs, const Handle< Graphic3d_BoundBuffer > &theBounds, const Standard_Boolean theToEvalMinMax)
 Add primitive array element. More...
 
virtual void Text (const Standard_CString theTextUtf, const Graphic3d_Vertex &thePoint, const Standard_Real theHeight, const Quantity_PlaneAngle theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHta, const Graphic3d_VerticalTextAlignment theVta, const Standard_Boolean theToEvalMinMax)
 Add text element. More...
 
virtual void UserDraw (const Standard_Address theObject, const Standard_Boolean theToEvalMinMax, const Standard_Boolean theContainsFacet)
 Add UserDraw element using obsolete API. More...
 
virtual void SetFlippingOptions (const Standard_Boolean theIsEnabled, const gp_Ax2 &theRefPlane)
 Add flipping element. More...
 
virtual void SetStencilTestOptions (const Standard_Boolean theIsEnabled)
 Add stencil test element. More...
 
OpenGl_StructureGlStruct () const
 
void AddElement (OpenGl_Element *theElem)
 
virtual void Render (const Handle< OpenGl_Workspace > &theWorkspace) const
 
virtual void Release (const Handle< OpenGl_Context > &theGlCtx)
 
const OpenGl_ElementNodeFirstNode () const
 Returns first OpenGL element node of the group. More...
 
const OpenGl_AspectFaceAspectFace () const
 Returns OpenGL face aspect. More...
 
Standard_Boolean IsRaytracable () const
 Is the group ray-tracable (contains ray-tracable elements)? More...
 
CALL_DEF_CONTEXTLINEChangeContextLine ()
 Accessor to line aspect (to be removed) More...
 
- Public Member Functions inherited from Graphic3d_Group
void Destroy ()
 Supress the group <me> in the structure. More...
 
 ~Graphic3d_Group ()
 
void Remove ()
 Supress the group <me> in the structure. Warning: No more graphic operations in <me> after this call. Modifies the current modelling transform persistence (pan, zoom or rotate) Get the current modelling transform persistence (pan, zoom or rotate) More...
 
void SetGroupPrimitivesAspect (const Handle< Graphic3d_AspectLine3d > &CTX)
 Modifies the context for all the line primitives of the group. More...
 
void SetGroupPrimitivesAspect (const Handle< Graphic3d_AspectFillArea3d > &CTX)
 Modifies the context for all the face primitives of the group. More...
 
void SetGroupPrimitivesAspect (const Handle< Graphic3d_AspectText3d > &CTX)
 Modifies the context for all the text primitives of the group. More...
 
void SetGroupPrimitivesAspect (const Handle< Graphic3d_AspectMarker3d > &CTX)
 Modifies the context for all the marker primitives of the group. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectLine3d > &CTX)
 Modifies the current context of the group to give another aspect for all the line primitives created after this call in the group. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectFillArea3d > &CTX)
 Modifies the current context of the group to give another aspect for all the face primitives created after this call in the group. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectText3d > &CTX)
 Modifies the current context of the group to give another aspect for all the text primitives created after this call in the group. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectMarker3d > &CTX)
 Modifies the current context of the group to give another aspect for all the marker primitives created after this call in the group. More...
 
void SetMinMaxValues (const Standard_Real XMin, const Standard_Real YMin, const Standard_Real ZMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real ZMax)
 Sets the coordinates of the boundary box of the group <me>. More...
 
void Text (const Standard_CString AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). The other attributes have the following default values: AAngle : PI / 2. ATp : TP_RIGHT AHta : HTA_LEFT AVta : VTA_BOTTOM. More...
 
void Text (const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Quantity_PlaneAngle AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). AAngle : Orientation of the text (with respect to the horizontal). More...
 
void Text (const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). The other attributes have the following default values: AAngle : PI / 2. ATp : TP_RIGHT AHta : HTA_LEFT AVta : VTA_BOTTOM. More...
 
void AddPrimitiveArray (const Handle< Graphic3d_ArrayOfPrimitives > &thePrim, const Standard_Boolean theToEvalMinMax=Standard_True)
 Adds an array of primitives for display. More...
 
void Marker (const Graphic3d_Vertex &thePoint, const Standard_Boolean theToEvalMinMax=Standard_True)
 Creates a primitive array with single marker using AddPrimitiveArray(). More...
 
Standard_Boolean IsGroupPrimitivesAspectSet (const Graphic3d_GroupAspect theAspect) const
 Returns TRUE if aspect is set for the group. More...
 
void GroupPrimitivesAspect (const Handle< Graphic3d_AspectLine3d > &CTXL, const Handle< Graphic3d_AspectText3d > &CTXT, const Handle< Graphic3d_AspectMarker3d > &CTXM, const Handle< Graphic3d_AspectFillArea3d > &CTXF) const
 Returns the context of all the primitives of the group. More...
 
void PrimitivesAspect (const Handle< Graphic3d_AspectLine3d > &CTXL, const Handle< Graphic3d_AspectText3d > &CTXT, const Handle< Graphic3d_AspectMarker3d > &CTXM, const Handle< Graphic3d_AspectFillArea3d > &CTXF) const
 Returns the last inserted context in the group <me> foreach kind of primitives. More...
 
Standard_Boolean ContainsFacet () const
 Returns Standard_True if the group <me> contains Polygons, Triangles or Quadrangles. More...
 
Standard_Boolean IsDeleted () const
 Returns Standard_True if the group <me> is deleted. <me> is deleted after the call Remove (me) or the associated structure is deleted. More...
 
Standard_Boolean IsEmpty () const
 Returns Standard_True if the group <me> is empty. More...
 
void MinMaxValues (Standard_Real &XMin, Standard_Real &YMin, Standard_Real &ZMin, Standard_Real &XMax, Standard_Real &YMax, Standard_Real &ZMax) const
 Returns the coordinates of the boundary box of the group <me>. More...
 
const Graphic3d_BndBox4fBoundingBox () const
 Returns boundary box of the group <me> without transformation applied,. More...
 
Graphic3d_BndBox4fChangeBoundingBox ()
 Returns non-const boundary box of the group <me> without transformation applied,. More...
 
Handle< Graphic3d_StructureStructure () const
 Returns the structure containing the group <me>. More...
 
void SetClosed (const Standard_Boolean theIsClosed)
 Changes property shown that primitive arrays within this group form closed volume (do no contain open shells). More...
 
Standard_Boolean IsClosed () const
 Return true if primitive arrays within this graphic group form closed volume (do no contain open shells). More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. 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 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_Group ()
 
- Protected Member Functions inherited from Graphic3d_Group
 Graphic3d_Group (const Handle< Graphic3d_Structure > &theStructure)
 Creates a group in the structure <AStructure>. More...
 

Protected Attributes

OpenGl_AspectLinemyAspectLine
 
OpenGl_AspectFacemyAspectFace
 
OpenGl_AspectMarkermyAspectMarker
 
OpenGl_AspectTextmyAspectText
 
OpenGl_ElementNodemyFirst
 
OpenGl_ElementNodemyLast
 
Standard_Boolean myIsRaytracable
 
- Protected Attributes inherited from Graphic3d_Group
Graphic3d_CBitFields4 myCBitFields
 
Graphic3d_StructurePtr myStructure
 
Graphic3d_BndBox4f myBounds
 
Standard_Boolean myIsClosed
 
Graphic3d_CAspectLine ContextLine
 
Graphic3d_CAspectFillArea ContextFillArea
 
Graphic3d_CAspectMarker ContextMarker
 
Graphic3d_CAspectText ContextText
 

Detailed Description

Implementation of low-level graphic group.

Constructor & Destructor Documentation

OpenGl_Group::OpenGl_Group ( const Handle< Graphic3d_Structure > &  theStruct)

Create empty group. Will throw exception if not created by OpenGl_Structure.

virtual OpenGl_Group::~OpenGl_Group ( )
protectedvirtual

Member Function Documentation

void OpenGl_Group::AddElement ( OpenGl_Element theElem)
virtual void OpenGl_Group::AddPrimitiveArray ( const Graphic3d_TypeOfPrimitiveArray  theType,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
const Handle< Graphic3d_Buffer > &  theAttribs,
const Handle< Graphic3d_BoundBuffer > &  theBounds,
const Standard_Boolean  theToEvalMinMax 
)
virtual

Add primitive array element.

Reimplemented from Graphic3d_Group.

const OpenGl_AspectFace* OpenGl_Group::AspectFace ( ) const
inline

Returns OpenGL face aspect.

CALL_DEF_CONTEXTLINE& OpenGl_Group::ChangeContextLine ( )
inline

Accessor to line aspect (to be removed)

virtual void OpenGl_Group::Clear ( const Standard_Boolean  theUpdateStructureMgr)
virtual

Supress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass Standard_False as <theUpdateStructureMgr>. This used on context and viewer destruction, when the pointer to structure manager in Graphic3d_Structure could be already released (pointers are used here to avoid handle cross-reference);.

Reimplemented from Graphic3d_Group.

const OpenGl_ElementNode* OpenGl_Group::FirstNode ( ) const
inline

Returns first OpenGL element node of the group.

OpenGl_Structure* OpenGl_Group::GlStruct ( ) const
inline
Standard_Boolean OpenGl_Group::IsRaytracable ( ) const
inline

Is the group ray-tracable (contains ray-tracable elements)?

virtual void OpenGl_Group::Release ( const Handle< OpenGl_Context > &  theGlCtx)
virtual
virtual void OpenGl_Group::Render ( const Handle< OpenGl_Workspace > &  theWorkspace) const
virtual
virtual void OpenGl_Group::SetFlippingOptions ( const Standard_Boolean  theIsEnabled,
const gp_Ax2 theRefPlane 
)
virtual

Add flipping element.

Implements Graphic3d_Group.

virtual void OpenGl_Group::SetStencilTestOptions ( const Standard_Boolean  theIsEnabled)
virtual

Add stencil test element.

Implements Graphic3d_Group.

virtual void OpenGl_Group::Text ( const Standard_CString  theTextUtf,
const Graphic3d_Vertex thePoint,
const Standard_Real  theHeight,
const Quantity_PlaneAngle  theAngle,
const Graphic3d_TextPath  theTp,
const Graphic3d_HorizontalTextAlignment  theHta,
const Graphic3d_VerticalTextAlignment  theVta,
const Standard_Boolean  theToEvalMinMax 
)
virtual

Add text element.

Reimplemented from Graphic3d_Group.

virtual void OpenGl_Group::UpdateAspectFace ( const Standard_Boolean  theIsGlobal)
virtual

Update fill aspect.

Implements Graphic3d_Group.

virtual void OpenGl_Group::UpdateAspectLine ( const Standard_Boolean  theIsGlobal)
virtual

Update line aspect.

Implements Graphic3d_Group.

virtual void OpenGl_Group::UpdateAspectMarker ( const Standard_Boolean  theIsGlobal)
virtual

Update marker aspect.

Implements Graphic3d_Group.

virtual void OpenGl_Group::UpdateAspectText ( const Standard_Boolean  theIsGlobal)
virtual

Update text aspect.

Implements Graphic3d_Group.

virtual void OpenGl_Group::UserDraw ( const Standard_Address  theObject,
const Standard_Boolean  theToEvalMinMax,
const Standard_Boolean  theContainsFacet 
)
virtual

Add UserDraw element using obsolete API.

Reimplemented from Graphic3d_Group.

Field Documentation

OpenGl_AspectFace* OpenGl_Group::myAspectFace
protected
OpenGl_AspectLine* OpenGl_Group::myAspectLine
protected
OpenGl_AspectMarker* OpenGl_Group::myAspectMarker
protected
OpenGl_AspectText* OpenGl_Group::myAspectText
protected
OpenGl_ElementNode* OpenGl_Group::myFirst
protected
Standard_Boolean OpenGl_Group::myIsRaytracable
protected
OpenGl_ElementNode* OpenGl_Group::myLast
protected

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