Arc Look At Camera
Arc ball based camera
Public Member Functions
ArcLookAt Class Reference

#include <ArcLookAt.hpp>

List of all members.

Public Member Functions

void doReferenceDown (const glm::vec2 &ssPos)
void doPan (const glm::vec2 &ssPos)
void doRotation (const glm::vec2 &ssPos)
 Rotates about the look at position.
void doZoom (glm::float_t camZoom)
void doZoom (const glm::vec2 &ssPos)
void autoview (const CPM_GLM_AABB_NS::AABB &aabb, float fov)
glm::float_t getCamDistance () const
 Retrieves the camera's distance away from the look at point.
glm::vec3 getLookAt () const
 Retrieves the current lookat point.
glm::mat4 getWorldViewTransform () const

Detailed Description

Basic camera class that uses cpm-arc-ball to control view orientation. Supports a number of utility functions such as ensuring a given AABB is in the view of the frustum (zooming only). All coordinates, unless otherwise specified, are in 2D screen space coordinates.


Member Function Documentation

void autoview ( const CPM_GLM_AABB_NS::AABB &  aabb,
float  fov 
)

Implements autoview on a bounding box. Implemented just like SCIRun 4's autoview in Dataflow/Modules/Render/ViewWindow.cc. This function will change the lookat point to the center of the bounding box. fov is expected to be in radians.

void doPan ( const glm::vec2 &  ssPos)

Pans the camera based on the reference position, current orientation, and the current screen / space position. Note that this pans the lookat point by the same amount as the camera.

void doReferenceDown ( const glm::vec2 &  ssPos)

Sets the reference point for upcoming operations. Should be be called before any of the 'do' function below, and acts as the 'mouse down' in the mouse input process. The 'do' functions below behave like 'mouse move'.

void doZoom ( glm::float_t  camZoom)

Dollys the camera towards(negative) / away(positive) from the look at point.

void doZoom ( const glm::vec2 &  ssPos)

Uses a custom function to determine camera zoom. Downwards and to the right increases size, upwards or to the left decreases size

glm::mat4 getWorldViewTransform ( ) const

Retrieves the world transformation for the camera (looking down negative z).


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