Visual Computing Library
Loading...
Searching...
No Matches
vcl::Camera< Scalar > Class Template Reference

Classes

struct  ProjectionMode
 

Public Member Functions

void reset ()
 
PointTypecenter ()
 
const PointTypecenter () const
 
PointTypeeye ()
 
const PointTypeeye () const
 
PointTypeup ()
 
const PointTypeup () const
 
Scalar & fieldOfView ()
 
const Scalar & fieldOfView () const
 
void setFieldOfViewAdaptingEyeDistance (const Scalar &fov)
 
ProjectionMode::Enum & projectionMode ()
 
ProjectionMode::Enum projectionMode () const
 
Scalar & verticalHeight ()
 
const Scalar & verticalHeight () const
 
Scalar & aspectRatio ()
 
const Scalar & aspectRatio () const
 
Scalar & nearPlane ()
 
const Scalar & nearPlane () const
 
Scalar & farPlane ()
 
const Scalar & farPlane () const
 
MatrixType viewMatrix () const
 
MatrixType projMatrix () const
 

Private Types

using PointType = vcl::Point3< Scalar >
 
using MatrixType = vcl::Matrix44< Scalar >
 

Private Attributes

PointType mCenter = PointType(0.0f, 0.0f, 0.0f)
 Position where the camera is looking at.
 
PointType mEye = PointType(0.0f, 0.0f, 1.0f)
 Position of (eye of) the camera.
 
PointType mUp = PointType(0.0f, 1.0f, 0.0f)
 Up direction of the camera.
 
Scalar mFovDeg = 54.0
 Field of view in degrees.
 
ProjectionMode::Enum mProjectionMode = ProjectionMode::PERSPECTIVE
 Projection mode.
 
Scalar mVerticalHeight = 2.0
 Height of the target in world space (used for ortho projection, and adapting the eye distance for perspective projection)
 
Scalar mAspect = 1.0
 Aspect ratio.
 
Scalar mNear = 0.1
 Z position of the mNear plane.
 
Scalar mFar = 500.0
 Z position of the mFar plane.
 

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