# Visualization
TKV3d
Visual3d

# Visual3d_ViewMapping Class Reference

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. --
.

`#include <Visual3d_ViewMapping.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
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)
| Creates a projection. .
Standard_EXPORT void | SetBackPlaneDistance (const Standard_Real BPD)
| Modifies the back clipping plane. Category: Methods to modify the class definition Warning: Raises ViewMappingDefinitionError if <prp> is between the front and back planes. if <prp> 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 front clipping plane. Category: Methods to modify the class definition Warning: Raises ViewMappingDefinitionError if <prp> is between the front and back planes. if <prp> is positioned on the view plane. if the back plane is in front of the front plane. .
Standard_EXPORT void | SetProjection (const Visual3d_TypeOfProjection AType)
| Modifies the type of projection. .
Standard_EXPORT void | SetProjectionReferencePoint (const Graphic3d_Vertex &PRP)
| Modifies the PRP. Category: Methods to modify the class definition Warning: Raises ViewMappingDefinitionError if <prp> is between the front and back planes. if <prp> is positioned on the view plane. .
Standard_EXPORT void | SetViewPlaneDistance (const Standard_Real VPD)
| Modifies the distance of the view plane of projection. Category: Methods to modify the class definition Warning: Raises ViewMappingDefinitionError if <prp> is positioned on the view plane. .
Standard_EXPORT void | SetWindowLimit (const Standard_Real Umin, const Standard_Real Vmin, const Standard_Real Umax, const Standard_Real Vmax)
| 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 | SetCustomProjectionMatrix (const Handle(TColStd_HArray2OfReal)&Mat)
| Sets custom PROJECTION matrix for the OpenGl context .
Standard_EXPORT Standard_Real | BackPlaneDistance () const
| Returns the distance from the back clipping plane of this view mapping. .
Standard_EXPORT Standard_Real | FrontPlaneDistance () const
| Returns the distance from the front clipping plane of this view mapping. .
Standard_EXPORT Visual3d_TypeOfProjection | Projection () const
| Returns the type of projection. .
Standard_EXPORT Graphic3d_Vertex | ProjectionReferencePoint () const
| Returns the PRP. .
Standard_EXPORT Standard_Real | ViewPlaneDistance () const
| Returns the distance from the projection plane. .
Standard_EXPORT void | WindowLimit (Standard_Real &Umin, Standard_Real &Vmin, Standard_Real &Umax, Standard_Real &Vmax) const
| Returns the visible part of the projection plane. .
Standard_EXPORT Standard_Boolean | IsCustomMatrix () const
| Returns whether the custom PROJECTION matrix is used. .

## Private Member Functions

Standard_EXPORT void | Assign (const Visual3d_ViewMapping &Other)
| Copies the content of <other> into <me>. .

## Private Attributes

Graphic3d_Vertex | MyReferencePoint
Visual3d_TypeOfProjection | MyProjectionType
Standard_Real | MyBackPlaneDistance
Standard_Real | MyFrontPlaneDistance
Standard_Real | MyViewPlaneDistance
Standard_Real | MyWindowLimits [4]
Handle_TColStd_HArray2OfReal | MyProjectionMatrix

## Constructor & Destructor Documentation

Standard_EXPORT Visual3d_ViewMapping::Visual3d_ViewMapping | ( |  | ) |

Standard_EXPORT Visual3d_ViewMapping::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
| ) |

## Member Function Documentation

Standard_EXPORT void Visual3d_ViewMapping::Assign | ( | const Visual3d_ViewMapping & | Other | ) | `[private]`

Standard_EXPORT Standard_Real Visual3d_ViewMapping::BackPlaneDistance | ( |  | ) | const

Standard_EXPORT Standard_Real Visual3d_ViewMapping::FrontPlaneDistance | ( |  | ) | const

Standard_EXPORT Standard_Boolean Visual3d_ViewMapping::IsCustomMatrix | ( |  | ) | const

void Visual3d_ViewMapping::operator delete | ( | void * | anAddress | ) | `[inline]`

void* Visual3d_ViewMapping::operator new | ( | size_t | size | ) | `[inline]`

void* Visual3d_ViewMapping::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT Visual3d_TypeOfProjection Visual3d_ViewMapping::Projection | ( |  | ) | const

Standard_EXPORT Graphic3d_Vertex Visual3d_ViewMapping::ProjectionReferencePoint | ( |  | ) | const

Standard_EXPORT void Visual3d_ViewMapping::SetBackPlaneDistance | ( | const Standard_Real | BPD | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetCustomProjectionMatrix | ( | const Handle(TColStd_HArray2OfReal)& | Mat | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetFrontPlaneDistance | ( | const Standard_Real | FPD | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetProjection | ( | const Visual3d_TypeOfProjection | AType | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetProjectionReferencePoint | ( | const Graphic3d_Vertex & | PRP | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetViewPlaneDistance | ( | const Standard_Real | VPD | ) |

Standard_EXPORT void Visual3d_ViewMapping::SetWindowLimit | ( | const Standard_Real | Umin,
|  | const Standard_Real | Vmin,
|  | const Standard_Real | Umax,
|  | const Standard_Real | Vmax
| ) |

Standard_EXPORT Standard_Real Visual3d_ViewMapping::ViewPlaneDistance | ( |  | ) | const

Standard_EXPORT void Visual3d_ViewMapping::WindowLimit | ( | Standard_Real & | Umin,
|  | Standard_Real & | Vmin,
|  | Standard_Real & | Umax,
|  | Standard_Real & | Vmax
| ) | const

## Field Documentation

Standard_Real Visual3d_ViewMapping::MyBackPlaneDistance `[private]`

Standard_Real Visual3d_ViewMapping::MyFrontPlaneDistance `[private]`

Handle_TColStd_HArray2OfReal Visual3d_ViewMapping::MyProjectionMatrix `[private]`

Visual3d_TypeOfProjection Visual3d_ViewMapping::MyProjectionType `[private]`

Graphic3d_Vertex Visual3d_ViewMapping::MyReferencePoint `[private]`

Standard_Real Visual3d_ViewMapping::MyViewPlaneDistance `[private]`

Standard_Real Visual3d_ViewMapping::MyWindowLimits[4]`[private]`

The documentation for this class was generated from the following file:

- Visual3d_ViewMapping.hxx