Nebula
Loading...
Searching...
No Matches
RenderUtil::FreeCameraUtil Class Reference

#include <freecamerautil.h>

Detailed Description

Implements a free camera.

Public Member Functions

 FreeCameraUtil ()
 constructor
 
void Setup (const Math::point &defaultEyePos, const Math::vector &defaultEyeVec)
 sets up free camera
 
void Reset ()
 resets free camera to default values
 
void Update ()
 updates camera matrix
 
const Math::mat4GetTransform () const
 gets camera transform
 
void SetRotateButton (bool state)
 sets the state of the rotate button
 
void SetAccelerateButton (bool state)
 sets the state of the accelerate button
 
void SetMouseMovement (Math::vec2 movement)
 sets the mouse movement
 
void SetRotationSpeed (float speed)
 sets the rotation speed
 
void SetMovementSpeed (float speed)
 sets the movement speed
 
void SetForwardsKey (bool state)
 sets the forward movement key
 
void SetBackwardsKey (bool state)
 sets the backward movement key
 
void SetLeftStrafeKey (bool state)
 sets the left strafe key
 
void SetRightStrafeKey (bool state)
 sets the right strafe key
 
void SetUpKey (bool state)
 sets the up movement key
 
void SetDownKey (bool state)
 sets the down movement key
 

Private Attributes

Math::point defaultEyePos
 
Math::vector defaultEyeVec
 
Math::vec2 mouseMovement
 
Math::polar viewAngles
 
Math::point position
 
Math::mat4 cameraTransform
 
float rotationSpeed
 
float moveSpeed
 
bool rotateButton
 
bool accelerateButton
 
bool forwardsKey
 
bool backwardsKey
 
bool leftStrafeKey
 
bool rightStrafeKey
 
bool upKey
 
bool downKey
 

Constructor & Destructor Documentation

◆ FreeCameraUtil()

RenderUtil::FreeCameraUtil::FreeCameraUtil ( )

constructor

Member Function Documentation

◆ GetTransform()

const Math::mat4 & RenderUtil::FreeCameraUtil::GetTransform ( ) const
inline

gets camera transform

◆ Reset()

void RenderUtil::FreeCameraUtil::Reset ( )

resets free camera to default values

◆ SetAccelerateButton()

void RenderUtil::FreeCameraUtil::SetAccelerateButton ( bool state)
inline

sets the state of the accelerate button

◆ SetBackwardsKey()

void RenderUtil::FreeCameraUtil::SetBackwardsKey ( bool state)
inline

sets the backward movement key

◆ SetDownKey()

void RenderUtil::FreeCameraUtil::SetDownKey ( bool state)
inline

sets the down movement key

◆ SetForwardsKey()

void RenderUtil::FreeCameraUtil::SetForwardsKey ( bool state)
inline

sets the forward movement key

◆ SetLeftStrafeKey()

void RenderUtil::FreeCameraUtil::SetLeftStrafeKey ( bool state)
inline

sets the left strafe key

◆ SetMouseMovement()

void RenderUtil::FreeCameraUtil::SetMouseMovement ( Math::vec2 movement)
inline

sets the mouse movement

◆ SetMovementSpeed()

void RenderUtil::FreeCameraUtil::SetMovementSpeed ( float speed)
inline

sets the movement speed

◆ SetRightStrafeKey()

void RenderUtil::FreeCameraUtil::SetRightStrafeKey ( bool state)
inline

sets the right strafe key

◆ SetRotateButton()

void RenderUtil::FreeCameraUtil::SetRotateButton ( bool state)
inline

sets the state of the rotate button

◆ SetRotationSpeed()

void RenderUtil::FreeCameraUtil::SetRotationSpeed ( float speed)
inline

sets the rotation speed

◆ Setup()

void RenderUtil::FreeCameraUtil::Setup ( const Math::point & defaultEyePos,
const Math::vector & defaultEyeVec )

sets up free camera

◆ SetUpKey()

void RenderUtil::FreeCameraUtil::SetUpKey ( bool state)
inline

sets the up movement key

◆ Update()

void RenderUtil::FreeCameraUtil::Update ( )

updates camera matrix

Member Data Documentation

◆ accelerateButton

bool RenderUtil::FreeCameraUtil::accelerateButton
private

◆ backwardsKey

bool RenderUtil::FreeCameraUtil::backwardsKey
private

◆ cameraTransform

Math::mat4 RenderUtil::FreeCameraUtil::cameraTransform
private

◆ defaultEyePos

Math::point RenderUtil::FreeCameraUtil::defaultEyePos
private

◆ defaultEyeVec

Math::vector RenderUtil::FreeCameraUtil::defaultEyeVec
private

◆ downKey

bool RenderUtil::FreeCameraUtil::downKey
private

◆ forwardsKey

bool RenderUtil::FreeCameraUtil::forwardsKey
private

◆ leftStrafeKey

bool RenderUtil::FreeCameraUtil::leftStrafeKey
private

◆ mouseMovement

Math::vec2 RenderUtil::FreeCameraUtil::mouseMovement
private

◆ moveSpeed

float RenderUtil::FreeCameraUtil::moveSpeed
private

◆ position

Math::point RenderUtil::FreeCameraUtil::position
private

◆ rightStrafeKey

bool RenderUtil::FreeCameraUtil::rightStrafeKey
private

◆ rotateButton

bool RenderUtil::FreeCameraUtil::rotateButton
private

◆ rotationSpeed

float RenderUtil::FreeCameraUtil::rotationSpeed
private

◆ upKey

bool RenderUtil::FreeCameraUtil::upKey
private

◆ viewAngles

Math::polar RenderUtil::FreeCameraUtil::viewAngles
private

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