Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Emma::Camera Class Reference

The Camera node is an "uninstantiable" node that lives in the Environment node. More...

#include <EmmaCamera.h>

Inheritance diagram for Emma::Camera:

Emma::Node Fusion::Object Fusion::IObject List of all members.

Public Member Functions

 Camera ()
virtual ~Camera ()
 DECLARE_CLASS (Camera, ChildNode)
virtual Fusion::ResultType initialize ()
 Initialize this instance.
virtual void eventsProcessed ()
virtual Fusion::ResultType beginFieldFiring (const char *property, const Fusion::Value &value)
EMMA_EXPORT void setPosition (const Fusion::Vec3f &)
 Set the position of the eye point.
EMMA_EXPORT Fusion::Vec3f getPosition ()
 Get the position of the eye point.
EMMA_EXPORT void move (const Fusion::Vec3f &)
 Moves the camera's position by the vector offset provided along world axes.
EMMA_EXPORT void moveRelative (const Fusion::Vec3f &)
 Moves the camera's position by the vector offset provided along it's own axes (relative to orientation).
EMMA_EXPORT void setDirection (const Fusion::Vec3f &)
 Sets the camera's direction (lookAt) vector.
EMMA_EXPORT Fusion::Vec3f getDirection ()
 Gets the camera's direction (lookAt) vector.
EMMA_EXPORT Fusion::Vec3f getUp ()
 Gets the camera's up vector.
EMMA_EXPORT Fusion::Vec3f getRight ()
 Gets the camera's right vector.
EMMA_EXPORT void lookAt (const Fusion::Vec3f &)
 Points the camera at a location in world space.
EMMA_EXPORT void rotate (const Fusion::Rotation &)
 Rotates the camera around an arbitrary axis (relative to its current orientation).
EMMA_EXPORT void setOrientation (const Fusion::Rotation &)
 Sets the camera's orientation.
EMMA_EXPORT Fusion::Rotation getOrientation ()
 Gets the camera's orientation.
EMMA_EXPORT void setNearLimit (float)
 Sets the camera's near limit.
EMMA_EXPORT float getNearLimit ()
 Gets the camera's near limit.
EMMA_EXPORT void setVisibilityLimit (float)
 Sets the camera's visibility (far) limit.
EMMA_EXPORT float getVisibilityLimit ()
 Gets the camera's visibility (far) limit.
EMMA_EXPORT void setAspectRatio (float)
 Sets the camera's aspect ratio.
EMMA_EXPORT float getAspectRatio ()
 Gets the camera's aspect ratio.
EMMA_EXPORT void setFieldOfView (float)
 Sets the camera's field of view in the y-dimension.
EMMA_EXPORT float getFieldOfView ()
 Gets the camera's field of view in the y-dimension.
EMMA_EXPORT void setProjectionType (const Fusion::UTF8String &)
 Set the camera's projection type: currently only ORTHO or PERSPECTIVE.
EMMA_EXPORT Fusion::UTF8String getProjectionType ()
 Get the camera's projection type.
EMMA_EXPORT Fusion::ResultType setViewpoint (const Fusion::IObject *)
 Set the camera's parameters to match the given Viewpoint object.
EMMA_EXPORT Fusion::ResultType bindToViewpoint (Fusion::IObject *)
 Bind the camera to the given Viewpoint object.
EMMA_EXPORT Matrix getProjectionMatrix () const
 Get a SFMatrix3D representing the Camera's projection matrix to transform between world coordinates and normalized device coordinates.
EMMA_EXPORT IObject * getProjectionMatrixField () const
EMMA_EXPORT Matrix getViewMatrix () const
 Get a SFMatrix3D representing the Camera's view matrix which transforms the camera position and orientation.
EMMA_EXPORT IObject * getViewMatrixField () const
EMMA_EXPORT Fusion::Vec3f worldToNDC (const Fusion::Vec3f &worldPos) const
 Convert the passed world coordinate point to normalized device coordinates and return the result.
EMMA_EXPORT Fusion::Vec3f ndcToWorld (const Fusion::Vec3f &ndcPos) const
 Convert the passed normalized device coordinate point to world coordinates and return the result.
EMMA_EXPORT Fusion::Vec3f ndcToScreen (const Fusion::Vec3f &ndcPos) const
 Convert the passed normalized device coordinate point to screen coordinates and return the result.
EMMA_EXPORT Fusion::Vec3f screenToNDC (const Fusion::Vec3f &screenPos) const
 Convert the passed screen coordinate point to normalized device coordinates and return the result.
EMMA_EXPORT Fusion::Vec3f worldToScreen (const Fusion::Vec3f &worldPos) const
 Convert the passed world coordinate point to screen coordinates and return the result.
EMMA_EXPORT Fusion::Vec3f screenToWorld (const Fusion::Vec3f &screenPos) const
 Convert the passed screen coordinate point to world coordinates and return the result.
EMMA_EXPORT void setIScene (void *s)
ICameragetRenderableCamera ()

Protected Member Functions

void _trigger ()
 Trigger notification of changeTime iff freezeNotifications is false.
void unbindViewpointIfBound (const Fusion::IObject *)

Protected Attributes

ICameramyRenderableCamera
IScenemyScene

Friends

class Viewpoint

Detailed Description

The Camera node is an "uninstantiable" node that lives in the Environment node.

Typically, content developers do not deal with the Camera node directly, unless they are writing a Viewer.

Remarks:
Base class Node
Author:
Rick Pasetto
Date:
10/7/2005


Constructor & Destructor Documentation

Emma::Camera::Camera  ) 
 

virtual Emma::Camera::~Camera  )  [virtual]
 


Member Function Documentation

void Emma::Camera::_trigger  )  [protected]
 

Trigger notification of changeTime iff freezeNotifications is false.

virtual Fusion::ResultType Emma::Camera::beginFieldFiring const char *  property,
const Fusion::Value value
[virtual]
 

Reimplemented from Emma::Node.

EMMA_EXPORT Fusion::ResultType Emma::Camera::bindToViewpoint Fusion::IObject  ) 
 

Bind the camera to the given Viewpoint object.

This does not maintain any sort of binding stack. It simply makes sure that the given Viewpoint's motion is reflected by this Camera.

Emma::Camera::DECLARE_CLASS Camera  ,
ChildNode 
 

virtual void Emma::Camera::eventsProcessed  )  [virtual]
 

Reimplemented from Emma::Node.

EMMA_EXPORT float Emma::Camera::getAspectRatio  ) 
 

Gets the camera's aspect ratio.

Note this will return the current correct aspect ratio, even if set by the window's aspect ratio! This is an important distinction: calling setAspectRatio(getAspectRatio()) will have no apparent effect, until you resize the window; It fixes the aspect ratio at the current window's aspect ratio. Call setAspectRatio(0.0) to have the camera's aspect ratio follow the window's.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::getDirection  ) 
 

Gets the camera's direction (lookAt) vector.

EMMA_EXPORT float Emma::Camera::getFieldOfView  ) 
 

Gets the camera's field of view in the y-dimension.

EMMA_EXPORT float Emma::Camera::getNearLimit  ) 
 

Gets the camera's near limit.

EMMA_EXPORT Fusion::Rotation Emma::Camera::getOrientation  ) 
 

Gets the camera's orientation.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::getPosition  ) 
 

Get the position of the eye point.

EMMA_EXPORT Matrix Emma::Camera::getProjectionMatrix  )  const
 

Get a SFMatrix3D representing the Camera's projection matrix to transform between world coordinates and normalized device coordinates.

EMMA_EXPORT IObject* Emma::Camera::getProjectionMatrixField  )  const
 

EMMA_EXPORT Fusion::UTF8String Emma::Camera::getProjectionType  ) 
 

Get the camera's projection type.

ICamera* Emma::Camera::getRenderableCamera  )  [inline]
 

EMMA_EXPORT Fusion::Vec3f Emma::Camera::getRight  ) 
 

Gets the camera's right vector.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::getUp  ) 
 

Gets the camera's up vector.

EMMA_EXPORT Matrix Emma::Camera::getViewMatrix  )  const
 

