// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Graphic3d_Structure_HeaderFile #define _Graphic3d_Structure_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Structure_HeaderFile #include #endif #ifndef _Graphic3d_CStructure_HeaderFile #include #endif #ifndef _Aspect_GenId_HeaderFile #include #endif #ifndef _TColStd_SequenceOfAddress_HeaderFile #include #endif #ifndef _Graphic3d_SequenceOfGroup_HeaderFile #include #endif #ifndef _Handle_Graphic3d_GraphicDriver_HeaderFile #include #endif #ifndef _Quantity_Color_HeaderFile #include #endif #ifndef _Aspect_TypeOfHighlightMethod_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Graphic3d_TypeOfStructure_HeaderFile #include #endif #ifndef _MMgt_TShared_HeaderFile #include #endif #ifndef _Handle_Graphic3d_StructureManager_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Handle_Graphic3d_AspectLine3d_HeaderFile #include #endif #ifndef _Handle_Graphic3d_AspectFillArea3d_HeaderFile #include #endif #ifndef _Handle_Graphic3d_AspectText3d_HeaderFile #include #endif #ifndef _Handle_Graphic3d_AspectMarker3d_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Handle_Graphic3d_DataStructureManager_HeaderFile #include #endif #ifndef _Graphic3d_TypeOfPrimitive_HeaderFile #include #endif #ifndef _Graphic3d_TypeOfConnection_HeaderFile #include #endif #ifndef _Graphic3d_TypeOfComposition_HeaderFile #include #endif #ifndef _Graphic3d_TransModeFlags_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Group_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Plotter_HeaderFile #include #endif class Graphic3d_GraphicDriver; class Graphic3d_PriorityDefinitionError; class Graphic3d_StructureDefinitionError; class Graphic3d_TransformError; class Graphic3d_Group; class Graphic3d_StructureManager; class Quantity_Color; class Graphic3d_AspectLine3d; class Graphic3d_AspectFillArea3d; class Graphic3d_AspectText3d; class Graphic3d_AspectMarker3d; class Graphic3d_DataStructureManager; class TColStd_Array2OfReal; class Graphic3d_VertexNC; class Graphic3d_Vector; class Graphic3d_SequenceOfGroup; class Graphic3d_MapOfStructure; class gp_Pnt; class Graphic3d_Plotter; class Graphic3d_Vertex; //! This class allows the definition a graphic object.
//! This graphic structure can be displayed,
//! erased, or highlighted.
//! This graphic structure can be connected with
//! another graphic structure.
//! Keywords: Structure, StructureManager, Display, Erase, Highlight,
//! UnHighlight, Visible, Priority, Selectable, Visible,
//! Visual, Connection, Ancestors, Descendants, Transformation
class Graphic3d_Structure : public MMgt_TShared { public: //! Creates a graphic object in the manager .
//! It will appear in all the views of the visualiser.
//! Warning: The default values AspectLine, AspectFillArea,
//! AspectText and AspectMarker are NOT applied to the
//! structure.
//! The structure is not displayed when it is created.
Standard_EXPORT Graphic3d_Structure(const Handle(Graphic3d_StructureManager)& AManager); //! if WithDestruction == Standard_True then
//! suppress all the groups of primitives in the structure.
//! and it is mandatory to create a new group in .
//! if WithDestruction == Standard_False then
//! clears all the groups of primitives in the structure.
//! and all the groups are conserved and empty.
//! They will be erased at the next screen update.
//! The structure itself is conserved.
//! The transformation and the attributes of are conserved.
//! The childs of are conserved.
Standard_EXPORT virtual void Clear(const Standard_Boolean WithDestruction = Standard_True) ; //! Suppresses the structure .
//! It will be erased at the next screen update.
Standard_EXPORT virtual void Destroy() ; ~Graphic3d_Structure() { Destroy(); } //! Displays the structure in all the views of
//! the visualiser.
Standard_EXPORT virtual void Display() ; //! Displays the structure in all the views of
//! the visualiser, while modifying its current priority.
//! Note: Display Priorities
//! Structure display priorities control the order in which
//! structures are redrawn. When you display a
//! structure, you specify its priority. The lower the value,
//! the lower the display priority. When the display is
//! regenerated, the structures with the lowest priority
//! are drawn first. For structures with the same display
//! priority, the order in which they were displayed
//! determines the drawing order. Open CASCADE
//! supports 11 structure display priorities, 0 to 10.
//! Warning: Raises PriorityDefinitionError if is
//! greater than 10 or a negative value.
Standard_EXPORT void Display(const Standard_Integer Priority) ; //! Returns the current display priority for the
//! structure .
Standard_EXPORT Standard_Integer DisplayPriority() const; //! Erases the structure in all the views
//! of the visualiser.
Standard_EXPORT virtual void Erase() ; //! Highlights the structure in all the
//! views of the visualiser, using the following methods:
Standard_EXPORT void Highlight(const Aspect_TypeOfHighlightMethod Method) ; //! Suppress the structure .
//! It will be erased at the next screen update.
//! Warning: No more graphic operations in after this call.
//! Category: Methods to modify the class definition
Standard_EXPORT void Remove() ; //! Modifies the highlight color for the Highlight method
//! with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
Standard_EXPORT void SetHighlightColor(const Quantity_Color& AColor) ; //! Modifies the coordinates of the boundary box
//! of the structure .
//! if is Standard_True then is infinite and
//! the MinMaxValues method or the MinMaxCoord method return :
//! XMin = YMin = ZMin = RealFirst ().
//! XMax = YMax = ZMax = RealLast ().
//! By default, is not infinite but empty.
Standard_EXPORT void SetInfiniteState(const Standard_Boolean AFlag) ; //! Modifies the order of displaying the structure.
//! Values are between 0 et 10.
//! The priority 10 being displayed first.
//! The default value is 5
//! Category: Methods to modify the class definition
//! Warning: If is displayed then the SetDisplayPriority
//! method erase and display with the
//! new priority.
//! Raises PriorityDefinitionError if is
//! greater than 10 or a negative value.
Standard_EXPORT void SetDisplayPriority(const Standard_Integer Priority) ; //! Reset the current priority of the structure to the
//! previous priority.
//! Category: Methods to modify the class definition
//! Warning: If is displayed then the SetDisplayPriority
//! method erase and display with the
//! previous priority.
Standard_EXPORT void ResetDisplayPriority() ; //! Modifies the detectability indicator to Standard_True
//! or Standard_False for the structure .
//! The default value at the definition of is
//! Standard_True.
Standard_EXPORT void SetPick(const Standard_Boolean AValue) ; //! Modifies the default attributes for lines
//! in the structure .
Standard_EXPORT void SetPrimitivesAspect(const Handle(Graphic3d_AspectLine3d)& CTX) ; //! Modifies the default attributes for faces
//! in the structure .
Standard_EXPORT void SetPrimitivesAspect(const Handle(Graphic3d_AspectFillArea3d)& CTX) ; //! Modifies the default attributes for text
//! in the structure .
Standard_EXPORT void SetPrimitivesAspect(const Handle(Graphic3d_AspectText3d)& CTX) ; //! Modifies the default attributes for markers
//! in the structure .
Standard_EXPORT void SetPrimitivesAspect(const Handle(Graphic3d_AspectMarker3d)& CTX) ; //! Modifies the visibility indicator to Standard_True or
//! Standard_False for the structure .
//! The default value at the definition of is
//! Standard_True.
Standard_EXPORT void SetVisible(const Standard_Boolean AValue) ; //! Moves the graphic object in the manager .
//! If is Standard_True then all the connected
//! graphic objects to are moved.
Standard_EXPORT void SetManager(const Handle(Graphic3d_StructureManager)& AManager,const Standard_Boolean WithPropagation = Standard_False) ; //! Modifies the visualisation mode for the structure .
Standard_EXPORT virtual void SetVisual(const Graphic3d_TypeOfStructure AVisual) ; //! Modifies the minimum and maximum zoom coefficients
//! for the structure .
//! The default value at the definition of is unlimited.
//! Category: Methods to modify the class definition
//! Warning: Raises StructureDefinitionError if is
//! greater than or if or
//! is a negative value.
Standard_EXPORT void SetZoomLimit(const Standard_Real LimitInf,const Standard_Real LimitSup) ; //! Suppresses the highlight for the structure
//! in all the views of the visualiser.
Standard_EXPORT void UnHighlight() ; //! Returns the new Structure defined for the new visualization
Standard_EXPORT virtual Handle_Graphic3d_Structure Compute(const Handle(Graphic3d_DataStructureManager)& aProjector) ; //! Returns the new Structure defined for the new visualization
Standard_EXPORT virtual Handle_Graphic3d_Structure Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,const TColStd_Array2OfReal& AMatrix) ; //! Returns the new Structure defined for the new visualization
Standard_EXPORT virtual void Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,Handle(Graphic3d_Structure)& aStructure) ; //! Returns the new Structure defined for the new visualization
Standard_EXPORT virtual void Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,const TColStd_Array2OfReal& AMatrix,Handle(Graphic3d_Structure)& aStructure) ; //! Forces a new construction of the structure
//! if is displayed and TOS_COMPUTED.
Standard_EXPORT void ReCompute() ; //! Forces a new construction of the structure
//! if is displayed in and TOS_COMPUTED.
Standard_EXPORT void ReCompute(const Handle(Graphic3d_DataStructureManager)& aProjector) ; //! Returns Standard_True if the structure contains
//! Polygons, Triangles or Quadrangles.
Standard_EXPORT Standard_Boolean ContainsFacet() const; //! Explores a structure element of .
//! Returns Standard_True if the exploration succeded and
//! Standard_False if the exploration is done or if the
//! specified structure element is not in the structure.
//! contains the coordinates, the normal and
//! the color of the vertex found in the structure element.
//! contains the normal of the face.
//! Warning: - The structure element number is given by
//! Visual3d_ViewManager::Pick method.
//! - The primitive type is given by
//! Graphic3d_Structure::Type method.
//! - The normal is (0.0, 0.0, 0.0) when the normal is not
//! specified in the structure element.
//! - The color is (0.0, 0.0, 0.0) when the color is not
//! specified in the structure element.
//! - To initialize the exploration, you have to call the
//! Graphic3d_Structure::Type method before this method.
Standard_EXPORT Standard_Boolean Exploration(const Standard_Integer ElementNumber,Graphic3d_VertexNC& AVertex,Graphic3d_Vector& AVector) const; //! Returns the values of the current default attributes.
Standard_EXPORT Handle_Graphic3d_AspectFillArea3d FillArea3dAspect() const; //! Returns the groups sequence included in the structure (internal storage).
Standard_EXPORT const Graphic3d_SequenceOfGroup& Groups() const; //! Returns the current number of groups in the
//! structure .
Standard_EXPORT Standard_Integer NumberOfGroups() const; //! Returns the highlight color for the Highlight method
//! with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
Standard_EXPORT Quantity_Color HighlightColor() const; //! Returns Standard_True if the structure is deleted.
//! is deleted after the call Remove (me).
Standard_EXPORT Standard_Boolean IsDeleted() const; //! Returns the display indicator for the structure .
Standard_EXPORT virtual Standard_Boolean IsDisplayed() const; //! Returns Standard_True if the structure is empty.
//! Warning: A structure is empty if :
//! it do not have group or all the groups are empties
//! and it do not have descendant or all the descendants
//! are empties.
Standard_EXPORT Standard_Boolean IsEmpty() const; //! Returns Standard_True if the structure is infinite.
Standard_EXPORT Standard_Boolean IsInfinite() const; //! Returns the highlight indicator for the structure .
Standard_EXPORT virtual Standard_Boolean IsHighlighted() const; //! Returns the detectability indicator for the structure .
Standard_EXPORT Standard_Boolean IsSelectable() const; //! Returns Standard_True if the structure is rotated.
//! <=> The transformation != Identity, != Scale, != Translation.
Standard_EXPORT Standard_Boolean IsRotated() const; //! Returns Standard_True if the structure is transformed.
//! <=> The transformation != Identity.
Standard_EXPORT Standard_Boolean IsTransformed() const; //! Returns the visibility indicator for the structure .
Standard_EXPORT Standard_Boolean IsVisible() const; //! Returns the values of the current default attributes.
Standard_EXPORT Handle_Graphic3d_AspectLine3d Line3dAspect() const; //! Returns the current group of graphic attributes used
//! for 3d marker primitives.
Standard_EXPORT Handle_Graphic3d_AspectMarker3d Marker3dAspect() const; //! Returns the coordinates of the boundary box
//! of the structure .
//! Warning: If the structure is empty or infinite then :
//! XMin = YMin = ZMin = RealFirst ().
//! XMax = YMax = ZMax = RealLast ().
Standard_EXPORT void MinMaxValues(Standard_Real& XMin,Standard_Real& YMin,Standard_Real& ZMin,Standard_Real& XMax,Standard_Real& YMax,Standard_Real& ZMax) const; //! Returns the current values of the default attributes.
Standard_EXPORT void PrimitivesAspect(Handle(Graphic3d_AspectLine3d)& CTXL,Handle(Graphic3d_AspectText3d)& CTXT,Handle(Graphic3d_AspectMarker3d)& CTXM,Handle(Graphic3d_AspectFillArea3d)& CTXF) const; //! Returns the values of the current default attributes.
Standard_EXPORT Handle_Graphic3d_AspectText3d Text3dAspect() const; //! Returns the primitive type stored in the structure
//! element .
//! Initialises the exploration of this primitive.
//! If the structure element is not a primitive, returns
//! Graphic3d_TOP_UNDEFINED.
//! Warning: The structure element number is given by
//! Visual3d_ViewManager::Pick method.
Standard_EXPORT Graphic3d_TypeOfPrimitive Type(const Standard_Integer ElementNumber) const; //! Returns the visualisation mode for the structure .
Standard_EXPORT Graphic3d_TypeOfStructure Visual() const; //! Returns Standard_True if the connection is possible between
//! and without a creation
//! of a cycle.
Standard_EXPORT static Standard_Boolean AcceptConnection(const Handle(Graphic3d_Structure)& AStructure1,const Handle(Graphic3d_Structure)& AStructure2,const Graphic3d_TypeOfConnection AType) ; //! Returns the group of structures to which is connected.
Standard_EXPORT void Ancestors(Graphic3d_MapOfStructure& SG) const; //! If Atype is TOC_DESCENDANT then add
//! as a child structure of .
//! If Atype is TOC_ANCESTOR then add
//! as a parent structure of .
//! The connection propagates Display, Highlight, Erase,
//! Remove, and stacks the transformations.
//! No connection if the graph of the structures
//! contains a cycle and is Standard_True;
Standard_EXPORT void Connect(const Handle(Graphic3d_Structure)& AStructure,const Graphic3d_TypeOfConnection AType,const Standard_Boolean WithCheck = Standard_False) ; //! Returns the group of structures connected to .
Standard_EXPORT void Descendants(Graphic3d_MapOfStructure& SG) const; //! Suppress the connection between and .
Standard_EXPORT void Disconnect(const Handle(Graphic3d_Structure)& AStructure) ; //! If Atype is TOC_DESCENDANT then suppress all
//! the connections with the child structures of .
//! If Atype is TOC_ANCESTOR then suppress all
//! the connections with the parent structures of .
Standard_EXPORT void DisconnectAll(const Graphic3d_TypeOfConnection AType) ; //! Returns the group of structures :
//! - directly or indirectly connected to if the
//! TypeOfConnection == TOC_DESCENDANT
//! - to which is directly or indirectly connected
//! if the TypeOfConnection == TOC_ANCESTOR
Standard_EXPORT static void Network(const Handle(Graphic3d_Structure)& AStructure,const Graphic3d_TypeOfConnection AType,Graphic3d_MapOfStructure& ASet) ; Standard_EXPORT void SetOwner(const Standard_Address Owner) ; Standard_EXPORT Standard_Address Owner() const; Standard_EXPORT void SetHLRValidation(const Standard_Boolean AFlag) ; Standard_EXPORT Standard_Boolean HLRValidation() const; //! Returns the type of composition applied to matrices
//! of transformation of .
Standard_EXPORT Graphic3d_TypeOfComposition Composition() const; //! Modifies the current local modelling transformation
//! in the structure .
Standard_EXPORT void SetTransform(const TColStd_Array2OfReal& AMatrix,const Graphic3d_TypeOfComposition AType) ; //! Returns the transformation associated with
//! the structure .
Standard_EXPORT void Transform(TColStd_Array2OfReal& AMatrix) const; //! Modifies the current modelling transform persistence (pan, zoom or rotate)
Standard_EXPORT void SetTransformPersistence(const Graphic3d_TransModeFlags& AFlag,const gp_Pnt& APoint) ; Standard_EXPORT void SetTransformPersistence(const Graphic3d_TransModeFlags& AFlag) ; //! Get the current modelling transform persistence (pan, zoom or rotate)
Standard_EXPORT Graphic3d_TransModeFlags TransformPersistenceMode() const; //! Get the current point of relative modelling transform persistence
Standard_EXPORT gp_Pnt TransformPersistencePoint() const; Standard_EXPORT Graphic3d_TypeOfStructure ComputeVisual() const; //! Prints informations about the structure .
Standard_EXPORT void Exploration() const; //! Clears the structure .
Standard_EXPORT void GraphicClear(const Standard_Boolean WithDestruction) ; Standard_EXPORT void GraphicConnect(const Handle(Graphic3d_Structure)& ADaughter) ; Standard_EXPORT void GraphicDisconnect(const Handle(Graphic3d_Structure)& ADaughter) ; //! Highlights the structure .
Standard_EXPORT void GraphicHighlight(const Aspect_TypeOfHighlightMethod Method) ; Standard_EXPORT void GraphicTransform(const TColStd_Array2OfReal& AMatrix) ; //! Suppress the highlight for the structure .
Standard_EXPORT void GraphicUnHighlight() ; //! Returns the identification number of the structure .
Standard_EXPORT Standard_Integer Identification() const; Standard_EXPORT virtual void Plot(const Handle(Graphic3d_Plotter)& aPlotter) ; //! Prints informations about the network associated
//! with the structure .
Standard_EXPORT static void PrintNetwork(const Handle(Graphic3d_Structure)& AStructure,const Graphic3d_TypeOfConnection AType) ; //! Suppress the adress in the list
//! of descendants or in the list of ancestors.
Standard_EXPORT void Remove(const Standard_Address APtr,const Graphic3d_TypeOfConnection AType) ; Standard_EXPORT void SetComputeVisual(const Graphic3d_TypeOfStructure AVisual) ; //! Transforms , , with the transformation .
Standard_EXPORT static void Transforms(const TColStd_Array2OfReal& ATrsf,const Standard_Real X,const Standard_Real Y,const Standard_Real Z,Standard_Real& NewX,Standard_Real& NewY,Standard_Real& NewZ) ; //! Transforms with the transformation .
Standard_EXPORT static Graphic3d_Vector Transforms(const TColStd_Array2OfReal& ATrsf,const Graphic3d_Vector& Coord) ; //! Transforms with the transformation .
Standard_EXPORT static Graphic3d_Vertex Transforms(const TColStd_Array2OfReal& ATrsf,const Graphic3d_Vertex& Coord) ; //! Returns the c structure associated to .
Standard_EXPORT Standard_Address CStructure() const; friend class Graphic3d_Group; DEFINE_STANDARD_RTTI(Graphic3d_Structure) protected: Standard_Address MyPtrStructureManager; Standard_Address MyFirstPtrStructureManager; Graphic3d_TypeOfStructure MyComputeVisual; private: //! Inserts in the structure , the group .
//! It will be erased at the next screen update.
Standard_EXPORT void Add(const Handle(Graphic3d_Group)& AGroup) ; //! Manages the number of groups in the structure
//! which contains facet.
//! Polygons, Triangles or Quadrangles.
//! = +1 or -1
Standard_EXPORT void GroupsWithFacet(const Standard_Integer ADelta) ; //! Returns the labels for a new group in the structure .
Standard_EXPORT void GroupLabels(Standard_Integer& LB,Standard_Integer& LE) ; //! Returns the extreme coordinates found in the
//! structure .
//! Warning: If the structure is empty or infinite then :
//! XMin = YMin = ZMin = RealFirst ().
//! XMax = YMax = ZMax = RealLast ().
Standard_EXPORT void MinMaxCoord(Standard_Real& XMin,Standard_Real& YMin,Standard_Real& ZMin,Standard_Real& XMax,Standard_Real& YMax,Standard_Real& ZMax) const; //! Suppress in the structure , the group .
//! It will be erased at the next screen update.
Standard_EXPORT void Remove(const Handle(Graphic3d_Group)& AGroup) ; //! Returns the manager to which is associated.
Standard_EXPORT Handle_Graphic3d_StructureManager StructureManager() const; //! Calls the Update method of the StructureManager which
//! contains the Structure .
Standard_EXPORT void Update() const; //! Updates the c structure associated to .
Standard_EXPORT void UpdateStructure(const Handle(Graphic3d_AspectLine3d)& CTXL,const Handle(Graphic3d_AspectText3d)& CTXT,const Handle(Graphic3d_AspectMarker3d)& CTXM,const Handle(Graphic3d_AspectFillArea3d)& CTXF) ; Graphic3d_CStructure MyCStructure; Aspect_GenId MyGroupGenId; TColStd_SequenceOfAddress MyAncestors; TColStd_SequenceOfAddress MyDescendants; Graphic3d_SequenceOfGroup MyGroups; Handle_Graphic3d_GraphicDriver MyGraphicDriver; Quantity_Color MyHighlightColor; Aspect_TypeOfHighlightMethod MyHighlightMethod; Standard_Address MyOwner; Graphic3d_TypeOfStructure MyVisual; }; // other Inline functions and methods (like "C++: function call" methods) #endif