#include <JitterCamera.h>
Inheritance diagram for nvsg::JitterCamera:
Public Methods | |
virtual NVSG_API const JitterCamera * | clone (void) const |
Create a clone of this JitterCamera. More... | |
virtual NVSG_API bool | isDataShared () const |
Determine whether the data of this object is shared. More... | |
virtual NVSG_API DataID | getDataID () const |
Get the DataID of the data of this object. More... | |
NVSG_API void | getJitters (std::vector< nvmath::Vec2f > &jitters) const |
Get the jitters. More... | |
NVSG_API void | setJitters (const std::vector< nvmath::Vec2f > &jitters) |
Set the jitters. More... | |
NVSG_API size_t | getNumberOfPasses () const |
Get the number of passes. More... | |
NVSG_API void | updateSimpleCameras (size_t vpWidth, size_t vpHeight) const |
Update the simple base cameras with the current camera settings and the viewport size. More... | |
NVSG_API const SimpleCamera * | getBaseCamera () const |
Get the base camera. More... | |
NVSG_API const SimpleCamera * | getCamera (size_t index) const |
Get camera. More... | |
virtual NVSG_API nvmath::Mat44f | getProjection () const |
Get the projection matrix. More... | |
virtual NVSG_API float | getProjectionDx () const |
Get the projection translation (used with stereo only). More... | |
virtual NVSG_API nvmath::Mat44f | getInverseProjection () const |
Get the inverse projection matrix. More... | |
virtual NVSG_API void | setProjectionDx (float dx) |
Set the projection translation (used with stereo only). More... | |
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)) |
Interface for adding a headlight to this camera. More... | |
virtual NVSG_API bool | removeHeadLight (size_t index=0) |
Interface for removing a headlight. More... | |
virtual NVSG_API size_t | getNumberOfHeadLights () const |
Interface for getting the number of headlights attached to the camera. More... | |
virtual NVSG_API const LightSource * | getHeadLight (size_t index) const |
Interface for getting a headlight of this camera. More... | |
virtual NVSG_API void | getHeadLightTrafo (nvmath::Vec3f &trans, nvmath::Quatf &quat, size_t index=0) const |
Interface for getting the position/orientation of a camera's headlight. More... | |
virtual NVSG_API bool | setHeadLightTrafo (const nvmath::Vec3f &trans, const nvmath::Quatf &quat, size_t index=0) |
Interface for setting the headlight position and orientation relative to the camera. More... | |
virtual NVSG_API nvmath::Vec3f | getDirection () const |
Interface for getting the viewing direction. More... | |
virtual NVSG_API void | setDirection (const nvmath::Vec3f &dir) |
Interface for setting the viewing direction. More... | |
virtual NVSG_API float | getTargetDistance () const |
Interface for getting the distance to the target point. More... | |
virtual NVSG_API void | setTargetDistance (float td) |
Interface for setting the distance to the target point. More... | |
virtual NVSG_API const nvmath::Vec3f & | getPosition () const |
Interface for getting the camera position. More... | |
virtual NVSG_API void | setPosition (const nvmath::Vec3f &pos) |
Interface for setting the camera position. More... | |
virtual NVSG_API void | setUpVector (const nvmath::Vec3f &up) |
Interface for setting the up direction. More... | |
virtual NVSG_API nvmath::Vec3f | getUpVector () const |
Interface for getting the up direction. More... | |
virtual NVSG_API void | setOrientation (const nvmath::Quatf &quat) |
Interface for setting the camera orientation. More... | |
virtual NVSG_API void | setOrientation (const nvmath::Vec3f &dir, const nvmath::Vec3f &up) |
Interface for setting the camera orientation. More... | |
virtual NVSG_API void | setOrientation (const nvmath::Vec3f &axis, float angle) |
Interface for setting the camera orientation. More... | |
virtual NVSG_API nvmath::Quatf | getOrientation (void) const |
Get the current orientation. More... | |
virtual NVSG_API nvmath::Mat44f | getWorldToViewMatrix () const |
Interface for getting the world-to-view transformation. More... | |
virtual NVSG_API nvmath::Mat44f | getViewToWorldMatrix () const |
Interface for getting the inverse world-to-view transformation. More... | |
virtual NVSG_API const nvmath::Vec2f & | getWindowOffset () const |
Interface for getting the window offset. More... | |
virtual NVSG_API void | setWindowOffset (const nvmath::Vec2f &offset) |
Interface for setting the window offset. More... | |
virtual NVSG_API void | getWindowRegion (nvmath::Vec2f &lowerLeft, nvmath::Vec2f &upperRight) const |
Interface for getting the relative window region to view. More... | |
virtual NVSG_API void | setWindowRegion (const nvmath::Vec2f &lowerLeft, const nvmath::Vec2f &upperRight) |
Interface for setting the relative window region to view. More... | |
virtual NVSG_API const nvmath::Vec2f & | getWindowSize () const |
Interface for getting the window size. More... | |
virtual NVSG_API void | setWindowSize (const nvmath::Vec2f &size) |
Interface for setting the window size. More... | |
virtual NVSG_API float | getAspectRatio () const |
Interface for getting the current aspect ratio. More... | |
virtual NVSG_API void | setAspectRatio (float ar, bool keepWidth=false) |
Interface for setting the aspect ratio. More... | |
virtual NVSG_API bool | isAutoClipPlanes () const |
Interface for determining if auto clipping is on. More... | |
virtual NVSG_API void | setAutoClipPlanes (bool on) |
Interface for enabling/disabling automatic clip plane determination. More... | |
virtual NVSG_API void | calcNearFarDistances (const nvmath::Sphere3f &sphere) |
Interface for calculating the near and far clipping distances. More... | |
virtual NVSG_API float | getFarDistance () const |
Interface for getting the far clipping distance. More... | |
virtual NVSG_API void | setFarDistance (float fd) |
Interface for setting the far clipping distance. More... | |
virtual NVSG_API float | getNearDistance () const |
Interface for getting the near clipping distance. More... | |
virtual NVSG_API void | setNearDistance (float nd) |
Interface for setting the near clipping distance. More... | |
virtual NVSG_API void | move (const nvmath::Vec3f &delta) |
Interface for moving the camera. More... | |
virtual NVSG_API void | orbit (const nvmath::Vec3f &axis, float rad) |
Interface for orbiting the camera. More... | |
virtual NVSG_API void | rotate (const nvmath::Vec3f &axis, float rad, bool cameraRelative=true) |
Interface for rotating the camera. More... | |
virtual NVSG_API void | zoom (float factor) |
Interface for zooming by a factor. More... | |
virtual NVSG_API void | zoom (const nvmath::Sphere3f &sphere, float fovy=-1.0f) |
Interface for zooming to fit view to a sphere. More... | |
Static Public Methods | |
NVSG_API const JitterCamera * | create (const SimpleCamera &base, const std::vector< nvmath::Vec2f > &jitters) |
Create a JitterCamera. More... | |
NVSG_API const JitterCamera * | createFromBase (const MonoCamera &rhs, const SimpleCamera &base, const std::vector< nvmath::Vec2f > &jitters) |
Protected Methods | |
NVSG_API | JitterCamera (const SimpleCamera &base, const std::vector< nvmath::Vec2f > &jitters) |
Constructor. More... | |
NVSG_API | JitterCamera (const MonoCamera &rhs, const SimpleCamera &base, const std::vector< nvmath::Vec2f > &jitters) |
Partial Constructur. More... | |
NVSG_API | JitterCamera (const JitterCamera &rhs) |
Copy constructor. More... | |
virtual NVSG_API | ~JitterCamera (void) |
Protected destructor to prevent explicit creation on stack. More... |
A JitterCamera is a MonoCamera that produces an average of a number of slightly jittered projections. This results in full-scene antialiased images.
vector<Vec2f> jitters; jitters.resize(2); jitters[0] = Vec2f( 0.25f, 0.75f ); jitters[1] = Vec2f( 0.75f, 0.25f ); jitterCamera->setJitters( jitters );
Count Values 2 { 0.25, 0.75 }, { 0.75, 0.25 } 4 { 0.375, 0.25 }, { 0.125, 0.75 }, { 0.875, 0.25 }, { 0.625, 075 } 8 { 0.5625, 0.4375 }, { 0.0625, 0.9375 }, { 0.3125, 0.6875 }, { 0.6875, 0.8125 }, { 0.8125, 0.1875 }, { 0.9375, 0.5625 }, { 0.4375, 0.0625 }, { 0.1875, 0.3125 }
|
Constructor. Constructs a JitterCamera with the SimpleCamera base as it's base. The size of jitters gives the numbers of passes to make, and the Vec2f elements determine the amount to jitter in each pass. The units of the jitters are pixels.
|
|
Partial Constructur.
|
|
Copy constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Create a JitterCamera.
|
|
|
|
Create a clone of this JitterCamera.
Implements nvsg::MonoCamera. |
|
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 jitters. The jitter vector of Vec2f defines the number of passes and the jitter of each pass. The jitter units are pixels.
|
|
Set the jitters. The size of jitters gives the number of passes to make, and the Vec2f elements determine the amount to jitter in each pass. The jitter units are pixels.
|
|
Get the number of passes.
|
|
Update the simple base cameras with the current camera settings and the viewport size. The viewport width and height are used to scale the jitter values, allowing the jitters to be in pixel units.
|
|
Get the base camera. The base camera of a jitter camera is a SimpleCamera that is used in multiple passes, each one slightly jittered.
|
|
Get camera.
|
|
Get the projection matrix.
Implements nvsg::MonoCamera. |
|
Get the projection translation (used with stereo only).
Implements nvsg::MonoCamera. |
|
Get the inverse projection matrix.
Implements nvsg::MonoCamera. |
|
Set the projection translation (used with stereo only).
Implements nvsg::MonoCamera. |
|
Interface for adding a headlight to this camera.
Implements nvsg::Camera. |
|
Interface for removing a headlight.
Implements nvsg::Camera. |
|
Interface for getting the number of headlights attached to the camera.
Implements nvsg::Camera. |
|
Interface for getting a headlight of this camera.
Implements nvsg::Camera. |
|
Interface for getting the position/orientation of a camera's headlight.
Implements nvsg::Camera. |
|
Interface for setting the headlight position and orientation relative to the camera.
Implements nvsg::Camera. |
|
Interface for getting the viewing direction.
Implements nvsg::Camera. |
|
Interface for setting the viewing direction.
Implements nvsg::Camera. |
|
Interface for getting the distance to the target point.
Implements nvsg::Camera. |
|
Interface for setting the distance to the target point.
Implements nvsg::Camera. |
|
Interface for getting the camera position.
Implements nvsg::Camera. |
|
Interface for setting the camera position.
Implements nvsg::Camera. |
|
Interface for setting the up direction.
Implements nvsg::Camera. |
|
Interface for getting the up direction.
Implements nvsg::Camera. |
|
Interface for setting the camera orientation.
Implements nvsg::Camera. |
|
Interface for setting the camera orientation.
Implements nvsg::Camera. |
|
Interface for setting the camera orientation.
Implements nvsg::Camera. |
|
Get the current orientation.
Implements nvsg::Camera. |
|
Interface for getting the world-to-view transformation.
Implements nvsg::Camera. |
|
Interface for getting the inverse world-to-view transformation.
Implements nvsg::Camera. |
|
Interface for getting the window offset.
Implements nvsg::Camera. |
|
Interface for setting the window offset.
Implements nvsg::Camera. |
|
Interface for getting the relative window region to view.
Implements nvsg::Camera. |
|
Interface for setting the relative window region to view.
Implements nvsg::Camera. |
|
Interface for getting the window size.
Implements nvsg::Camera. |
|
Interface for setting the window size.
Implements nvsg::Camera. |
|
Interface for getting the current aspect ratio.
Implements nvsg::Camera. |
|
Interface for setting the aspect ratio.
Implements nvsg::Camera. |
|
Interface for determining if auto clipping is on. 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. |
|
Interface for enabling/disabling automatic clip plane determination.
Implements nvsg::Camera. |
|
Interface for calculating the near and far clipping distances.
Implements nvsg::Camera. |
|
Interface for getting the far clipping distance.
Implements nvsg::Camera. |
|
Interface for setting the far clipping distance.
Implements nvsg::Camera. |
|
Interface for getting the near clipping distance.
Implements nvsg::Camera. |
|
Interface for setting the near clipping distance.
Implements nvsg::Camera. |
|
Interface for moving the camera.
Implements nvsg::Camera. |
|
Interface for orbiting the camera.
Implements nvsg::Camera. |
|
Interface for rotating the camera.
Implements nvsg::Camera. |
|
Interface for zooming by a factor.
Implements nvsg::Camera. |
|
Interface for zooming to fit view to a sphere.
Implements nvsg::Camera. |