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

#include <mayacamerautil.h>

Detailed Description

Helper class to implement a "Maya camera" with pan/zoom/orbit.

Just feed input into the class per its setter methods, call Update(), and get the computed view matrix.

Public Member Functions

 MayaCameraUtil ()
 constructor
void Setup (const Math::point &defaultCenterOfInterest, const Math::point &defaultEyePos, const Math::vector &defaultUpVec)
 setup the object
void Reset ()
 reset the object to its default settings
void Update (float deltaTime)
 update the view matrix
const Math::mat4GetCameraTransform () const
 get the current camera transform
const Math::scalarGetViewDistance () const
 get view distance
const Math::pointGetCenterOfInterest () const
 get center of interest
void SetOrbitButton (bool b)
 set state of orbit button
void SetPanButton (bool b)
 set state of panning button
void SetZoomButton (bool b)
 set state of zoom button
void SetZoomInButton (bool b)
 set state of zoom-in button
void SetZoomOutButton (bool b)
 set state of zoom-out button
void SetMouseMovement (const Math::vec2 &v)
 set mouse movement
void SetZoomIn (float v)
 set zoom-in value
void SetZoomOut (float v)
 set zoom-out value
void SetPanning (const Math::vec2 &v)
 set panning vector
void SetOrbiting (const Math::vec2 &v)
 set orbiting vector
void SetCenterOfInterest (const Math::point &point)
 set center of interest
void SetViewDistance (const Math::scalar &distance)
 set view distance

Private Attributes

Math::point defaultCenterOfInterest
Math::point defaultEyePos
Math::vector defaultUpVec
Math::polar viewAngles
Math::scalar viewDistance
Math::point centerOfInterest
Math::mat4 cameraTransform
bool orbitButton
bool panButton
bool zoomButton
bool zoomInButton
bool zoomOutButton
Math::vec2 mouseMovement
float zoomIn
float zoomOut
Math::vec2 panning
Math::vec2 orbiting

Constructor & Destructor Documentation

◆ MayaCameraUtil()

RenderUtil::MayaCameraUtil::MayaCameraUtil ( )

constructor

Member Function Documentation

◆ GetCameraTransform()

const Math::mat4 & RenderUtil::MayaCameraUtil::GetCameraTransform ( ) const
inline

get the current camera transform

◆ GetCenterOfInterest()

const Math::point & RenderUtil::MayaCameraUtil::GetCenterOfInterest ( ) const
inline

get center of interest

◆ GetViewDistance()

const Math::scalar & RenderUtil::MayaCameraUtil::GetViewDistance ( ) const
inline

get view distance

◆ Reset()

void RenderUtil::MayaCameraUtil::Reset ( )

reset the object to its default settings

◆ SetCenterOfInterest()

void RenderUtil::MayaCameraUtil::SetCenterOfInterest ( const Math::point & point)
inline

set center of interest

◆ SetMouseMovement()

void RenderUtil::MayaCameraUtil::SetMouseMovement ( const Math::vec2 & v)
inline

set mouse movement

◆ SetOrbitButton()

void RenderUtil::MayaCameraUtil::SetOrbitButton ( bool b)
inline

set state of orbit button

◆ SetOrbiting()

void RenderUtil::MayaCameraUtil::SetOrbiting ( const Math::vec2 & v)
inline

set orbiting vector

◆ SetPanButton()

void RenderUtil::MayaCameraUtil::SetPanButton ( bool b)
inline

set state of panning button

◆ SetPanning()

void RenderUtil::MayaCameraUtil::SetPanning ( const Math::vec2 & v)
inline

set panning vector

◆ Setup()

void RenderUtil::MayaCameraUtil::Setup ( const Math::point & defaultCenterOfInterest,
const Math::point & defaultEyePos,
const Math::vector & defaultUpVec )

setup the object

◆ SetViewDistance()

void RenderUtil::MayaCameraUtil::SetViewDistance ( const Math::scalar & distance)
inline

set view distance

◆ SetZoomButton()

void RenderUtil::MayaCameraUtil::SetZoomButton ( bool b)
inline

set state of zoom button

◆ SetZoomIn()

void RenderUtil::MayaCameraUtil::SetZoomIn ( float v)
inline

set zoom-in value

◆ SetZoomInButton()

void RenderUtil::MayaCameraUtil::SetZoomInButton ( bool b)
inline

set state of zoom-in button

◆ SetZoomOut()

void RenderUtil::MayaCameraUtil::SetZoomOut ( float v)
inline

set zoom-out value

◆ SetZoomOutButton()

void RenderUtil::MayaCameraUtil::SetZoomOutButton ( bool b)
inline

set state of zoom-out button

◆ Update()

void RenderUtil::MayaCameraUtil::Update ( float deltaTime)

update the view matrix

Member Data Documentation

◆ cameraTransform

Math::mat4 RenderUtil::MayaCameraUtil::cameraTransform
private

◆ centerOfInterest

Math::point RenderUtil::MayaCameraUtil::centerOfInterest
private

◆ defaultCenterOfInterest

Math::point RenderUtil::MayaCameraUtil::defaultCenterOfInterest
private

◆ defaultEyePos

Math::point RenderUtil::MayaCameraUtil::defaultEyePos
private

◆ defaultUpVec

Math::vector RenderUtil::MayaCameraUtil::defaultUpVec
private

◆ mouseMovement

Math::vec2 RenderUtil::MayaCameraUtil::mouseMovement
private

◆ orbitButton

bool RenderUtil::MayaCameraUtil::orbitButton
private

◆ orbiting

Math::vec2 RenderUtil::MayaCameraUtil::orbiting
private

◆ panButton

bool RenderUtil::MayaCameraUtil::panButton
private

◆ panning

Math::vec2 RenderUtil::MayaCameraUtil::panning
private

◆ viewAngles

Math::polar RenderUtil::MayaCameraUtil::viewAngles
private

◆ viewDistance

Math::scalar RenderUtil::MayaCameraUtil::viewDistance
private

◆ zoomButton

bool RenderUtil::MayaCameraUtil::zoomButton
private

◆ zoomIn

float RenderUtil::MayaCameraUtil::zoomIn
private

◆ zoomInButton

bool RenderUtil::MayaCameraUtil::zoomInButton
private

◆ zoomOut

float RenderUtil::MayaCameraUtil::zoomOut
private

◆ zoomOutButton

bool RenderUtil::MayaCameraUtil::zoomOutButton
private

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