rtVTK  0.6.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes | Static Private Attributes
uiCore::Camera Class Reference

Stores camera location and view focus, used to view scene objects. More...

List of all members.

Public Member Functions

 Camera (const Point &=Point(0, 0, 5), const Point &=Point(0, 0, 0), const Vector &=Vector(0, 1, 0), float=45.f, float=0.1f, float=100.f, CameraMode=Lookat)
 ~Camera ()
void reset ()
void moveCam (const Vector &)
void rotateCam (const Vector &, float)
void setLookMode (CameraMode)
void setFOV (float fov_)
void setNear (float near_)
void setFar (float far_)
Point getEye () const
Point getLook () const
Point getRotPt () const
Vector getUp () const
float getFOV () const
float getNear () const
float getFar () const
CameraMode getMode () const

Private Attributes

float fov
float near
float far
CameraMode mode
 Chooses whether to rotate about the camera or the lookat point.
Vector move
Initial Camera Settings

Hangs on to the original camera specifications.

Point initPos
Point initLook
Vector initUp
float initFOV
Rotation Information

Stores rotation information.

Point origin
Quaternion rotation

Static Private Attributes

static const Vector refUp = Vector(0.f, 1.f, 0.f)
static const Vector refIn = Vector(0.f, 0.f, -1.f)
static const Vector refSide = Vector(1.f, 0.f, 0.f)

Detailed Description

Stores camera location and view focus, used to view scene objects.


Constructor & Destructor Documentation

uiCore::Camera::Camera ( const Point &  position_ = Point(0, 0, 5),
const Point &  look_ = Point(0, 0, 0),
const Vector &  up_ = Vector(0, 1, 0),
float  fov_ = 45.f,
float  near_ = 0.1f,
float  far_ = 100.f,
CameraMode  mode_ = Lookat 
)

References reset().


Member Function Documentation

Point uiCore::Camera::getEye ( ) const [inline]
float uiCore::Camera::getFar ( ) const [inline]
float uiCore::Camera::getFOV ( ) const [inline]
Point uiCore::Camera::getLook ( ) const [inline]
CameraMode uiCore::Camera::getMode ( ) const [inline]

References mode.

Referenced by uiCore::Trackball::getMode().

float uiCore::Camera::getNear ( ) const [inline]
Point uiCore::Camera::getRotPt ( ) const [inline]
Vector uiCore::Camera::getUp ( ) const [inline]
void uiCore::Camera::moveCam ( const Vector &  dir)

The origin is translated. This function is always called when middle button is pressed. Technically this should not be named "moveCam" because technically the camera moves when rotations occur. Dolly will also adjust the focal point because the focal point is always a set distance away from the camera, similar to a parabolic mirror.

References origin, Math::Quaternion::rotateV(), and rotation.

Referenced by uiCore::Trackball::mouseMove().

void uiCore::Camera::rotateCam ( const Vector &  axis,
float  angle 
)
void uiCore::Camera::setFar ( float  far_) [inline]

References far.

void uiCore::Camera::setFOV ( float  fov_) [inline]

References fov.

Referenced by uiCore::Trackball::setFOV().

void uiCore::Camera::setNear ( float  near_) [inline]

References near.


Member Data Documentation

float uiCore::Camera::far [private]

Referenced by getFar(), and setFar().

float uiCore::Camera::fov [private]

Referenced by getFOV(), reset(), and setFOV().

float uiCore::Camera::initFOV [private]

Referenced by reset().

Point uiCore::Camera::initLook [private]

Referenced by reset().

Point uiCore::Camera::initPos [private]

Referenced by reset().

Vector uiCore::Camera::initUp [private]

Referenced by reset().

Chooses whether to rotate about the camera or the lookat point.

Referenced by getEye(), getLook(), getMode(), getRotPt(), reset(), and setLookMode().

Vector uiCore::Camera::move [private]
float uiCore::Camera::near [private]

Referenced by getNear(), and setNear().

Point uiCore::Camera::origin [private]
const Vector uiCore::Camera::refIn = Vector(0.f, 0.f, -1.f) [static, private]

Referenced by getLook(), and reset().

const Vector uiCore::Camera::refSide = Vector(1.f, 0.f, 0.f) [static, private]

Referenced by reset().

const Vector uiCore::Camera::refUp = Vector(0.f, 1.f, 0.f) [static, private]

Referenced by getUp().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends