"L. Spiro Engine"
Public Member Functions | Protected Member Functions | Protected Attributes

lse::CCamera Class Reference

A standard camera. More...

#include <LSECamera.h>

Inheritance diagram for lse::CCamera:
lse::CActor lse::CEntity

List of all members.

Public Member Functions

LSVOID LSE_CALL SetPerspParms (LSREAL _fFov, LSREAL _fAspect, LSREAL _fNearPlane, LSREAL _fFarPlane)
LSVOID LSE_CALL SetOrthoParms (LSREAL _fLeft, LSREAL _fTop, LSREAL _fRight, LSREAL _fBottom, LSREAL _fNearPlane=-LSM_ONE, LSREAL _fFarPlane=LSM_ONE)
virtual LSUINT32 LSE_CALL EntityType () const
LSVOID LSE_CALL Update ()
LSE_INLINE const CMatrix4x4
&LSE_CALL 
ViewMatrix () const
LSE_INLINE const CMatrix4x4
&LSE_CALL 
InvViewMatrix () const
LSE_INLINE const CMatrix4x4
&LSE_CALL 
ProjMatrix () const
LSE_INLINE const CMatrix4x4
&LSE_CALL 
ViewProjMatrix () const
LSE_INLINE const CFrustum &LSE_CALL Frustum () const
LSE_INLINE LSREAL LSE_CALL Fov () const
LSE_INLINE LSREAL LSE_CALL NearPlane () const
LSE_INLINE LSREAL LSE_CALL FarPlane () const
LSE_INLINE LSREAL LSE_CALL Aspect () const

Protected Member Functions

LSVOID LSE_CALL AdjustToCurScreenSize ()

Protected Attributes

CMatrix4x4 m_mViewMatrix
CMatrix4x4 m_mProjMatrix
CMatrix4x4 m_mViewProjMatrix
CFrustum m_fFrustum
LSE_CAM_TYPE m_ctCamType
LSREAL m_fNear
LSREAL m_fFar
LSREAL m_fFov
LSREAL m_fAspect
LSREAL m_fMinX
LSREAL m_fMinY
LSREAL m_fMaxX
LSREAL m_fMaxY
LSUINT32 m_ui32InitialScrW
LSUINT32 m_ui32InitialScrH
LSUINT32 m_ui32CurScrW
LSUINT32 m_ui32CurScrH

Detailed Description

A standard camera.

Class CCamera Description: A standard camera.


Member Function Documentation

LSVOID LSE_CALL lse::CCamera::AdjustToCurScreenSize ( ) [protected]

Adjusts the camera to the current screen resolution.

LSE_INLINE LSREAL LSE_CALL lse::CCamera::Aspect ( ) const

Gets the camera's aspect ratio.

Returns:
Returns the camera's aspect ratio.
virtual LSUINT32 LSE_CALL lse::CCamera::EntityType ( ) const [virtual]

Get the entity type.

Returns:
Returns the type mask for this entity.

Reimplemented from lse::CActor.

LSE_INLINE LSREAL LSE_CALL lse::CCamera::FarPlane ( ) const

Gets the camera's far distance.

Returns:
Returns the camera's far distance.
LSE_INLINE LSREAL LSE_CALL lse::CCamera::Fov ( ) const

Gets the camera's field-of-view.

Returns:
Returns the camera's field-of-view.
LSE_INLINE const CFrustum &LSE_CALL lse::CCamera::Frustum ( ) const

Gets the frustum of this camera.

Returns:
Returns the frustum of this camera.
LSE_INLINE const CMatrix4x4 &LSE_CALL lse::CCamera::InvViewMatrix ( ) const

Gets the inverse view matrix.

Returns:
Returns the inverse view matrix.
LSE_INLINE LSREAL LSE_CALL lse::CCamera::NearPlane ( ) const

Gets the camera's near distance.

Returns:
Returns the camera's near distance.
LSE_INLINE const CMatrix4x4 &LSE_CALL lse::CCamera::ProjMatrix ( ) const

Gets the projection matrix.

Returns:
Returns the projection matrix.
LSVOID LSE_CALL lse::CCamera::SetOrthoParms ( LSREAL  _fLeft,
LSREAL  _fTop,
LSREAL  _fRight,
LSREAL  _fBottom,
LSREAL  _fNearPlane = -LSM_ONE,
LSREAL  _fFarPlane = LSM_ONE 
)

Sets the orthogonal projection parameters for a 2D camera. Creates a right-handed orthogonal matrix.

Parameters:
_fLeftThe left of the view.
_fTopThe top of the view.
_fRightThe right of the view.
_fBottomThe bottom of the view.
_fNearPlaneThe near.
_fFarPlaneThe far.
LSVOID LSE_CALL lse::CCamera::SetPerspParms ( LSREAL  _fFov,
LSREAL  _fAspect,
LSREAL  _fNearPlane,
LSREAL  _fFarPlane 
)

Sets the projection parameters for a 3D camera. Creates a right-handed projection matrix.

Parameters:
_fFovField of view in the Y direction in radians.
_fAspectAspect ratio, defined as view space width divided by height.
_fNearPlaneZ-value of the near view-plane.
_fFarPlaneZ-value of the far view-plane.
LSVOID LSE_CALL lse::CCamera::Update ( )

Causes all matrices to be built.

LSE_INLINE const CMatrix4x4 &LSE_CALL lse::CCamera::ViewMatrix ( ) const

Gets the view matrix.

Returns:
Returns the view matrix.
LSE_INLINE const CMatrix4x4 &LSE_CALL lse::CCamera::ViewProjMatrix ( ) const

Gets the view-projection matrix.

Returns:
Returns the view-projection matrix.

Member Data Documentation

The camera type.

LSREAL lse::CCamera::m_fAspect [protected]

Aspect ratio.

LSREAL lse::CCamera::m_fFar [protected]

The far plane.

LSREAL lse::CCamera::m_fFov [protected]

Field of view.

CFrustum lse::CCamera::m_fFrustum [protected]

The view frustum.

LSREAL lse::CCamera::m_fMaxX [protected]

Maximum X for orthogonal projections.

LSREAL lse::CCamera::m_fMaxY [protected]

Maximum Y for orthogonal projections.

LSREAL lse::CCamera::m_fMinX [protected]

Minimum X for orthogonal projections.

LSREAL lse::CCamera::m_fMinY [protected]

Minimum Y for orthogonal projections.

LSREAL lse::CCamera::m_fNear [protected]

The near plane.

CMatrix4x4 lse::CCamera::m_mProjMatrix [protected]

The projection matrix.

CMatrix4x4 lse::CCamera::m_mViewMatrix [protected]

The view matrix.

CMatrix4x4 lse::CCamera::m_mViewProjMatrix [protected]

The view-projection matrix.

LSUINT32 lse::CCamera::m_ui32CurScrH [protected]

Current screen height.

LSUINT32 lse::CCamera::m_ui32CurScrW [protected]

Current screen width.

LSUINT32 lse::CCamera::m_ui32InitialScrH [protected]

Initial screen height.

LSUINT32 lse::CCamera::m_ui32InitialScrW [protected]

Initial screen width.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator