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

Camera Class Reference

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

Inheritance diagram for Camera:

Node Object List of all members.

Public Member Functions

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 Matrix getViewMatrix () const
 Get a SFMatrix3D representing the Camera's view matrix which transforms the camera position and orientation.
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.

Protected Member Functions

void _trigger ()
 Trigger notification of changeTime iff freezeNotifications is false.

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.

Authoring Interface:

        Camera {
            eventOut SFBoolean changeTime
        }

Parameters:
changeTime triggers when camera changes

Functionality:


Member Function Documentation

EMMA_EXPORT Fusion::ResultType 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_EXPORT float 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 void setAspectRatio float   ) 
 

Sets the camera's aspect ratio.

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


Generated on Sat Apr 1 06:08:08 2006 for Emma Content Development Kit by  doxygen 1.4.3