Nebula
|
#include <mayacamerautil.h>
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::mat4 & | GetCameraTransform () const |
get the current camera transform | |
const Math::scalar & | GetViewDistance () const |
get view distance | |
const Math::point & | GetCenterOfInterest () 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 |
RenderUtil::MayaCameraUtil::MayaCameraUtil | ( | ) |
constructor
|
inline |
get the current camera transform
|
inline |
get center of interest
|
inline |
get view distance
void RenderUtil::MayaCameraUtil::Reset | ( | ) |
reset the object to its default settings
|
inline |
set center of interest
|
inline |
set mouse movement
|
inline |
set state of orbit button
|
inline |
set orbiting vector
|
inline |
set state of panning button
|
inline |
set panning vector
void RenderUtil::MayaCameraUtil::Setup | ( | const Math::point & | defaultCenterOfInterest, |
const Math::point & | defaultEyePos, | ||
const Math::vector & | defaultUpVec ) |
setup the object
|
inline |
set view distance
|
inline |
set state of zoom button
|
inline |
set zoom-in value
|
inline |
set state of zoom-in button
|
inline |
set zoom-out value
|
inline |
set state of zoom-out button
void RenderUtil::MayaCameraUtil::Update | ( | float | deltaTime | ) |
update the view matrix
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |