NGL  6.5
The NCCA Graphics Library
ngl::Camera Class Reference

simple camera class to allow movement in an opengl scene. a lot of this stuff is from the HILL book Computer Graphics with OpenGL 2nd Ed Prentice Hall a very good book fustrum culling modified from http://www.lighthouse3d.com/opengl/viewfrustum/index.php?defvf More...

#include <Camera.h>

+ Inheritance diagram for ngl::Camera:
+ Collaboration diagram for ngl::Camera:

Public Member Functions

 Camera () noexcept
 default constructor More...
 
 Camera (const Vec3 &_eye, const Vec3 &_look, const Vec3 &_up) noexcept
 constructor setting the camera using eye look and up More...
 
void roll (Real _angle) noexcept
 roll the cameara around the Z axis More...
 
void pitch (Real _angle) noexcept
 roll the cameara around the x axis More...
 
void yaw (Real _angle) noexcept
 roll the cameara around the y axis More...
 
void slide (Real _du, Real _dv, Real _dn) noexcept
 slide the camera around the U V and N axis More...
 
void set (const Vec3 &_eye, const Vec3 &_look, const Vec3 &_up) noexcept
 set the Camera position using eye look and up vectors More...
 
void setShape (Real _viewAngle, Real _aspect, Real _near, Real _far) noexcept
 set the shape of the Camera More...
 
void setAspect (Real _asp) noexcept
 re-set the aspect ratio of the camera More...
 
void setDefaultCamera () noexcept
 sets some nice default camera values More...
 