Get a SFMatrix3D representing the Camera's view matrix which transforms the camera position and orientation.

EMMA_EXPORT IObject* Emma::Camera::getViewMatrixField  )  const
 

EMMA_EXPORT float Emma::Camera::getVisibilityLimit  ) 
 

Gets the camera's visibility (far) limit.

virtual Fusion::ResultType Emma::Camera::initialize  )  [virtual]
 

Initialize this instance.

Reimplemented from Fusion::Object.

EMMA_EXPORT void Emma::Camera::lookAt const Fusion::Vec3f  ) 
 

Points the camera at a location in world space.

EMMA_EXPORT void Emma::Camera::move const Fusion::Vec3f  ) 
 

Moves the camera's position by the vector offset provided along world axes.

EMMA_EXPORT void Emma::Camera::moveRelative const Fusion::Vec3f  ) 
 

Moves the camera's position by the vector offset provided along it's own axes (relative to orientation).

EMMA_EXPORT Fusion::Vec3f Emma::Camera::ndcToScreen const Fusion::Vec3f ndcPos  )  const
 

Convert the passed normalized device coordinate point to screen coordinates and return the result.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::ndcToWorld const Fusion::Vec3f ndcPos  )  const
 

Convert the passed normalized device coordinate point to world coordinates and return the result.

EMMA_EXPORT void Emma::Camera::rotate const Fusion::Rotation  ) 
 

Rotates the camera around an arbitrary axis (relative to its current orientation).

EMMA_EXPORT Fusion::Vec3f Emma::Camera::screenToNDC const Fusion::Vec3f screenPos  )  const
 

Convert the passed screen coordinate point to normalized device coordinates and return the result.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::screenToWorld const Fusion::Vec3f screenPos  )  const
 

Convert the passed screen coordinate point to world coordinates and return the result.

EMMA_EXPORT void Emma::Camera::setAspectRatio float   ) 
 

Sets the camera's aspect ratio.

An aspect ratio of 0.0 tells the camera to use the window's aspect ratio.

EMMA_EXPORT void Emma::Camera::setDirection const Fusion::Vec3f  ) 
 

Sets the camera's direction (lookAt) vector.

EMMA_EXPORT void Emma::Camera::setFieldOfView float   ) 
 

Sets the camera's field of view in the y-dimension.

EMMA_EXPORT void Emma::Camera::setIScene void *  s  ) 
 

EMMA_EXPORT void Emma::Camera::setNearLimit float   ) 
 

Sets the camera's near limit.

EMMA_EXPORT void Emma::Camera::setOrientation const Fusion::Rotation  ) 
 

Sets the camera's orientation.

EMMA_EXPORT void Emma::Camera::setPosition const Fusion::Vec3f  ) 
 

Set the position of the eye point.

EMMA_EXPORT void Emma::Camera::setProjectionType const Fusion::UTF8String  ) 
 

Set the camera's projection type: currently only ORTHO or PERSPECTIVE.

EMMA_EXPORT Fusion::ResultType Emma::Camera::setViewpoint const Fusion::IObject  ) 
 

Set the camera's parameters to match the given Viewpoint object.

EMMA_EXPORT void Emma::Camera::setVisibilityLimit float   ) 
 

Sets the camera's visibility (far) limit.

void Emma::Camera::unbindViewpointIfBound const Fusion::IObject  )  [protected]
 

EMMA_EXPORT Fusion::Vec3f Emma::Camera::worldToNDC const Fusion::Vec3f worldPos  )  const
 

Convert the passed world coordinate point to normalized device coordinates and return the result.

EMMA_EXPORT Fusion::Vec3f Emma::Camera::worldToScreen const Fusion::Vec3f worldPos  )  const
 

Convert the passed world coordinate point to screen coordinates and return the result.


Friends And Related Function Documentation

friend class Viewpoint [friend]
 


Member Data Documentation

ICamera* Emma::Camera::myRenderableCamera [protected]
 

IScene* Emma::Camera::myScene [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Apr 1 06:08:28 2006 for Emma SDK Guide by  doxygen 1.4.3