// 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 _Visual3d_TransientManager_HeaderFile #define _Visual3d_TransientManager_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Visual3d_TransientManager_HeaderFile #include #endif #ifndef _MMgt_TShared_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_Visual3d_View_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Quantity_PlaneAngle_HeaderFile #include #endif #ifndef _Graphic3d_TextPath_HeaderFile #include #endif #ifndef _Graphic3d_HorizontalTextAlignment_HeaderFile #include #endif #ifndef _Graphic3d_VerticalTextAlignment_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Structure_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 _Graphic3d_TypeOfComposition_HeaderFile #include #endif class Visual3d_TransientDefinitionError; class Graphic3d_TransformError; class Visual3d_View; class TCollection_ExtendedString; class Graphic3d_Structure; class Graphic3d_AspectLine3d; class Graphic3d_AspectFillArea3d; class Graphic3d_AspectText3d; class Graphic3d_AspectMarker3d; class TColStd_Array2OfReal; //! This class allows to manage transient graphics
//! above one View.
//! A simple way to drawn something very quicly above
//! a complex scene (Hilighting,Sketching,...)
//! All transient graphics will be drawn with
//! the projection defined by the view with the current
//! attributes depending of the primitive type :
//! Lines,Markers,Polygons,Texts
//! All transient graphics will be erased at the next
//! View::BeginDraw().
//! If RetainMode is active,
//! All transient graphics will be kept at the
//! next View::Update(),Redraw(). The transient graphics
//! is stored by this object and graphic library, the
//! graphic managed itself exposure,resizing,...
//! The method View::ClearDraw() is necessary to erase
//! all transient graphics.
//! If RetainMode is deactivate,
//! All transient graphics will be erased at the
//! next View::Update(),Redraw().
//! Remember that nothing is stored by this object and
//! graphic library,the application must managed itself
//! exposure,resizing,...
//! If double_buffering is activate,
//! all graphics are drawn in the back buffer and flushed
//! in the front buffer at the end of drawing but nothing
//! is done for to separate transient from structured
//! graphics,the only way to regenerate the structured
//! view is to Redraw() the view.
//! If double_buffering is deactivate,
//! the back buffer is preserved and used for restoring
//! the front buffer at begin drawing time.I recommend
//! to use the second way (without DB) if you want
//! to preserve the graphics and the performances!
class Visual3d_TransientManager : public MMgt_TShared { public: //! Creates a TransientManager .
Standard_EXPORT Visual3d_TransientManager(); //! Suppress the TransientManager .
Standard_EXPORT void Destroy() ; ~Visual3d_TransientManager() { Destroy(); } //! Begins any graphics in the view
//! Redraw any structured graphics in the back buffer before
//! if is TRUE.
//! Restore the front buffer from the back before
//! if is FALSE.
//! if is TRUE.
//! the graphic managed itself exposure,resizing ...
//! if is FALSE.
//! the application must managed itself exposure,resizing ...
//!
//! Warning: Returns TRUE if transient drawing is enabled in
//! the associated view.
//! Returns FALSE ,if nothing works because something
//! is wrong for the transient principle :
//! Immediat mode is not implemented depending of the
//! graphic library used.
//! MBX,PIXMAP double buffering don't works depending of
//! the graphic board and the visual of the window supporting
//! the view.
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is already opened.
//! or the associated view is not mapped on a window.
Standard_EXPORT static Standard_Boolean BeginDraw(const Handle(Visual3d_View)& aView,const Standard_Boolean DoubleBuffer = Standard_False,const Standard_Boolean RetainMode = Standard_False) ; //! Flush all graphics to the front buffer.
//! Synchronize graphics to the screen if is
//! TRUE (make becarefull to the performances!).
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void EndDraw(const Standard_Boolean Synchronize = Standard_False) ; //! Clear all transient graphics in the view
//! updates a scene if = true
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is already opened.
//! or the associated view is not mapped on a window.
Standard_EXPORT static void ClearDraw(const Handle(Visual3d_View)& aView,const Standard_Boolean aFlush = Standard_True) ; //! Begins any add graphics in the view
//! the application must managed itself exposure,resizing ...
//!
//! Warning: Returns TRUE if transient drawing is enabled in
//! the associated view.
//! Returns FALSE ,if nothing works because something
//! is wrong for the transient principle :
//! Immediat mode is not implemented depending of the
//! graphic library used.
//! MBX,PIXMAP double buffering don't works depending of
//! the graphic board and the visual of the window supporting
//! the view.
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is already opened.
//! or the associated view is not mapped on a window.
Standard_EXPORT static Standard_Boolean BeginAddDraw(const Handle(Visual3d_View)& aView) ; //! Flush all add graphics to the front buffer.
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void EndAddDraw() ; //! After this call, is ready to receive
//! a definition of a polyline with AddVertex().
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is already opened,
//! or Drawing is not opened.
Standard_EXPORT static void BeginPolyline() ; //! After this call, is ready to receive
//! a definition of a polygon with AddVertex().
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is already opened,
//! or Drawing is not opened.
Standard_EXPORT static void BeginPolygon() ; //! After this call, is ready to receive
//! a definition of a triangle mesh with AddVertex().
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is already opened,
//! or Drawing is not opened.
Standard_EXPORT static void BeginTriangleMesh() ; //! After this call, is ready to receive
//! a definition of a marker with AddVertex().
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is already opened,
//! or Drawing is not opened.
Standard_EXPORT static void BeginMarker() ; //! After this call, is ready to receive
//! a definition of a curve with AddVertex().
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is already opened,
//! or Drawing is not opened.
Standard_EXPORT static void BeginBezier() ; //! Puts as a new point in the current primitive.
//! If then it is a draw between last point and
//! this point else it is a move between last point and
//! this point.
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is not opened,
//! or Drawing is not opened.
Standard_EXPORT static void AddVertex(const Standard_Real X,const Standard_Real Y,const Standard_Real Z,const Standard_Boolean AFlag = Standard_True) ; //! Puts as a new point coordinates and
//! weight in the current primitive.
//! If then it is a draw between last point and
//! this point else it is a move between last point and
//! this point.
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is not opened,
//! or Drawing is not opened.
Standard_EXPORT static void AddVertex(const Standard_Real X,const Standard_Real Y,const Standard_Real Z,const Standard_Real W,const Standard_Boolean AFlag = Standard_True) ; //! Puts as a new point in the current primitive.
//! Puts as a new normal in the current
//! primitive.
//! If then it is a draw between last point and
//! this point else it is a move between last point and
//! this point.
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is not opened,
//! or Drawing is not opened.
Standard_EXPORT static void AddVertex(const Standard_Real X,const Standard_Real Y,const Standard_Real Z,const Standard_Real NX,const Standard_Real NY,const Standard_Real NZ,const Standard_Boolean AFlag = Standard_True) ; //! After this call, stops the reception of
//! a definition of a Begin... primitive.
//! Raises TransientDefinitionError from Visual3d;
//! if a Begin... primitive is not opened,
//! or Drawing is not opened.
Standard_EXPORT static void ClosePrimitive() ; //! Drawn the string at position .
//! 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).
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void DrawText(const TCollection_ExtendedString& AText,const Standard_Real X,const Standard_Real Y,const Standard_Real Z,const Standard_Real AHeight,const Quantity_PlaneAngle AAngle = 0.0,const Graphic3d_TextPath ATp = Graphic3d_TP_RIGHT,const Graphic3d_HorizontalTextAlignment AHta = Graphic3d_HTA_LEFT,const Graphic3d_VerticalTextAlignment AVta = Graphic3d_VTA_BOTTOM) ; //! Drawn the structure .
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void DrawStructure(const Handle(Graphic3d_Structure)& AStructure) ; //! Modifies the current lines attributes.
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void SetPrimitivesAspect(const Handle(Graphic3d_AspectLine3d)& CTX) ; //! Modifies the current faces attributes
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void SetPrimitivesAspect(const Handle(Graphic3d_AspectFillArea3d)& CTX) ; //! Modifies the current texts attributes
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void SetPrimitivesAspect(const Handle(Graphic3d_AspectText3d)& CTX) ; //! Modifies the current markers attributes
//! Warning: No default attributes
//! Raises TransientDefinitionError from Visual3d;
//! if Drawing is not opened.
Standard_EXPORT static void SetPrimitivesAspect(const Handle(Graphic3d_AspectMarker3d)& CTX) ; //! Returns the coordinates of the boundary box
//! of the Transient graphics actually drawn
//! since BeginDraw() has been call.
//! Warning: If nothing has been drawn then :
//! XMin = YMin = ZMin = RealFirst ().
//! XMax = YMax = ZMax = RealLast ().
Standard_EXPORT static void MinMaxValues(Standard_Real& XMin,Standard_Real& YMin,Standard_Real& ZMin,Standard_Real& XMax,Standard_Real& YMax,Standard_Real& ZMax) ; //! Returns the coordinates of the boundary box projection
//! of the Transient graphics actually drawn
//! since BeginDraw() has been call.
//! Warning: If nothing has been drawn then :
//! XMin = YMin = ZMin = RealFirst ().
//! XMax = YMax = ZMax = RealLast ().
Standard_EXPORT static void MinMaxValues(Standard_Real& UMin,Standard_Real& VMin,Standard_Real& UMax,Standard_Real& VMax) ; //! Modifies the current local modelling transformation
//! of the transient graphics.
Standard_EXPORT static void SetTransform(const TColStd_Array2OfReal& AMatrix,const Graphic3d_TypeOfComposition AType = Graphic3d_TOC_REPLACE) ; DEFINE_STANDARD_RTTI(Visual3d_TransientManager) protected: private: }; // other Inline functions and methods (like "C++: function call" methods) #endif