#include <SimpleCamera.h>
Inheritance diagram for nvsg::SimpleCamera:
Public Member Functions | |
virtual NVSG_API const SimpleCamera * | clone (void) const =0 |
Interface for cloning a SimpleCamera. | |
virtual NVSG_API bool | isDataShared () const |
Determine whether the data of this object is shared. | |
virtual NVSG_API DataID | getDataID () const |
Get the DataID of the data of this object. | |
virtual NVSG_API float | getProjectionDx () const |
Get the projection translation (used with stereo only). | |
virtual NVSG_API void | setProjectionDx (float dx) |
Set the project translation (used with stereo only). | |
virtual NVSG_API size_t | getNumberOfHeadLights () const |
Get number of headlights attached to the camera. | |
virtual NVSG_API const LightSource * | getHeadLight (size_t index) const |
Get the indexed headlight of this camera. | |
virtual NVSG_API bool | setHeadLightTrafo (const nvmath::Vec3f &trans, const nvmath::Quatf &quat, size_t index=0) |
Set the headlight position and orientation relative to the camera. | |
virtual NVSG_API void | getHeadLightTrafo (nvmath::Vec3f &trans, nvmath::Quatf &quat, size_t index=0) const |
Get the position/orientation of the indexed headlight of this camera. | |
virtual NVSG_API void | addHeadLight (const LightSource *pLight, const nvmath::Vec3f &position=nvmath::Vec3f(0.0f, 0.0f, 0.0f), const nvmath::Quatf &quat=nvmath::Quatf(0.0f, 0.0f, 0.0f, 1.0f)) |
Add a headlight on this camera. | |
virtual NVSG_API bool | removeHeadLight (size_t index=0) |
Remove a headlight. | |
virtual NVSG_API float | getTargetDistance () const |
Get the distance to the target point. | |
virtual NVSG_API void | setTargetDistance (float td) |
Set the distance to the target point. | |
virtual NVSG_API const nvmath::Vec3f & | getPosition () const |
Get the camera position. | |
virtual NVSG_API void | setPosition (const nvmath::Vec3f &pos) |
Set the camera position. | |
virtual NVSG_API nvmath::Vec3f | getUpVector () const |
Get the up direction. | |
virtual NVSG_API void | setUpVector (const nvmath::Vec3f &up) |
Set the up direction. | |
virtual NVSG_API nvmath::Vec3f | getDirection () const |
Get viewing direction. | |
virtual NVSG_API void | setDirection (const nvmath::Vec3f &dir) |
Set the viewing direction. | |
virtual NVSG_API void | setOrientation (const nvmath::Quatf &quat) |
Set the orientation of the camera. | |
virtual NVSG_API void | setOrientation (const nvmath::Vec3f &dir, const nvmath::Vec3f &up) |
Set the orientation of the camera. | |
virtual NVSG_API void | setOrientation (const nvmath::Vec3f &axis, float angle) |
Interface for setting the orientation of the camera. | |
virtual NVSG_API nvmath::Quatf | getOrientation (void) const |
Get the current orientation. | |
virtual NVSG_API nvmath::Mat44f | getWorldToViewMatrix () const |
Get the world-to-view transformation. | |
virtual NVSG_API nvmath::Mat44f | getViewToWorldMatrix () const |
Get the inverse of the camera specific world-to-view transformation. | |
virtual NVSG_API void | setWindowOffset (const nvmath::Vec2f &offset) |
Set the window offset. | |
virtual NVSG_API const nvmath::Vec2f & | getWindowOffset () const |
Get the window offset. | |
virtual NVSG_API void | setWindowSize (const nvmath::Vec2f &size) |
Set the window size. | |
virtual NVSG_API const nvmath::Vec2f & | getWindowSize () const |
Get the window size. | |
virtual NVSG_API void | setAspectRatio (float ar, bool keepWidth=false) |
Set the aspect ratio. | |
virtual NVSG_API float | getAspectRatio () const |
Get the current aspect ratio. | |
virtual NVSG_API void | setWindowRegion (const nvmath::Vec2f &lowerLeft, const nvmath::Vec2f &upperRight) |
Set the relative window region to view. | |
virtual NVSG_API void | getWindowRegion (nvmath::Vec2f &lowerLeft, nvmath::Vec2f &upperRight) const |
Get the relative window region to view. | |
virtual NVSG_API void | setAutoClipPlanes (bool on) |
Enable/Disable automatic clip plane determination. | |
virtual NVSG_API bool | isAutoClipPlanes () const |
Get auto clipping state. | |
virtual NVSG_API void | calcNearFarDistances (const nvmath::Sphere3f &sphere) |
Calculate the distances to the near and far clipping planes. | |
virtual NVSG_API void | setNearDistance (float nd) |
Set the near clipping distance. | |
virtual NVSG_API float | getNearDistance () const |
Get distance to near clipping plane. | |
virtual NVSG_API float | getFarDistance () const |
Get distance to far clipping plane. | |
virtual NVSG_API void | setFarDistance (float fd) |
Set the far clipping distance. | |
virtual NVSG_API void | move (const nvmath::Vec3f &delta) |
Move the camera. | |
virtual NVSG_API void | orbit (const nvmath::Vec3f &axis, float rad) |
Orbit the camera. | |
virtual NVSG_API void | rotate (const nvmath::Vec3f &axis, float rad, bool cameraRelative=true) |
Interface for rotating the camera. | |
virtual NVSG_API void | zoom (float factor) |
Zoom by a factor. | |
virtual NVSG_API void | zoom (const nvmath::Sphere3f &sphere, float fovy=-1.0f) |
Zoom to fit view to a sphere. | |
Protected Member Functions | |
NVSG_API | SimpleCamera () |
Constructor. | |
NVSG_API | SimpleCamera (const SimpleCamera &rhs) |
Copy constructor. | |
virtual NVSG_API | ~SimpleCamera () |
Protected destructor to prevent explicit creation on stack. |
This camera type is used to group the simple camera types (as Parallel/Perspective).
|
Constructor.
|
|
Copy constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Interface for cloning a SimpleCamera.
Implements nvsg::MonoCamera. Implemented in nvsg::ParallelCamera, and nvsg::PerspectiveCamera. |
|
Determine whether the data of this object is shared.
Reimplemented from nvsg::Object. |
|
Get the DataID of the data of this object.
Reimplemented from nvsg::Object. |
|
Get the projection translation (used with stereo only).
Implements nvsg::MonoCamera. |
|
Set the project translation (used with stereo only).
Implements nvsg::MonoCamera. |
|
Get number of headlights attached to the camera.
Implements nvsg::Camera. |
|
Get the indexed headlight of this camera.
Implements nvsg::Camera. |
|
Set the headlight position and orientation relative to the camera.
Implements nvsg::Camera. |
|
Get the position/orientation of the indexed headlight of this camera. It is assumed that the camera holds at least index headlights.
Implements nvsg::Camera. |
|
Add a headlight on this camera. A camera can have a number of headlights that are positioned relative to the camera, i.e. they move together with the camera. These lights are not part of the scene, but part of the camera. The default position and orientation of a new headlight is the camera position and orientation.
Implements nvsg::Camera. |
|
Remove a headlight.
Implements nvsg::Camera. |
|
Get the distance to the target point.
Implements nvsg::Camera. |
|
Set the distance to the target point.
Implements nvsg::Camera. Reimplemented in nvsg::PerspectiveCamera. |
|
Get the camera position.
Implements nvsg::Camera. |
|
Set the camera position.
Implements nvsg::Camera. |
|
Get the up direction.
Implements nvsg::Camera. |
|
Set the up direction.
Implements nvsg::Camera. |
|
Get viewing direction. The default viewing direction of a SimpleCamera is along the negative z-axis.
Implements nvsg::Camera. |
|
Set the viewing direction.
Implements nvsg::Camera. |
|
Set the orientation of the camera.
Implements nvsg::Camera. |
|
Set the orientation of the camera.
Implements nvsg::Camera. |
|
Interface for setting the orientation of the camera.
Implements nvsg::Camera. |
|
Get the current orientation.
Implements nvsg::Camera. |
|
Get the world-to-view transformation.
Implements nvsg::Camera. |
|
Get the inverse of the camera specific world-to-view transformation.
Implements nvsg::Camera. |
|
Set the window offset.
Implements nvsg::Camera. |
|
Get the window offset.
Implements nvsg::Camera. |
|
Set the window size.
Implements nvsg::Camera. |
|
Get the window size.
Implements nvsg::Camera. |
|
Set the aspect ratio.
Implements nvsg::Camera. |
|
Get the current aspect ratio.
Implements nvsg::Camera. |
|
Set the relative window region to view.
Implements nvsg::Camera. |
|
Get the relative window region to view.
Implements nvsg::Camera. |
|
Enable/Disable automatic clip plane determination.
Implements nvsg::Camera. |
|
Get auto clipping state. If auto clip is on, the camera determines the optimal near and front clipping distances out of the scene. If the user has additional information about the scene that might help clipping, it should be turned off.
Implements nvsg::Camera. |
|
Calculate the distances to the near and far clipping planes. Near and far distances can be used internally to the camera to improve depth resolution. This function should determine these values such that the sphere given by center and radius just fits between them.
Implements nvsg::Camera. |
|
Set the near clipping distance.
Implements nvsg::Camera. |
|
Get distance to near clipping plane. Near and far distances can be used internally to the camera to improve depth resolution.
Implements nvsg::Camera. |
|
Get distance to far clipping plane. Near and far distances can be used internally to the camera to improve depth resolution.
Implements nvsg::Camera. |
|
Set the far clipping distance.
Implements nvsg::Camera. |
|
Move the camera.
Implements nvsg::Camera. |
|
Orbit the camera.
Implements nvsg::Camera. |
|
Interface for rotating the camera.
Implements nvsg::Camera. |
|
Zoom by a factor.
Implements nvsg::Camera. |
|
Zoom to fit view to a sphere.
Implements nvsg::Camera. |