Open CASCADE Technology 7.9.0
|
This class allows the definition of groups of primitives inside of graphic objects (presentations). A group contains the primitives and attributes for which the range is limited to this group. The primitives of a group can be globally suppressed. More...
#include <Graphic3d_Group.hxx>
Public Member Functions | |
virtual void | Clear (const Standard_Boolean theUpdateStructureMgr=Standard_True) |
Suppress 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);. | |
virtual | ~Graphic3d_Group () |
Suppress the group <me> in the structure. | |
void | Remove () |
Suppress 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) | |
virtual Handle< Graphic3d_Aspects > | Aspects () const =0 |
Return fill area aspect. | |
virtual void | SetGroupPrimitivesAspect (const Handle< Graphic3d_Aspects > &theAspect)=0 |
Modifies the context for all the face primitives of the group. | |
virtual void | SetPrimitivesAspect (const Handle< Graphic3d_Aspects > &theAspect)=0 |
Modifies the current context of the group to give another aspect for all the primitives created after this call in the group. | |
virtual void | SynchronizeAspects ()=0 |
Update presentation aspects after their modification. | |
virtual void | ReplaceAspects (const Graphic3d_MapOfAspectsToAspects &theMap)=0 |
Replace aspects specified in the replacement map. | |
virtual void | AddText (const Handle< Graphic3d_Text > &theTextParams, const Standard_Boolean theToEvalMinMax=Standard_True) |
Adds a text for display. | |
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=Standard_True) |
Adds an array of primitives for display. | |
void | AddPrimitiveArray (const Handle< Graphic3d_ArrayOfPrimitives > &thePrim, const Standard_Boolean theToEvalMinMax=Standard_True) |
Adds an array of primitives for display. | |
virtual void | SetStencilTestOptions (const Standard_Boolean theIsEnabled)=0 |
sets the stencil test to theIsEnabled state; | |
virtual void | SetFlippingOptions (const Standard_Boolean theIsEnabled, const gp_Ax2 &theRefPlane)=0 |
sets the flipping to theIsEnabled state. | |
const gp_Trsf & | Transformation () const |
Return transformation. | |
virtual void | SetTransformation (const gp_Trsf &theTrsf) |
Assign transformation. | |
const Handle< Graphic3d_TransformPers > & | TransformPersistence () const |
Return transformation persistence. | |
virtual void | SetTransformPersistence (const Handle< Graphic3d_TransformPers > &theTrsfPers) |
Set transformation persistence. | |
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. | |
Standard_Boolean | IsEmpty () const |
Returns Standard_True if the group <me> is empty. | |
void | MinMaxValues (Standard_Real &theXMin, Standard_Real &theYMin, Standard_Real &theZMin, Standard_Real &theXMax, Standard_Real &theYMax, Standard_Real &theZMax) const |
Returns the coordinates of the boundary box of the group. | |
void | SetMinMaxValues (const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin, const Standard_Real theXMax, const Standard_Real theYMax, const Standard_Real theZMax) |
Sets the coordinates of the boundary box of the group. | |
const Graphic3d_BndBox4f & | BoundingBox () const |
Returns boundary box of the group <me> without transformation applied,. | |
Graphic3d_BndBox4f & | ChangeBoundingBox () |
Returns non-const boundary box of the group <me> without transformation applied,. | |
Handle< Graphic3d_Structure > | Structure () const |
Returns the structure containing the group <me>. | |
void | SetClosed (const bool theIsClosed) |
Changes property shown that primitive arrays within this group form closed volume (do no contain open shells). | |
bool | IsClosed () const |
Return true if primitive arrays within this graphic group form closed volume (do no contain open shells). | |
![]() | |
Standard_Transient () | |
Empty constructor. | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
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. | |
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. | |
Standard_Transient * | This () 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. | |
Standard_Integer | GetRefCount () const noexcept |
Get the reference counter of this object. | |
void | IncrementRefCounter () noexcept |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () noexcept |
Decrements the reference counter of this object; returns the decremented value. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
obsolete methods | |
Deprecated method pass Graphic3d_ArrayOfPoints to const Standard_Boolean | theToEvalMinMax = Standard_True) |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex & | APoint |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real | AHeight |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real | AAngle |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath | ATp |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment | AHta |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment | AVta |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean | EvalMinMax = Standard_True) |
current transform persistence | |
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Boolean | EvalMinMax = Standard_True) |
current transform persistence | |
Deprecated method use const gp_Ax2 & | theOrientation |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real | theHeight |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real | theAngle |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath | theTp |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment | theHTA |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment | theVTA |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean | theToEvalMinMax = Standard_True |
current transform persistence | |
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean const Standard_Boolean | theHasOwnAnchor = Standard_True) |
current transform persistence | |
Handle< Graphic3d_TransformPers > | myTrsfPers |
current transform persistence | |
Graphic3d_Structure * | myStructure |
pointer to the parent structure | |
Graphic3d_BndBox4f | myBounds |
bounding box | |
gp_Trsf | myTrsf |
group transformation | |
bool | myIsClosed |
flag indicating closed volume | |
Deprecated method | Marker () |
Deprecated method pass Graphic3d_ArrayOfPoints to | AddPrimitiveArray () instead") 1 void Marker( const Graphic3d_Vertex & thePoint |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
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). | |
Deprecated method use | AddText () instead of it") 1 virtual void Text( const Standard_CString AText |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
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. | |
Deprecated method use | AddText () instead of it") 1 void Text( const Standard_CString AText |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
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). | |
Deprecated method use | AddText () instead of it") 1 void Text( const TCollection_ExtendedString & AText |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
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. | |
Deprecated method use | AddText () instead of it") 1 void Text( const TCollection_ExtendedString & AText |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
Creates the string <theText> at orientation <theOrientation> in 3D space. | |
Deprecated method use | AddText () instead of it") 1 virtual void Text( const Standard_CString theTextUtf |
current transform persistence | |
Deprecated method | Text () with obsolete arguments |
Creates the string <theText> at orientation <theOrientation> in 3D space. | |
Deprecated method use | AddText () instead of it") 1 virtual void Text( const TCollection_ExtendedString & theText |
current transform persistence | |
virtual void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
Dumps the content of me into the stream. | |
Graphic3d_Group (const Handle< Graphic3d_Structure > &theStructure) | |
Creates a group in the structure <AStructure>. | |
void | Update () const |
Calls the Update method of the StructureManager which contains the associated Structure of the Group <me>. | |
Additional Inherited Members | |
typedef void | base_type |
Returns a type descriptor about this object. | |
static constexpr const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
This class allows the definition of groups of primitives inside of graphic objects (presentations). A group contains the primitives and attributes for which the range is limited to this group. The primitives of a group can be globally suppressed.
There are two main group usage models:
1) Non-modifiable, or unbounded, group ('black box'). Developers can repeat a sequence of SetPrimitivesAspect() with AddPrimitiveArray() methods arbitrary number of times to define arbitrary number of primitive "blocks" each having individual aspect values. Any modification of such a group is forbidden, as aspects and primitives are mixed in memory without any high-level logical structure, and any modification is very likely to result in corruption of the group internal data. It is necessary to recreate such a group as a whole when some attribute should be changed. (for example, in terms of AIS it is necessary to re-Compute() the whole presentation each time). 2) Bounded group. Developers should specify the necessary group aspects with help of SetGroupPrimitivesAspect() and then add primitives to the group. Such a group have simplified organization in memory (a single block of attributes followed by a block of primitives) and therefore it can be modified, if it is necessary to change parameters of some aspect that has already been set, using methods: IsGroupPrimitivesAspectSet() to detect which aspect was set for primitives; GroupPrimitivesAspect() to read current aspect values and SetGroupPrimitivesAspect() to set new values.
Developers are strongly recommended to take all the above into account when filling Graphic3d_Group with aspects and primitives and choose the group usage model beforehand out of application needs. Note that some Graphic3d_Group class virtual methods contain only base implementation that is extended by the descendant class in OpenGl package.
|
virtual |
Suppress the group <me> in the structure.
|
protected |
Creates a group in the structure <AStructure>.
Deprecated method pass Graphic3d_ArrayOfPoints to Graphic3d_Group::AddPrimitiveArray | ( | ) | const & |
current transform persistence
|
virtual |
Adds an array of primitives for display.
Reimplemented in OpenGl_Group.
void Graphic3d_Group::AddPrimitiveArray | ( | const Handle< Graphic3d_ArrayOfPrimitives > & | thePrim, |
const Standard_Boolean | theToEvalMinMax = Standard_True ) |
Adds an array of primitives for display.
Deprecated method use Graphic3d_Group::AddText | ( | ) | const |
current transform persistence
Deprecated method use Graphic3d_Group::AddText | ( | ) | const |
current transform persistence
Deprecated method use Graphic3d_Group::AddText | ( | ) | const & |
current transform persistence
Deprecated method use Graphic3d_Group::AddText | ( | ) | const |
current transform persistence
Deprecated method use Graphic3d_Group::AddText | ( | ) | const & |
current transform persistence
Deprecated method use Graphic3d_Group::AddText | ( | ) | const & |
current transform persistence
|
virtual |
Adds a text for display.
Reimplemented in OpenGl_Group.
|
pure virtual |
Return fill area aspect.
Implemented in OpenGl_Group.
|
inline |
Returns boundary box of the group <me> without transformation applied,.
|
inline |
Returns non-const boundary box of the group <me> without transformation applied,.
|
virtual |
Suppress 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 in OpenGl_Group.
|
virtual |
Dumps the content of me into the stream.
Reimplemented in OpenGl_Group.
|
inline |
Return true if primitive arrays within this graphic group form closed volume (do no contain open shells).
Standard_Boolean Graphic3d_Group::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.
Standard_Boolean Graphic3d_Group::IsEmpty | ( | ) | const |
Returns Standard_True if the group <me> is empty.
Deprecated method Graphic3d_Group::Marker | ( | ) |
void Graphic3d_Group::MinMaxValues | ( | Standard_Real & | theXMin, |
Standard_Real & | theYMin, | ||
Standard_Real & | theZMin, | ||
Standard_Real & | theXMax, | ||
Standard_Real & | theYMax, | ||
Standard_Real & | theZMax ) const |
Returns the coordinates of the boundary box of the group.
void Graphic3d_Group::Remove | ( | ) |
Suppress 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)
|
pure virtual |
Replace aspects specified in the replacement map.
Implemented in OpenGl_Group.
|
inline |
Changes property shown that primitive arrays within this group form closed volume (do no contain open shells).
|
pure virtual |
sets the flipping to theIsEnabled state.
Implemented in OpenGl_Group.
|
pure virtual |
Modifies the context for all the face primitives of the group.
Implemented in OpenGl_Group.
void Graphic3d_Group::SetMinMaxValues | ( | const Standard_Real | theXMin, |
const Standard_Real | theYMin, | ||
const Standard_Real | theZMin, | ||
const Standard_Real | theXMax, | ||
const Standard_Real | theYMax, | ||
const Standard_Real | theZMax ) |
Sets the coordinates of the boundary box of the group.
|
pure virtual |
Modifies the current context of the group to give another aspect for all the primitives created after this call in the group.
Implemented in OpenGl_Group.
|
pure virtual |
sets the stencil test to theIsEnabled state;
Implemented in OpenGl_Group.
|
inlinevirtual |
Assign transformation.
|
virtual |
Set transformation persistence.
Handle< Graphic3d_Structure > Graphic3d_Group::Structure | ( | ) | const |
Returns the structure containing the group <me>.
|
pure virtual |
Update presentation aspects after their modification.
Implemented in OpenGl_Group.
Deprecated method Graphic3d_Group::Text | ( | ) |
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).
Deprecated method Graphic3d_Group::Text | ( | ) |
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.
Deprecated method Graphic3d_Group::Text | ( | ) |
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).
Deprecated method Graphic3d_Group::Text | ( | ) |
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.
Deprecated method Graphic3d_Group::Text | ( | ) |
Creates the string <theText> at orientation <theOrientation> in 3D space.
Deprecated method Graphic3d_Group::Text | ( | ) |
Creates the string <theText> at orientation <theOrientation> in 3D space.
|
inline |
Return transformation.
|
inline |
Return transformation persistence.
|
protected |
Calls the Update method of the StructureManager which contains the associated Structure of the Group <me>.
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real Graphic3d_Group::AAngle |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real Graphic3d_Group::AHeight |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment Graphic3d_Group::AHta |
current transform persistence
Deprecated method use const Graphic3d_Vertex & Graphic3d_Group::APoint |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath Graphic3d_Group::ATp |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment Graphic3d_Group::AVta |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Boolean Graphic3d_Group::EvalMinMax = Standard_True) |
current transform persistence
Deprecated method use const Graphic3d_Vertex const Standard_Real const Standard_Boolean Graphic3d_Group::EvalMinMax = Standard_True) |
current transform persistence
|
protected |
bounding box
|
protected |
flag indicating closed volume
|
protected |
pointer to the parent structure
|
protected |
group transformation
|
protected |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real Graphic3d_Group::theAngle |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean const Standard_Boolean Graphic3d_Group::theHasOwnAnchor = Standard_True) |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real Graphic3d_Group::theHeight |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment Graphic3d_Group::theHTA |
current transform persistence
Deprecated method use const gp_Ax2 & Graphic3d_Group::theOrientation |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean Graphic3d_Group::theToEvalMinMax = Standard_True) |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const Standard_Boolean Graphic3d_Group::theToEvalMinMax = Standard_True |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath Graphic3d_Group::theTp |
current transform persistence
Deprecated method use const gp_Ax2 const Standard_Real const Standard_Real const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment Graphic3d_Group::theVTA |
current transform persistence