# Visualization
TKV3d
Visual3d

# Visual3d_ViewOrientation Class Reference

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

`#include <Visual3d_ViewOrientation.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_ViewOrientation ()
| 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 (const Graphic3d_Vertex &VRP, const Graphic3d_Vector &VPN, const Graphic3d_Vector &VUP)

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 <vpn> is null.
if <vup> is null.
if <vpn> and <vup> are parallel.
.

Standard_EXPORT | Visual3d_ViewOrientation (const Graphic3d_Vertex &VRP, const Graphic3d_Vector &VPN, const Standard_Real Twist)
| 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 <vpn> is null. .
Standard_EXPORT | Visual3d_ViewOrientation (const Graphic3d_Vertex &VRP, const Standard_Real Azim, const Standard_Real Inc, 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 void | SetViewReferencePlane (const Graphic3d_Vector &VPN)
| Modifies the plane of visualisation defined by a normal vector. Category: Methods to modify the class definition Warning: Raises ViewOrientationDefinitionError if <vpn> is null. .
Standard_EXPORT void | SetViewReferencePoint (const Graphic3d_Vertex &VRP)
| Modifies the origin of the VRC coordinate system .
Standard_EXPORT void | SetViewReferenceUp (const Graphic3d_Vector &VUP)
| Modifies the vertical of the observer. Category: Methods to modify the class definition Warning: Raises ViewOrientationDefinitionError if <vup> is null. .
Standard_EXPORT void | SetAxialScale (const Standard_Real Sx, const Standard_Real Sy, const Standard_Real Sz)
| Sets axial scale factors of the view .
Standard_EXPORT void | SetCustomModelViewMatrix (const Handle(TColStd_HArray2OfReal)&Mat)
| Sets custom MODELVIEW matrix for the OpenGl context .
Standard_EXPORT Standard_Real | Twist () const
| 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 Graphic3d_Vector | ViewReferencePlane () const
| Returns the normal to the plane of projection. .
Standard_EXPORT Graphic3d_Vertex | ViewReferencePoint () const
| Returns origin of the VRC coordinate system. .
Standard_EXPORT Graphic3d_Vector | ViewReferenceUp () const
| Returns the vertical of the observer. .
Standard_EXPORT void | AxialScale (Standard_Real &Sx, Standard_Real &Sy, Standard_Real &Sz) const
| Returns current values of the axial scale factors. .
Standard_EXPORT Standard_Boolean | IsCustomMatrix () const
| Returns whether the custom MODELVIEW matrix is used. .

## Private Member Functions

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

## Private Attributes

Graphic3d_Vertex | MyViewReferencePoint
Graphic3d_Vector | MyViewPlaneNormal
Graphic3d_Vector | MyViewUpVector
Standard_Real | MyScaleX
Standard_Real | MyScaleY
Standard_Real | MyScaleZ
Handle_TColStd_HArray2OfReal | MyModelViewMatrix

## Constructor & Destructor Documentation

Standard_EXPORT Visual3d_ViewOrientation::Visual3d_ViewOrientation | ( |  | ) |

Standard_EXPORT Visual3d_ViewOrientation::Visual3d_ViewOrientation | ( | const Graphic3d_Vertex & | VRP,
|  | const Graphic3d_Vector & | VPN,
|  | const Graphic3d_Vector & | VUP
| ) |

Standard_EXPORT Visual3d_ViewOrientation::Visual3d_ViewOrientation | ( | const Graphic3d_Vertex & | VRP,
|  | const Graphic3d_Vector & | VPN,
|  | const Standard_Real | Twist
| ) |

Standard_EXPORT Visual3d_ViewOrientation::Visual3d_ViewOrientation | ( | const Graphic3d_Vertex & | VRP,
|  | const Standard_Real | Azim,
|  | const Standard_Real | Inc,
|  | const Standard_Real | Twist
| ) |

## Member Function Documentation

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

Standard_EXPORT void Visual3d_ViewOrientation::AxialScale | ( | Standard_Real & | Sx,
|  | Standard_Real & | Sy,
|  | Standard_Real & | Sz
| ) | const

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

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

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

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

Standard_EXPORT void Visual3d_ViewOrientation::SetAxialScale | ( | const Standard_Real | Sx,
|  | const Standard_Real | Sy,
|  | const Standard_Real | Sz
| ) |

Standard_EXPORT void Visual3d_ViewOrientation::SetCustomModelViewMatrix | ( | const Handle(TColStd_HArray2OfReal)& | Mat | ) |

Standard_EXPORT void Visual3d_ViewOrientation::SetViewReferencePlane | ( | const Graphic3d_Vector & | VPN | ) |

Standard_EXPORT void Visual3d_ViewOrientation::SetViewReferencePoint | ( | const Graphic3d_Vertex & | VRP | ) |

Standard_EXPORT void Visual3d_ViewOrientation::SetViewReferenceUp | ( | const Graphic3d_Vector & | VUP | ) |

Standard_EXPORT Standard_Real Visual3d_ViewOrientation::Twist | ( |  | ) | const

Standard_EXPORT Graphic3d_Vector Visual3d_ViewOrientation::ViewReferencePlane | ( |  | ) | const

Standard_EXPORT Graphic3d_Vertex Visual3d_ViewOrientation::ViewReferencePoint | ( |  | ) | const

Standard_EXPORT Graphic3d_Vector Visual3d_ViewOrientation::ViewReferenceUp | ( |  | ) | const

## Field Documentation

Handle_TColStd_HArray2OfReal Visual3d_ViewOrientation::MyModelViewMatrix `[private]`

Standard_Real Visual3d_ViewOrientation::MyScaleX `[private]`

Standard_Real Visual3d_ViewOrientation::MyScaleY `[private]`

Standard_Real Visual3d_ViewOrientation::MyScaleZ `[private]`

Graphic3d_Vector Visual3d_ViewOrientation::MyViewPlaneNormal `[private]`

Graphic3d_Vertex Visual3d_ViewOrientation::MyViewReferencePoint `[private]`

Graphic3d_Vector Visual3d_ViewOrientation::MyViewUpVector `[private]`

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

- Visual3d_ViewOrientation.hxx