// 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 _PrsMgr_PresentableObject_HeaderFile #define _PrsMgr_PresentableObject_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_PrsMgr_PresentableObject_HeaderFile #include #endif #ifndef _PrsMgr_Presentations_HeaderFile #include #endif #ifndef _PrsMgr_TypeOfPresentation3d_HeaderFile #include #endif #ifndef _TopLoc_Location_HeaderFile #include #endif #ifndef _Graphic3d_CTransPersStruct_HeaderFile #include #endif #ifndef _MMgt_TShared_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Structure_HeaderFile #include #endif #ifndef _Handle_Graphic3d_DataStructureManager_HeaderFile #include #endif #ifndef _PrsMgr_Presentation3d_HeaderFile #include #endif #ifndef _Handle_Geom_Transformation_HeaderFile #include #endif #ifndef _Handle_PrsMgr_PresentationManager2d_HeaderFile #include #endif #ifndef _Handle_Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Handle_PrsMgr_PresentationManager3d_HeaderFile #include #endif #ifndef _Handle_Prs3d_Presentation_HeaderFile #include #endif #ifndef _Handle_Prs3d_Projector_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_PrsMgr_PresentationManager_HeaderFile #include #endif #ifndef _Handle_PrsMgr_Presentation_HeaderFile #include #endif #ifndef _Graphic3d_TransModeFlags_HeaderFile #include #endif class Standard_NotImplemented; class PrsMgr_PresentationManager; class Graphic3d_Structure; class Graphic3d_DataStructureManager; class Geom_Transformation; class PrsMgr_PresentationManager2d; class Graphic2d_GraphicObject; class PrsMgr_PresentationManager3d; class Prs3d_Presentation; class Prs3d_Projector; class PrsMgr_Presentation; class PrsMgr_Presentations; class gp_Pnt; class TColStd_ListOfInteger; class TopLoc_Location; //! A framework to supply the Graphic2d or Graphic3d
//! structure of the object to be presented. On the first
//! display request, this structure is created by calling the
//! appropriate algorithm and retaining this frameworkfor
//! further display.
//! This abstract framework is inherited in Application
//! Interactive Services (AIS), notably in:
//! - AIS_InteractiveObject
//! - AIS_ConnectedInteractive
//! - AIS_MultipleConnectedInteractive
//! - AIS_Shape
//! Consequently, 3D presentation should be handled by
//! the relevant daughter classes and their member
//! functions in AIS. This is particularly true in the
//! creation of new interactive objects.
class PrsMgr_PresentableObject : public MMgt_TShared { public: //! Returns information on whether the object accepts display in HLR mode or not.
Standard_EXPORT PrsMgr_TypeOfPresentation3d TypeOfPresentation3d() const; //! Sets up Transform Persistence Mode for this object.
//! This function used to lock in object position, rotation and / or zooming relative to camera position.
//! Object will be drawn in the origin setted by APoint parameter (except Graphic3d_TMF_TriedronPers flag
//! - see description later). aFlag should be:
//! - Graphic3d_TMF_None - no persistence attributes (reset);
//! - Graphic3d_TMF_PanPers - object doesn't move;
//! - Graphic3d_TMF_ZoomPers - object doesn't resize;
//! - Graphic3d_TMF_RotatePers - object doesn't rotate;
//! - Graphic3d_TMF_FullPers - pan, zoom and rotate transform persistence;
//! - Graphic3d_TMF_TriedronPers - object behaves like trihedron;
//! - combination (Graphic3d_TMF_PanPers | Graphic3d_TMF_ZoomPers);
//! - combination (Graphic3d_TMF_PanPers | Graphic3d_TMF_RotatePers);
//! - combination (Graphic3d_TMF_ZoomPers | Graphic3d_TMF_RotatePers).
//! If Graphic3d_TMF_TriedronPers persistence mode selected APoint coordinates X and Y means:
//! - X = 0.0, Y = 0.0 - center of view window;
//! - X > 0.0, Y > 0.0 - right upper corner of view window;
//! - X > 0.0, Y < 0.0 - right lower corner of view window;
//! - X < 0.0, Y > 0.0 - left upper corner of view window;
//! - X < 0.0, Y < 0.0 - left lower corner of view window.
//! And Z coordinate defines the gap from border of view window (except center position).
Standard_EXPORT virtual void SetTransformPersistence(const Graphic3d_TransModeFlags& aFlag,const gp_Pnt& APoint) ; //! Calls previous method with point (0,0,0)
Standard_EXPORT void SetTransformPersistence(const Graphic3d_TransModeFlags& aFlag) ; //! Gets Transform Persistence Mode for this object
Standard_EXPORT Graphic3d_TransModeFlags GetTransformPersistenceMode() const; //! Gets point of transform persistence for this object
Standard_EXPORT gp_Pnt GetTransformPersistencePoint() const; Standard_EXPORT void SetTypeOfPresentation(const PrsMgr_TypeOfPresentation3d aType) ; //! flags the Prs of mode to be Updated.
//! the Update will be done when needed.
Standard_EXPORT void SetToUpdate(const Standard_Integer aMode) ; //! flags all the Presentations to be Updated.
Standard_EXPORT void SetToUpdate() ; //! gives the list of modes which are flagged "to be updated".
Standard_EXPORT void ToBeUpdated(TColStd_ListOfInteger& ListOfMode) const; Standard_EXPORT virtual void SetLocation(const TopLoc_Location& aLoc) ; Standard_EXPORT Standard_Boolean HasLocation() const; const TopLoc_Location& Location() const; Standard_EXPORT virtual void ResetLocation() ; Standard_EXPORT virtual void UpdateLocation() ; Standard_EXPORT virtual void UpdateLocation(const Handle(Prs3d_Presentation)& P) ; friend class PrsMgr_PresentationManager; friend Standard_EXPORT Handle_Graphic3d_Structure PrsMgr_Presentation3d::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector) ; friend Standard_EXPORT void PrsMgr_Presentation3d::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,const Handle(Graphic3d_Structure)& aGivenStruct) ; friend Standard_EXPORT Handle_Graphic3d_Structure PrsMgr_Presentation3d::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,const Handle(Geom_Transformation)& TheTrsf) ; friend Standard_EXPORT void PrsMgr_Presentation3d::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,const Handle(Geom_Transformation)& TheTrsf,const Handle(Graphic3d_Structure)& aGivenStruct) ; DEFINE_STANDARD_RTTI(PrsMgr_PresentableObject) protected: Standard_EXPORT PrsMgr_PresentableObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView); //! Calculates the 2D view aPresentation and its
//! updates. The latter are managed by aPresentationManager.
//! aPresentableObject has the display mode aMode;
//! this has the default value of 0, that is, the wireframe display mode.
//! Note that this syntax is not used in AIS as that
//! package only concerns 3D display.
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,const Handle(Graphic2d_GraphicObject)& aPresentation,const Standard_Integer aMode = 0) ; //! Calculates the 3D view aPresentation and its
//! updates. The latter are managed by aPresentationManager.
//! aPresentableObject has the display mode aMode;
//! this has the default value of 0, that is, the wireframe display mode.
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; //! Calculates the 3D view aPresentation and its
//! updates. The latter are managed by
//! aPresentationManager. Each of the views in the
//! viewer and every modification such as rotation, for
//! example, entails recalculation.
//! It must be redefined to implement hidden line removal
//! for the object. The user never calls this method
//! himself. This is done via the InteractiveContext object
//! and is dependent on the point of view from which the
//! object is displayed.
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ; //! Calculates the 3D view aPresentation and its
//! updates. The latter are managed by
//! aPresentationManager. A point of view is provided
//! by the projector aProjector, and the geometric
//! transformation which has transformed associated
//! presentable objects is specified by aTrsf.
//! This function is to be used in case where a hidden
//! line removal display cannot be calculated
//! automatically. This occurs when associated
//! presentable objects have been transformed
//! geometrically, but not translated.
//! Warning
//! The transformation aTrsf must be applied to the
//! object before computation.
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Geom_Transformation)& aTrsf,const Handle(Prs3d_Presentation)& aPresentation) ; //! recomputes all presentations of the object.
Standard_EXPORT void Update(const Standard_Boolean AllModes = Standard_False) ; //! Recomputes the presentation in the given mode.
//! If ClearOther is true, other presentation will be cleared.
Standard_EXPORT void Update(const Standard_Integer aMode,const Standard_Boolean ClearOther) ; //! High-level interface for controlling polygon offsets
Standard_EXPORT virtual void Fill(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(PrsMgr_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; Standard_EXPORT PrsMgr_Presentations& Presentations() ; PrsMgr_Presentations myPresentations; PrsMgr_TypeOfPresentation3d myTypeOfPresentation3d; TopLoc_Location myLocation; private: Graphic3d_CTransPersStruct myTransformPersistence; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif