// 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_ViewMapping_HeaderFile #define _Visual3d_ViewMapping_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Graphic3d_Vertex_HeaderFile #include #endif #ifndef _Visual3d_TypeOfProjection_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_ViewMappingDefinitionError; class Visual3d_View; class Graphic3d_Vertex; //! This class allows the definition of a projection and
//! a system of coordinates called NPC.
//! (Normalized Projection Coordinates).
//! The projection can be parallel or perspective.
//! References: The definitions are Phigs oriented.
//! Keywords: View, Mapping, Window, View Plane, Front Plane,
//! BackPlane, Projection Type, Reset, Projection
//! Summary of 3D View Mapping --
//! The view mapping transformation defines the --
//! window-to-viewport mapping of View Reference --
//! Coordinates (VRC) to Normalized Projection --
//! Coordinates (NPC). --
//! CAS.CADE supports two kinds of projection : --
//! Parallel : --
//! The Projection Reference Point (PRP) --
//! determines the direction of projection. --
//! Perspective : --
//! The projector lines converge at the --
//! Projection Reference Point (PRP). --
//! To define a view mapping transformation you --
//! must define : --
//! The Projection Type --
//! The Projection Reference Point (PRP) --
//! The Distance from Back Plane (BPD) --
//! The Distance from Front Plane (FPD) --
//! The Distance from View Plane (VPD) --
//! The Window in the View Plane. --
class Visual3d_ViewMapping { 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 projection.
Standard_EXPORT Visual3d_ViewMapping(); //! Creates a projection.
Standard_EXPORT Visual3d_ViewMapping(const Visual3d_TypeOfProjection AType,const Graphic3d_Vertex& PRP,const Standard_Real BPD,const Standard_Real FPD,const Standard_Real VPD,const Standard_Real WUmin,const Standard_Real WVmin,const Standard_Real WUmax,const Standard_Real WVmax); //! Modifies the back clipping plane.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewMappingDefinitionError
//! if is between the front and back planes.
//! if is positioned on the view plane.
//! if the back plane is in front of the front plane.
Standard_EXPORT void SetBackPlaneDistance(const Standard_Real BPD) ; //! Modifies the front clipping plane.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewMappingDefinitionError
//! if is between the front and back planes.
//! if is positioned on the view plane.
//! if the back plane is in front of the front plane.
Standard_EXPORT void SetFrontPlaneDistance(const Standard_Real FPD) ; //! Modifies the type of projection.
Standard_EXPORT void SetProjection(const Visual3d_TypeOfProjection AType) ; //! Modifies the PRP.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewMappingDefinitionError
//! if is between the front and back planes.
//! if is positioned on the view plane.
Standard_EXPORT void SetProjectionReferencePoint(const Graphic3d_Vertex& PRP) ; //! Modifies the distance of the view plane of projection.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewMappingDefinitionError
//! if is positioned on the view plane.
Standard_EXPORT void SetViewPlaneDistance(const Standard_Real VPD) ; //! Modifies the visible part of the projection plane.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewMappingDefinitionError if the
//! specified window is invalid.
Standard_EXPORT void SetWindowLimit(const Standard_Real Umin,const Standard_Real Vmin,const Standard_Real Umax,const Standard_Real Vmax) ; //! Sets custom PROJECTION matrix for the OpenGl context
Standard_EXPORT void SetCustomProjectionMatrix(const Handle(TColStd_HArray2OfReal)& Mat) ; //! Returns the distance from the back clipping plane
//! of this view mapping.
Standard_EXPORT Standard_Real BackPlaneDistance() const; //! Returns the distance from the front clipping plane
//! of this view mapping.
Standard_EXPORT Standard_Real FrontPlaneDistance() const; //! Returns the type of projection.
Standard_EXPORT Visual3d_TypeOfProjection Projection() const; //! Returns the PRP.
Standard_EXPORT Graphic3d_Vertex ProjectionReferencePoint() const; //! Returns the distance from the projection plane.
Standard_EXPORT Standard_Real ViewPlaneDistance() const; //! Returns the visible part of the projection plane.
Standard_EXPORT void WindowLimit(Standard_Real& Umin,Standard_Real& Vmin,Standard_Real& Umax,Standard_Real& Vmax) const; //! Returns whether the custom PROJECTION 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_ViewMapping& Other) ; Graphic3d_Vertex MyReferencePoint; Visual3d_TypeOfProjection MyProjectionType; Standard_Real MyBackPlaneDistance; Standard_Real MyFrontPlaneDistance; Standard_Real MyViewPlaneDistance; Standard_Real MyWindowLimits[4]; Handle_TColStd_HArray2OfReal MyProjectionMatrix; }; // other Inline functions and methods (like "C++: function call" methods) #endif