// 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_ViewOrientation_HeaderFile #define _Visual3d_ViewOrientation_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Graphic3d_Vertex_HeaderFile #include #endif #ifndef _Graphic3d_Vector_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Handle_TColStd_HArray2OfReal_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif class TColStd_HArray2OfReal; class Visual3d_ViewOrientationDefinitionError; class Visual3d_View; class Graphic3d_Vertex; class Graphic3d_Vector; //! This class allows the definition of the manner in
//! which an observer looks at the visualised scene.
//! It defines a coordinate system called VRC
//! (View Reference Coordinates) with 3 axes U,V,N
//! Summary of 3D View Orientation --
//! --
//! The view orientation transformation defines --
//! the relationship between World Coordinates --
//! (WC) and View Reference Coordinates (VRC) --
//! --
//! To define a view orientation transformation --
//! you must define : --
//! --
//! The View Reference Point (VRP) --
//! The View Plane Normal (VPN) --
//! The View Up Vector (VUP). --
//!
//! Optionally, it is possible to specify anisotropic
//! (axial) scale factors. This allows to scale the scene
//! using individual scale values along each coordinate axis.
class Visual3d_ViewOrientation { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Creates a VRC coordinate system.
//! VRP : Origin of the VRC coordinate system.
//! (default value : 0.0, 0.0, 0.0)
//! VPN : Vector normal to the plane of visualisation.
//! (default value : 0.0, 0.0, 1.0)
//! VUP : Vector for which the projection in the plane
//! of visualisation defines the axis V of a VRC
//! coordinate system.
//! (default value : 0.0, 1.0, 0.0)
Standard_EXPORT Visual3d_ViewOrientation(); //! Creates a VRC coordinate system.
//! VRP : Origin of the VRC coordinate system.
//! VPN : Vector normal to the plane of visualisation.
//! VUP : Vector for which the projection in the plane
//! of visualisation defines the axis V of a VRC
//! coordinate system.
//! This vector can be likened to the
//! vertical of the observer.
//! Warning: Raises ViewOrientationDefinitionError
//! if is null.
//! if is null.
//! if and are parallel.
Standard_EXPORT Visual3d_ViewOrientation(const Graphic3d_Vertex& VRP,const Graphic3d_Vector& VPN,const Graphic3d_Vector& VUP); //! Creates a VRC coordinate system.
//! VRP : Origin of VRC coordinate system.
//! VPN : Normal vector to the plane of visualisation.
//! Twist : Angle in radians of the V axis in the VRC
//! coordinate system with the projection in
//! the plane of visualisation of the Zm axis
//! in the model space.
//! Warning: Raises ViewOrientationDefinitionError if is null.
Standard_EXPORT Visual3d_ViewOrientation(const Graphic3d_Vertex& VRP,const Graphic3d_Vector& VPN,const Standard_Real Twist); //! Creates a VRC coordinate system.
//! VRP : Origin of the VRC coordinate system.
//! Azim : Angle in radians of the plane of visualisation
//! with the XmYm plane of the model space.
//! Inc : Angle in radians of the plane of visualisation
//! with the YmZm plane of the model space.
//! Twist : Angle in radians of the V axis in the VRC
//! coordinate system with the projection in
//! the plane of visualisation of the Zm axis
//! in the model space.
//! Warning: Raises ViewOrientationDefinitionError
Standard_EXPORT Visual3d_ViewOrientation(const Graphic3d_Vertex& VRP,const Standard_Real Azim,const Standard_Real Inc,const Standard_Real Twist); //! Modifies the plane of visualisation
//! defined by a normal vector.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewOrientationDefinitionError if is null.
Standard_EXPORT void SetViewReferencePlane(const Graphic3d_Vector& VPN) ; //! Modifies the origin of the VRC coordinate system
Standard_EXPORT void SetViewReferencePoint(const Graphic3d_Vertex& VRP) ; //! Modifies the vertical of the observer.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewOrientationDefinitionError if is null.
Standard_EXPORT void SetViewReferenceUp(const Graphic3d_Vector& VUP) ; //! Sets axial scale factors of the view
Standard_EXPORT void SetAxialScale(const Standard_Real Sx,const Standard_Real Sy,const Standard_Real Sz) ; //! Sets custom MODELVIEW matrix for the OpenGl context
Standard_EXPORT void SetCustomModelViewMatrix(const Handle(TColStd_HArray2OfReal)& Mat) ; //! Returns the angle in radians of the V axis in the VRC
//! coordinate system with the projection in the plane of
//! visualisation of the Zm axis in the model space.
Standard_EXPORT Standard_Real Twist() const; //! Returns the normal to the plane of projection.
Standard_EXPORT Graphic3d_Vector ViewReferencePlane() const; //! Returns origin of the VRC coordinate system.
Standard_EXPORT Graphic3d_Vertex ViewReferencePoint() const; //! Returns the vertical of the observer.
Standard_EXPORT Graphic3d_Vector ViewReferenceUp() const; //! Returns current values of the axial scale factors.
Standard_EXPORT void AxialScale(Standard_Real& Sx,Standard_Real& Sy,Standard_Real& Sz) const; //! Returns whether the custom MODELVIEW matrix is used.
Standard_EXPORT Standard_Boolean IsCustomMatrix() const; friend class Visual3d_View; protected: private: //! Copies the content of into .
Standard_EXPORT void Assign(const Visual3d_ViewOrientation& Other) ; Graphic3d_Vertex MyViewReferencePoint; Graphic3d_Vector MyViewPlaneNormal; Graphic3d_Vector MyViewUpVector; Standard_Real MyScaleX; Standard_Real MyScaleY; Standard_Real MyScaleZ; Handle_TColStd_HArray2OfReal MyModelViewMatrix; }; // other Inline functions and methods (like "C++: function call" methods) #endif