class CameraComponent

Camera component class.

File location: framework/cauldron/framework/inc/core/components/cameracomponent.h

Construction

Return type

Description

CameraComponent ( Entity * pOwner, ComponentData * pData, CameraComponentMgr * pManager )
Constructor.

Methods

Return type

Description

void

Update (double deltaTime)
Component update. Update the camera if dirty. Processes input, updates all matrices.

CameraComponentData &

Component data accessor.

const CameraComponentData &

GetData () const

void

Marks the camera dirty.

const Vec4 &

Gets the camera’s translation matrix.

const Vec3

GetCameraPos () const
Gets the camera’s position.

const Vec4

GetDirection () const
Gets the camera’s direction.

const Mat4 &

GetView () const
Gets the camera’s view matrix.

const Mat4 &

GetProjection () const
Gets the camera’s projection matrix.

const Mat4 &

Gets the camera’s view projection matrix.

const Mat4 &

Gets the camera’s inverse view matrix.

const Mat4 &

Gets the camera’s inverse projection matrix.

const Mat4 &

Gets the camera’s inverse view projection matrix.

const Mat4 &

Gets the camera’s previous view matrix.

const Mat4 &

Gets the camera’s previous view projection matrix.

const Mat4 &

Gets the camera’s jittered projection matrix.

const Mat4 &

Gets the camera’s previous jittered projection matrix.

const float

GetNearPlane () const
Gets the camera’s near plane value.

const float

GetFarPlane () const
Gets the camera’s far plane value.

const float

GetFovX () const
Gets the camera’s horizontal field of view.

const float

GetFovY () const
Gets the camera’s vertical field of view.

bool

Let’s the caller know if this camera was reset this frame.

static void

SetJitterCallbackFunc (CameraJitterCallback callbackFunc)
Sets the camera’s jitter update callback to use.

Detailed description

Camera component class. Implements camera functionality on an entity.

Construction

CameraComponent

Copied!

CameraComponent (
    Entity * pOwner,
    ComponentData * pData,
    CameraComponentMgr * pManager
)

Constructor.


Methods

Update

Copied!

virtual void Update (double deltaTime)

Component update. Update the camera if dirty. Processes input, updates all matrices.


GetData

Copied!

CameraComponentData & GetData ()

Component data accessor.


SetDirty

Copied!

void SetDirty ()

Marks the camera dirty.


GetCameraTranslation

Copied!

const Vec4 & GetCameraTranslation () const

Gets the camera’s translation matrix.


GetCameraPos

Copied!

const Vec3  GetCameraPos () const

Gets the camera’s position.


GetDirection

Copied!

const Vec4  GetDirection () const

Gets the camera’s direction.


GetView

Copied!

const Mat4 & GetView () const

Gets the camera’s view matrix.


GetProjection

Copied!

const Mat4 & GetProjection () const

Gets the camera’s projection matrix.


GetViewProjection

Copied!

const Mat4 & GetViewProjection () const

Gets the camera’s view projection matrix.


GetInverseView

Copied!

const Mat4 & GetInverseView () const

Gets the camera’s inverse view matrix.


GetInverseProjection

Copied!

const Mat4 & GetInverseProjection () const

Gets the camera’s inverse projection matrix.


GetInverseViewProjection

Copied!

const Mat4 & GetInverseViewProjection () const

Gets the camera’s inverse view projection matrix.


GetPreviousView

Copied!

const Mat4 & GetPreviousView () const

Gets the camera’s previous view matrix.


GetPreviousViewProjection

Copied!

const Mat4 & GetPreviousViewProjection () const

Gets the camera’s previous view projection matrix.


GetProjectionJittered

Copied!

const Mat4 & GetProjectionJittered () const

Gets the camera’s jittered projection matrix.


GetPrevProjectionJittered

Copied!

const Mat4 & GetPrevProjectionJittered () const

Gets the camera’s previous jittered projection matrix.


GetNearPlane

Copied!

const float GetNearPlane () const

Gets the camera’s near plane value.


GetFarPlane

Copied!

const float GetFarPlane () const

Gets the camera’s far plane value.


GetFovX

Copied!

const float GetFovX () const

Gets the camera’s horizontal field of view.


GetFovY

Copied!

const float GetFovY () const

Gets the camera’s vertical field of view.


WasCameraReset

Copied!

bool WasCameraReset () const

Let’s the caller know if this camera was reset this frame.


SetJitterCallbackFunc

Copied!

static void SetJitterCallbackFunc (CameraJitterCallback  callbackFunc)

Sets the camera’s jitter update callback to use.