#include <StereoCamera.h>
Inheritance diagram for nvsg::StereoCamera:
Public Member Functions | |
virtual NVSG_API const StereoCamera * | clone (void) const |
Create a clone of this StereoCamera. | |
virtual NVSG_API bool | isDataShared (void) const |
Determine whether the data of this object is shared. | |
virtual NVSG_API DataID | getDataID (void) const |
Get the DataID of the data of this object. | |
NVSG_API float | getDepthFactor (void) const |
Get the depth factor. | |
NVSG_API void | setDepthFactor (float df) |
Set the depth factor. | |
NVSG_API float | getFocusDistance (void) const |
Get the focal distance. | |
NVSG_API void | setFocusDistance (float fd) |
Set the focus distance. | |
NVSG_API bool | isLeftPassIndex (size_t pass) const |
Ask if pass is the left pass. | |
NVSG_API void | reverseLeftRight (void) |
Reverse left and right pass order. | |
NVSG_API void | updateMonoCameras (void) const |
Update the monoscopic cameras (right and left). | |
const MonoCamera * | getMonoCamera (void) const |
Get the base camera. | |
const MonoCamera * | getLeftCamera () const |
Get the camera for the left eye. | |
const MonoCamera * | getRightCamera () const |
Get the camera for the right eye. | |
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 head light on this camera. | |
virtual NVSG_API size_t | getNumberOfHeadLights (void) const |
Get number of headlights attached to the camera. | |
virtual NVSG_API const LightSource * | getHeadLight (size_t index) const |
Get the indexed head light of this camera. | |
virtual NVSG_API bool | removeHeadLight (size_t index=0) |
Remove a headlight. | |
virtual NVSG_API bool | setHeadLightTrafo (const nvmath::Vec3f &trans, const nvmath::Quatf &quat, size_t index=0) |
Set the head light 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 head light of this camera. | |
virtual NVSG_API float | getTargetDistance (void) 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 nvmath::Vec3f | getUpVector (void) const |
Get the up direction. | |
virtual NVSG_API const nvmath::Vec3f & | getPosition (void) const |
Get the camera position. | |
virtual NVSG_API void | setPosition (const nvmath::Vec3f &pos) |
Set the camera position. | |
virtual NVSG_API void | setUpVector (const nvmath::Vec3f &up) |
Set the up direction. | |
virtual NVSG_API nvmath::Vec3f | getDirection (void) 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 | getViewToWorldMatrix (void) const |
Get the inverse of the camera specific world-to-view transformation. | |
virtual NVSG_API nvmath::Mat44f | getWorldToViewMatrix (void) const |
Get the world to view transformation. | |
virtual NVSG_API const nvmath::Vec2f & | getWindowOffset (void) const |
Get the window offset. | |
virtual NVSG_API void | setWindowOffset (const nvmath::Vec2f &offset) |
Set the window offset. | |
virtual NVSG_API void | getWindowRegion (nvmath::Vec2f &lowerLeft, nvmath::Vec2f &upperRight) const |
Get the relative window region to view. | |
virtual NVSG_API void | setWindowRegion (const nvmath::Vec2f &lowerLeft, const nvmath::Vec2f &upperRight) |
Set the relative window region to view. | |
virtual NVSG_API const nvmath::Vec2f & | getWindowSize (void) const |
Get the window size. | |
virtual NVSG_API void | setWindowSize (const nvmath::Vec2f &size) |
Set the window size. | |
virtual NVSG_API float | getAspectRatio (void) const |
Get the current aspect ratio. | |
virtual NVSG_API void | setAspectRatio (float ar, bool keepWidth=false) |
Set the aspect ratio. | |
virtual NVSG_API void | setAutoClipPlanes (bool on) |
Enable/Disable automatic clip plane determination. | |
virtual NVSG_API bool | isAutoClipPlanes (void) const |
Get auto clipping state. | |
virtual NVSG_API float | getFarDistance (void) const |
Get distance to the far clipping plane. | |
virtual NVSG_API void | setFarDistance (float fd) |
Set the far clipping distance. | |
virtual NVSG_API float | getNearDistance (void) const |
Get distance to the near clipping plane. | |
virtual NVSG_API void | setNearDistance (float nd) |
Set the near clipping distance. | |
virtual NVSG_API void | calcNearFarDistances (const nvmath::Sphere3f &sphere) |
Calculate the distances to the near and far clipping planes. | |
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. | |
Static Public Member Functions | |
static NVSG_API const StereoCamera * | create (const MonoCamera &base) |
Create a StereoCamera using a MonoCamera as a base. | |
static NVSG_API const StereoCamera * | createFromBase (const Camera &rhs, const MonoCamera &base) |
Create a StereoCamera by copying from an other. | |
Protected Member Functions | |
NVSG_API | StereoCamera (const MonoCamera &base) |
Constructor. | |
NVSG_API | StereoCamera (const Camera &rhs, const MonoCamera &base) |
Partial Constructor. | |
NVSG_API | StereoCamera (const StereoCamera &rhs) |
Copy constructor. | |
virtual NVSG_API | ~StereoCamera (void) |
Protected destructor to prevent explicit creation on stack. |
With this camera stereoscopic vision is introduced.
|
Constructor. A StereoCamera uses an arbitrary MonoCamera as its base camera. This base camera is used and slightly adjusted to get stereo vision.
|
|
Partial Constructor.
|
|
Copy constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Create a StereoCamera using a MonoCamera as a base.
|
|
Create a StereoCamera by copying from an other.
|
|
Create a clone of this StereoCamera.
Implements nvsg::Camera. |
|
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 depth factor. The depth factor controls how much the two cameras are horizontally displaced from the base camera. It is measured in multiples of the target distance. A value of 0.0 results in monoscopic vision. A value of 0.03 (the default) gives a good stereo effect. You can imagine that the user is about one meter from the monitor and his eyes are about 0.03 meters displaced to the right and left. The larger the depth factor, the better the stereo effect, until the left and right images are too spread out for eyes to fuse. |
|
Set the depth factor. The depth factor controls how much the two cameras for stereo vision are horizontally displaced from the base camera. It is measured in multiples of the target distance. A value of 0.0 results in monoscopic vision. A value of 0.03 (the default) gives a good stereo effect. You can imagine that the user is about one meter from the monitor and his eyes are about 0.03 meters displaced to the right and left. The larger the depth factor, the better the stereo effect, until the left and right images are too spread out for the eyes to fuse.
|
|
Get the focal distance. The focus distance controls where the focal plane is in the model. It is measured in the same units as the world space. A value equal to the near distance (the default) makes the near plane the focal plane. This results in a stereo image that seems to be completely inside of the monitor. A value equal to the far distance makes the far plane the focal plane. This results in a stereo image that seems to be completely in front of the monitor. |
|
Set the focus distance. The focus distance controls where the focal plane is in the model. It is measured in the same units as the world space. A value equal to the near distance (the default) make the near plane the focal plane. This results in a stereo image that seems to be completely inside of the monitor. A value equal to the far distance makes the far plane the focal plane. This results in a stereo image that seems to be completely in front of the monitor.
|
|
Ask if pass is the left pass. A stereo camera is a two pass camera. On rendering, the scene is traversed two times, once for the left eye and once for the right eye. Depending on the synchronization between the monitor and the stereo glasses, it might be important to know which pass is for the left eye and which pass for the right eye.
|
|
Reverse left and right pass order. A stereo camera is a two pass camera. On rendering, the scene is traversed two times, once for the left eye and once for the right eye. Depending on the synchronization between the monitor and the stereo glasses, it might be necessary to reverse this order to get the correct stereo effect. |
|
Update the monoscopic cameras (right and left). Before traversing the monoscopic cameras (right and left) of a stereo camera, this function should be called to update these cameras with any changes that might have applied to the base camera. |
|
Get the base camera.
|
|
Get the camera for the left eye.
|
|
Get the camera for the right eye.
|
|
Add a head light 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. |
|
Get number of headlights attached to the camera.
Implements nvsg::Camera. |
|
Get the indexed head light of this camera.
Implements nvsg::Camera. |
|
Remove a headlight.
Implements nvsg::Camera. |
|
Set the head light position and orientation relative to the camera.
Implements nvsg::Camera. |
|
Get the position/orientation of the indexed head light of this camera. It is assumed that the camera holds at least index headlights.
Implements nvsg::Camera. |
|
Get the distance to the target point.
Implements nvsg::Camera. |
|
Set the distance to the target point.
Implements nvsg::Camera. |
|
Get the up direction.
Implements nvsg::Camera. |
|
Get the camera position.
Implements nvsg::Camera. |
|
Set the camera position.
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 inverse of the camera specific world-to-view transformation.
Implements nvsg::Camera. |
|
Get the world to view transformation.
Implements nvsg::Camera. |
|
Get the window offset.
Implements nvsg::Camera. |
|
Set the window offset.
Implements nvsg::Camera. |
|
Get the relative window region to view.
Implements nvsg::Camera. |
|
Set the relative window region to view.
Implements nvsg::Camera. |
|
Get the window size.
Implements nvsg::Camera. |
|
Set the window size.
Implements nvsg::Camera. |
|
Get the current aspect ratio.
Implements nvsg::Camera. |
|
Set the aspect ratio.
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. |
|
Get distance to the 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. |
|
Get distance to the near clipping plane. Near and far distances can be used internally to the camera to improve depth resolution.
Implements nvsg::Camera. |
|
Set the near clipping distance.
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. |
|
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. |