void move (Real _dx, Real _dy, Real _dz) noexcept
 move the camera in world space (i.e. add a translation to each of the axis More...
 
void moveBoth (Real _dx, Real _dy, Real _dz) noexcept
 move both the eye and the look at the same time More...
 
void moveEye (Real _dx, Real _dy, Real _dz) noexcept
 move the eye position More...
 
void moveLook (Real _dx, Real _dy, Real _dz) noexcept
 move the look position More...
 
void setViewAngle (Real _angle) noexcept
 set the viewangle for the Camera More...
 
void update () noexcept
 Use is called to make this the current camera and set the MODELVIEW and PROJECTION matrices in OpenGL. More...
 
void normalisedYaw (Real _angle) noexcept
 used to do a Yaw based on Euler rotation with normalised values More...
 
void normalisedPitch (Real _angle) noexcept
 used to do a Pitch based on Euler rotation with normalised values More...
 
void normalisedRoll (Real _angle) noexcept
 used to do a Roll based on Euler rotation with normalised values More...
 
void writeRib (RibExport &_rib) const noexcept
 write out the Camera so it may be used in Renderman, this writes a transform command in rib format so the OpenGL camera mirrors that of the renderman one More...
 
const Mat4getViewMatrix () noexcept
 accesor to get the view matrix More...
 
const Mat4getProjectionMatrix () noexcept
 accesor to get the projection matrix More...
 
Mat4 getVPMatrix () const noexcept
 get the View * Projection matrix used as part of the MVP calculations More...
 
Vec4 getEye () const noexcept
 get the eye position More...
 
void setEye (Vec4 _e) noexcept
 set the eye position and re-calculate the matrices More...
 
void setLook (Vec4 _e) noexcept
 set the look position and re-calculate the matrices More...
 
Vec4 getLook () const noexcept
 get the look position More...
 
Vec4 getUp () const noexcept
 get the up vector More...
 
Vec4 getU () const noexcept
 get the u vector More...
 
Vec4 getV () const noexcept
 get the v vector More...
 
Vec4 getN () const noexcept
 get the n vector More...
 
Real getFOV () const noexcept
 get the fov value More...
 
Real getAspect () const noexcept
 get the aspect value More...
 
Real getNear () const noexcept
 get the near clip value More...
 
Real getFar () const noexcept
 get the far clip value More...
 
void calculateFrustum () noexcept
 calculate the frustum for clipping etc More...
 
void drawFrustum () noexcept
 draw the frustum for clipping etc More...
 
CameraIntercept isPointInFrustum (const Vec3 &_p) const noexcept
 check to see if the point passed in is within the frustum More...
 
CameraIntercept isSphereInFrustum (const Vec3 &_p, Real _radius) const noexcept
 check to see if the sphere passed in is within the frustum More...
 
CameraIntercept boxInFrustum (const AABB &b) const noexcept
 check to see if the AABB passed in is within the frustum More...
 

Protected Types

enum  ProjPlane : char {
  ProjPlane::TOP = 0, ProjPlane::BOTTOM, ProjPlane::LEFT, ProjPlane::RIGHT,
  ProjPlane::NEARP, ProjPlane::FARP
}
 index values for the planes array More...
 

Protected Member Functions

void setPerspProjection () noexcept
 function used to set the perspective projection matrix values More...
 
void rotAxes (Vec4 &io_a, Vec4 &io_b, const Real _angle) noexcept
 internal function to calculate the new rotation vectors for the camera after a roll, pitch or yaw More...
 
void setViewMatrix () noexcept
 method to set the modelview matrix values for the current camera, this method load the matrix Modelview into OpenGL More...
 
void setProjectionMatrix () noexcept
 set the projection matrix More...
 

Protected Attributes

Vec4 m_u
 vector for the Camera local cord frame More...
 
Vec4 m_v
 vector for the Camera local cord frame More...
 
Vec4 m_n
 vector for the Camera local cord frame More...
 
Vec4 m_eye
 the position of the Camera used to calculate the local cord frame More...
 
Vec4 m_look
 where the camera is looking to, used with Eye to calculate the Vector m_n More...
 
Vec4 m_up
 gives a general indication of which way up the camera is More...
 
Real m_width
 the width of the display image used for some perspective projection calculations More...
 
Real m_height
 the height of the display image used for some perspective projection calculations More...
 
Real m_aspect
 used to store the current camera aspect ratio (can be derived from Width / Height More...
 
Real m_zNear
 the near clipping plane of the camera view volume More...
 
Real m_zFar
 the far clipping plane of the camera view volume More...
 
Real m_fov
 the feild of view of the camera view volume, measured from the eye More...
 
Mat4 m_viewMatrix
 a Matrix to hold the combined modelling and viewing matrix to load into OpenGL More...
 
Plane m_planes [6]
 array of planes for fustrum More...
 
Vec3 m_ntl
 points for the fustrum drawing More...
 
Vec3 m_ntr
 
Vec3 m_nbl
 
Vec3 m_nbr
 
Vec3 m_ftl
 
Vec3 m_ftr
 
Vec3 m_fbl
 
Vec3 m_fbr
 
Mat4 m_projectionMatrix
 Projection a Matrix to hold the perspective transfomatio matrix for the camera. More...
 

Detailed Description

simple camera class to allow movement in an opengl scene. a lot of this stuff is from the HILL book Computer Graphics with OpenGL 2nd Ed Prentice Hall a very good book fustrum culling modified from http://www.lighthouse3d.com/opengl/viewfrustum/index.php?defvf

Author
Jonathan Macey
Version
5.0
Date
Last Update added fustrum calculation Revision History :
27/08/08 Added experimental projection modes 28/09/09 Updated to NCCA Coding standard
Todo:
Finish off the different projections modes at present persp and ortho work

Definition at line 54 of file Camera.h.

Member Enumeration Documentation

enum ngl::Camera::ProjPlane : char
strongprotected

index values for the planes array

Enumerator
TOP 
BOTTOM 
LEFT 
RIGHT 
NEARP 
FARP 

Definition at line 363 of file Camera.h.

Constructor & Destructor Documentation

ngl::Camera::Camera ( )
noexcept

default constructor

Definition at line 39 of file Camera.cpp.

References m_aspect, m_eye, m_fov, m_height, m_width, m_zFar, m_zNear, and ngl::Vec4::set().

+ Here is the call graph for this function:

ngl::Camera::Camera ( const Vec3 _eye,
const Vec3 _look,
const Vec3 _up 
)
noexcept

constructor setting the camera using eye look and up

Parameters
[in]_eyethe eye position of the Camera
[in]_lookwhere the camera is looking
[in]_upthe notion of upwardness for the camers (get re-calculated from the other vectors)

Definition at line 86 of file Camera.cpp.

References setDefaultCamera().

+ Here is the call graph for this function:

Member Function Documentation

CameraIntercept ngl::Camera::boxInFrustum ( const AABB b) const
noexcept

check to see if the AABB passed in is within the frustum

Parameters
[in]AABBto test
Returns
the result of the test (inside outside intercept)

Definition at line 479 of file Camera.cpp.

References ngl::Plane::getNormal(), ngl::INSIDE, ngl::INTERSECT, m_planes, and ngl::OUTSIDE.

+ Here is the call graph for this function:

void ngl::Camera::calculateFrustum ( )
noexcept

calculate the frustum for clipping etc

Code modified from http://www.lighthouse3d.com/opengl/viewfrustum/index.php?intro

Definition at line 358 of file Camera.cpp.

References BOTTOM, FARP, LEFT, m_aspect, m_eye, m_fbl, m_fbr, m_fov, m_ftl, m_ftr, m_n, m_nbl, m_nbr, m_ntl, m_ntr, m_planes, m_u, m_v, m_zFar, m_zNear, NEARP, ngl::radians(), RIGHT, TOP, and ngl::Vec4::toVec3().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::drawFrustum ( )
noexcept

draw the frustum for clipping etc

Definition at line 387 of file Camera.cpp.

References ngl::VAOFactory::createVAO(), GL_FLOAT, GL_LINES, m_fbl, m_fbr, m_ftl, m_ftr, m_nbl, m_nbr, m_ntl, and m_ntr.

+ Here is the call graph for this function:

Real ngl::Camera::getAspect ( ) const
inlinenoexcept

get the aspect value

Returns
the current aspect value

Definition at line 249 of file Camera.h.

+ Here is the caller graph for this function:

Vec4 ngl::Camera::getEye ( ) const
inlinenoexcept

get the eye position

Returns
the current eye pos

Definition at line 205 of file Camera.h.

+ Here is the caller graph for this function:

Real ngl::Camera::getFar ( ) const
inlinenoexcept

get the far clip value

Returns
the current far clip value

Definition at line 259 of file Camera.h.

+ Here is the caller graph for this function:

Real ngl::Camera::getFOV ( ) const
inlinenoexcept

get the fov value

Returns
the current fov value

Definition at line 244 of file Camera.h.

+ Here is the caller graph for this function:

Vec4 ngl::Camera::getLook ( ) const
inlinenoexcept

get the look position

Returns
the current look pos

Definition at line 219 of file Camera.h.

+ Here is the caller graph for this function:

Vec4 ngl::Camera::getN ( ) const
inlinenoexcept

get the n vector

Returns
the current n vector

Definition at line 239 of file Camera.h.

Real ngl::Camera::getNear ( ) const
inlinenoexcept

get the near clip value

Returns
the current near clip value

Definition at line 254 of file Camera.h.

+ Here is the caller graph for this function:

const Mat4& ngl::Camera::getProjectionMatrix ( )
inlinenoexcept

accesor to get the projection matrix

Returns
the current projection matrix

Definition at line 195 of file Camera.h.

Vec4 ngl::Camera::getU ( ) const
inlinenoexcept

get the u vector

Returns
the current u vector

Definition at line 229 of file Camera.h.

Vec4 ngl::Camera::getUp ( ) const
inlinenoexcept

get the up vector

Returns
the current up vector

Definition at line 224 of file Camera.h.

+ Here is the caller graph for this function:

Vec4 ngl::Camera::getV ( ) const
inlinenoexcept

get the v vector

Returns
the current v vector

Definition at line 234 of file Camera.h.

const Mat4& ngl::Camera::getViewMatrix ( )
inlinenoexcept

accesor to get the view matrix

Returns
the current view matrix

Definition at line 190 of file Camera.h.

Mat4 ngl::Camera::getVPMatrix ( ) const
inlinenoexcept

get the View * Projection matrix used as part of the MVP calculations

Returns
the m_projectionMatrix*m_viewMatrix

Definition at line 200 of file Camera.h.

CameraIntercept ngl::Camera::isPointInFrustum ( const Vec3 _p) const
noexcept

check to see if the point passed in is within the frustum

Parameters
_pthe point to check
Returns
the result of the test (inside outside intercept)

Definition at line 441 of file Camera.cpp.

References ngl::INSIDE, m_planes, and ngl::OUTSIDE.

CameraIntercept ngl::Camera::isSphereInFrustum ( const Vec3 _p,
Real  _radius 
) const
noexcept

check to see if the sphere passed in is within the frustum

Parameters
[in]_pthe center of the sphere
[in]_radiusthe radius of the sphere
Returns
the result of the test (inside outside intercept)

Definition at line 457 of file Camera.cpp.

References ngl::Plane::distance(), ngl::INSIDE, ngl::INTERSECT, m_planes, and ngl::OUTSIDE.

+ Here is the call graph for this function:

void ngl::Camera::move ( Real  _dx,
Real  _dy,
Real  _dz 
)
noexcept

move the camera in world space (i.e. add a translation to each of the axis

Parameters
[in]_dxthe translation in the x
[in]_dythe translation in the y
[in]_dzthe translation in the z

Definition at line 181 of file Camera.cpp.

References m_eye, ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::moveBoth ( Real  _dx,
Real  _dy,
Real  _dz 
)
noexcept

move both the eye and the look at the same time

Parameters
[in]_dxammount to move in the x
[in]_dyammount to move in the y
[in]_dzammount to move in the z

Definition at line 190 of file Camera.cpp.

References ngl::Vec4::cross(), m_eye, m_look, m_n, m_u, m_up, m_v, ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, ngl::Vec4::normalize(), ngl::Vec4::set(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::moveEye ( Real  _dx,
Real  _dy,
Real  _dz 
)
noexcept

move the eye position

Parameters
[in]_dxammount to move the eye in the x
[in]_dyammount to move the eye in the y
[in]_dzammount to move the eye in the z

Definition at line 247 of file Camera.cpp.

References ngl::Vec4::cross(), m_eye, m_look, m_n, m_u, m_up, m_v, ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, ngl::Vec4::normalize(), ngl::Vec4::set(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::moveLook ( Real  _dx,
Real  _dy,
Real  _dz 
)
noexcept

move the look position

Parameters
[in]_dxammount to move the look in the x
[in]_dyammount to move the look in the y
[in]_dzammount to move the look in the z

Definition at line 264 of file Camera.cpp.

References ngl::Vec4::cross(), m_eye, m_look, m_n, m_u, m_up, m_v, ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, ngl::Vec4::normalize(), ngl::Vec4::set(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::normalisedPitch ( Real  _angle)
noexcept

used to do a Pitch based on Euler rotation with normalised values

Parameters
[in]_anglethe angle to rotate in degrees

Definition at line 316 of file Camera.cpp.

References ngl::Mat4::identity(), m_n, m_u, m_v, ngl::Mat4::rotateX(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::normalisedRoll ( Real  _angle)
noexcept

used to do a Roll based on Euler rotation with normalised values

Parameters
[in]_anglethe angle to rotate in degrees

Definition at line 301 of file Camera.cpp.

References ngl::Mat4::identity(), m_n, m_u, m_v, ngl::Mat4::rotateZ(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::normalisedYaw ( Real  _angle)
noexcept

used to do a Yaw based on Euler rotation with normalised values

Parameters
[in]_anglethe angle to rotate in degrees

Definition at line 287 of file Camera.cpp.

References ngl::Mat4::identity(), m_n, m_u, m_v, ngl::Mat4::rotateY(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::pitch ( Real  _angle)
noexcept

roll the cameara around the x axis

Parameters
[in]_anglethe angle to roll in degrees

Definition at line 233 of file Camera.cpp.

References m_n, m_v, rotAxes(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::roll ( Real  _angle)
noexcept

roll the cameara around the Z axis

Parameters
[in]_anglethe angle to roll in degrees

Definition at line 226 of file Camera.cpp.

References m_u, m_v, rotAxes(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::rotAxes ( Vec4 io_a,
Vec4 io_b,
const Real  _angle 
)
protectednoexcept

internal function to calculate the new rotation vectors for the camera after a roll, pitch or yaw

Parameters
[in,out]io_athe first vector to be rotated
[in,out]io_bthe second vector to be rotated
[in]_anglethe angle to rotate

Definition at line 209 of file Camera.cpp.

References ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, and ngl::radians().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::set ( const Vec3 _eye,
const Vec3 _look,
const Vec3 _up 
)
noexcept

set the Camera position using eye look and up vectors

Parameters
[in]_eyethe new eye position
[in]_lookthe new look position
[in]_upthe notional up direction of the Camera

Definition at line 70 of file Camera.cpp.

References ngl::Vec4::cross(), m_eye, m_look, m_n, m_u, m_up, m_v, ngl::Vec4::normalize(), and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::setAspect ( Real  _asp)
noexcept

re-set the aspect ratio of the camera

Parameters
[in]_aspthe new aspect ratio

Definition at line 156 of file Camera.cpp.

References m_aspect, m_fov, m_zFar, m_zNear, and setShape().

+ Here is the call graph for this function:

void ngl::Camera::setDefaultCamera ( )
noexcept

sets some nice default camera values

Definition at line 53 of file Camera.cpp.

References m_aspect, m_eye, m_fov, m_look, m_up, m_zFar, m_zNear, ngl::Vec4::set(), setShape(), and ngl::Vec4::up().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::setEye ( Vec4  _e)
inlinenoexcept

set the eye position and re-calculate the matrices

Definition at line 209 of file Camera.h.

void ngl::Camera::setLook ( Vec4  _e)
inlinenoexcept

set the look position and re-calculate the matrices

Definition at line 213 of file Camera.h.

void ngl::Camera::setPerspProjection ( )
protectednoexcept

function used to set the perspective projection matrix values

Definition at line 108 of file Camera.cpp.

References ngl::Mat4::identity(), m_aspect, m_fov, ngl::Mat4::m_m, m_projectionMatrix, m_zFar, m_zNear, and ngl::radians().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::setProjectionMatrix ( )
protectednoexcept

set the projection matrix

Definition at line 126 of file Camera.cpp.

References m_projectionMatrix, ngl::Mat4::null(), and setPerspProjection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::setShape ( Real  _viewAngle,
Real  _aspect,
Real  _near,
Real  _far 
)
noexcept

set the shape of the Camera

Parameters
[in]_viewAnglethe view angle of the camera from the eye
[in]_aspectthe aspect ratio of the camera can be calculated from Width/height
[in]_nearthe near clipping plane
[in]_farthe far clipping plane

Definition at line 134 of file Camera.cpp.

References ngl::CAMERANEARLIMIT, m_aspect, m_fov, m_zFar, m_zNear, NGL_ASSERT, and setProjectionMatrix().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::setViewAngle ( Real  _angle)
noexcept

set the viewangle for the Camera

Parameters
[in]_anglenew angle

Definition at line 163 of file Camera.cpp.

References m_aspect, m_fov, m_zFar, m_zNear, and setShape().

+ Here is the call graph for this function:

void ngl::Camera::setViewMatrix ( )
protectednoexcept

method to set the modelview matrix values for the current camera, this method load the matrix Modelview into OpenGL

Definition at line 95 of file Camera.cpp.

References calculateFrustum(), ngl::Vec4::dot(), m_eye, ngl::Mat4::m_m, m_n, m_u, m_v, m_viewMatrix, ngl::Vec4::m_x, ngl::Vec4::m_y, and ngl::Vec4::m_z.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ngl::Camera::slide ( Real  _du,
Real  _dv,
Real  _dn 
)
noexcept

slide the camera around the U V and N axis

Parameters
[in]_duammount to slide in the U
[in]_dvammount to slide in the V
[in]_dnammount to slide in the N

Definition at line 171 of file Camera.cpp.

References m_eye, m_n, m_u, m_v, ngl::Vec4::m_x, ngl::Vec4::m_y, ngl::Vec4::m_z, and setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::update ( )
noexcept

Use is called to make this the current camera and set the MODELVIEW and PROJECTION matrices in OpenGL.

Definition at line 281 of file Camera.cpp.

References setViewMatrix().

+ Here is the call graph for this function:

void ngl::Camera::writeRib ( RibExport _rib) const
noexcept

write out the Camera so it may be used in Renderman, this writes a transform command in rib format so the OpenGL camera mirrors that of the renderman one

Parameters
[in]_ribthe pointer to the RibExport class currently being used
Todo:
make this and the rest of the Rib class work as a friend class rather than as present

Definition at line 333 of file Camera.cpp.

References ngl::Mat4::m_openGL, and m_viewMatrix.

void ngl::Camera::yaw ( Real  _angle)
noexcept

roll the cameara around the y axis

Parameters
[in]_anglethe angle to roll in degrees

Definition at line 240 of file Camera.cpp.

References m_n, m_u, rotAxes(), and setViewMatrix().

+ Here is the call graph for this function:

Member Data Documentation

Real ngl::Camera::m_aspect
protected

used to store the current camera aspect ratio (can be derived from Width / Height

Definition at line 339 of file Camera.h.

Vec4 ngl::Camera::m_eye
protected

the position of the Camera used to calculate the local cord frame

Definition at line 319 of file Camera.h.

Vec3 ngl::Camera::m_fbl
protected

Definition at line 367 of file Camera.h.

Vec3 ngl::Camera::m_fbr
protected

Definition at line 367 of file Camera.h.

Real ngl::Camera::m_fov
protected

the feild of view of the camera view volume, measured from the eye

Definition at line 351 of file Camera.h.

Vec3 ngl::Camera::m_ftl
protected

Definition at line 367 of file Camera.h.

Vec3 ngl::Camera::m_ftr
protected

Definition at line 367 of file Camera.h.

Real ngl::Camera::m_height
protected

the height of the display image used for some perspective projection calculations

Definition at line 335 of file Camera.h.

Vec4 ngl::Camera::m_look
protected

where the camera is looking to, used with Eye to calculate the Vector m_n

Definition at line 323 of file Camera.h.

Vec4 ngl::Camera::m_n
protected

vector for the Camera local cord frame

Definition at line 315 of file Camera.h.

Vec3 ngl::Camera::m_nbl
protected

Definition at line 367 of file Camera.h.

Vec3 ngl::Camera::m_nbr
protected

Definition at line 367 of file Camera.h.

Vec3 ngl::Camera::m_ntl
protected

points for the fustrum drawing

Definition at line 367 of file Camera.h.

Vec3 ngl::Camera::m_ntr
protected

Definition at line 367 of file Camera.h.

Plane ngl::Camera::m_planes[6]
protected

array of planes for fustrum

Definition at line 359 of file Camera.h.

Mat4 ngl::Camera::m_projectionMatrix
protected

Projection a Matrix to hold the perspective transfomatio matrix for the camera.

Definition at line 371 of file Camera.h.

Vec4 ngl::Camera::m_u
protected

vector for the Camera local cord frame

Definition at line 307 of file Camera.h.

Vec4 ngl::Camera::m_up
protected

gives a general indication of which way up the camera is

Definition at line 327 of file Camera.h.

Vec4 ngl::Camera::m_v
protected

vector for the Camera local cord frame

Definition at line 311 of file Camera.h.

Mat4 ngl::Camera::m_viewMatrix
protected

a Matrix to hold the combined modelling and viewing matrix to load into OpenGL

Definition at line 355 of file Camera.h.

Real ngl::Camera::m_width
protected

the width of the display image used for some perspective projection calculations

Definition at line 331 of file Camera.h.

Real ngl::Camera::m_zFar
protected

the far clipping plane of the camera view volume

Definition at line 347 of file Camera.h.

Real ngl::Camera::m_zNear
protected

the near clipping plane of the camera view volume

Definition at line 343 of file Camera.h.


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