The Vish Visualization Shell 0.3
Vish
Public Member Functions | Public Attributes | List of all members
Wizt::View Struct Reference

Defining the view in a rendering scene via the projection parameters and the rotation / translation due to camera settings, as given by a VCamera. More...

#include <ocean/Anemonia/View.hpp>

Inheritance diagram for Wizt::View:
Wizt::ProjectionParameters Wizt::RenderAble::SensorView

Public Member Functions

void computeFrustum (double H, double W, const Eagle::PhysicalSpace::Viewport &theViewport)
 Compute the frustum from the current camera settings, near and far value, plus the given viewport and height/width information.
 
void computeModelViewMatrix ()
 Compute the model view matrix from the camera settings.
 
void resetModelView ()
 Reset the model view matrix to the identity matrix, also resetting the CameraSettings to their respective default values.
 
bool WorldToScreen_minus1_to_plus1 (const Eagle::point3 &world, OverlayCoordinate &screen) const
 Perform projection from world coordinates to screen coordinates, with screen coordinates in [-1,+1]x[-1,+1]x[0,1].
 
bool WorldToScreen_zero_to_one (const Eagle::point3 &world, MouseCoordinate &screen) const
 Perform projection from world coordinates to screen coordinates, with screen coordinates in [0,1]x[0,1].
 
OverlayCoordinate WorldToScreenOverlay (const Eagle::point3 &world, bool *success=nullptr) const
 z coordinate is in range [0.0, 1.0]
 
- Public Member Functions inherited from Wizt::ProjectionParameters
void setFrustum (double left, double right, double bottom, double top, double nearVal, double farVal)
 Set a perspectivic projection.
 
void setInfiniteFrustum (double Left, double Right, double Bottom, double Top, double NearVal)
 Define a perspective projection that reaches into infinity.
 
void setOrthographic (double left, double right, double bottom, double top, double nearVal, double farVal)
 Set an orthographic projection.
 

Public Attributes

VCamera CameraSettings
 Properties of the camera.
 
MatrixOrArray FullModelView
 The full model view mapping as matrix or flat array.
 
std::array< double, 16 > inv_FullModelViewMatrix
 Inverse matrices.
 
Eagle::PhysicalSpace::Frustum myFrustum
 The view frustum related to the current CameraSettings.
 
MatrixOrArray PixelCalibration
 A matrix for final pixel operations.
 
Eagle::PhysicalSpace::Viewport port
 Viewport settings.
 
Eagle::tvector3 Translation
 The translational component of the FullModelViewMatrix.
 
MatrixOrArray UntranslatedModelView
 The model view mapping without translation.
 
- Public Attributes inherited from Wizt::ProjectionParameters
MatrixOrArray Projection
 A 4x4 projection matrix as required by OpenGL in column-major order.
 

Detailed Description

Defining the view in a rendering scene via the projection parameters and the rotation / translation due to camera settings, as given by a VCamera.

Member Function Documentation

◆ computeFrustum()

void Wizt::View::computeFrustum ( double  H,
double  W,
const Eagle::PhysicalSpace::Viewport theViewport 
)

Compute the frustum from the current camera settings, near and far value, plus the given viewport and height/width information.

Modifies myFrustum, port, DeviceHeight and DeviceWidth.

References CameraSettings, myFrustum, Wizt::VCamera::Observer, and port.

Member Data Documentation

◆ myFrustum

Eagle::PhysicalSpace::Frustum Wizt::View::myFrustum

The view frustum related to the current CameraSettings.

It must be updated via calling its computeModelViewMatrix() function any time the CameraSettings are modified.

Referenced by computeFrustum().