#include <vtkCamera.h>
vtkCamera is a virtual camera for 3D rendering. It provides methods to position and orient the view point and focal point. Convenience methods for moving about the focal point also are provided. More complex methods allow the manipulation of the computer graphics model including view up vector, clipping planes, and camera perspective.
Definition at line 47 of file vtkCamera.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | OrthogonalizeViewUp () |
void | SetDistance (double) |
void | Dolly (double value) |
void | Roll (double angle) |
void | Azimuth (double angle) |
void | Yaw (double angle) |
void | Elevation (double angle) |
void | Pitch (double angle) |
void | Zoom (double factor) |
void | SetObliqueAngles (double alpha, double beta) |
void | ApplyTransform (vtkTransform *t) |
virtual vtkMatrix4x4 * | GetViewTransformMatrix () |
virtual void | Render (vtkRenderer *) |
unsigned long | GetViewingRaysMTime () |
void | ViewingRaysModified () |
virtual void | GetFrustumPlanes (double aspect, double planes[24]) |
void | ComputeViewPlaneNormal () |
vtkMatrix4x4 * | GetCameraLightTransformMatrix () |
virtual void | UpdateViewport (vtkRenderer *vtkNotUsed(ren)) |
void | ComputeProjAndViewParams () |
void | ShallowCopy (vtkCamera *source) |
void | DeepCopy (vtkCamera *source) |
void | SetPosition (double x, double y, double z) |
void | SetPosition (const double a[3]) |
virtual double * | GetPosition () |
virtual void | GetPosition (double &, double &, double &) |
virtual void | GetPosition (double[3]) |
void | SetFocalPoint (double x, double y, double z) |
void | SetFocalPoint (const double a[3]) |
virtual double * | GetFocalPoint () |
virtual void | GetFocalPoint (double &, double &, double &) |
virtual void | GetFocalPoint (double[3]) |
void | SetViewUp (double vx, double vy, double vz) |
void | SetViewUp (const double a[3]) |
virtual double * | GetViewUp () |
virtual void | GetViewUp (double &, double &, double &) |
virtual void | GetViewUp (double[3]) |
virtual double | GetDistance () |
virtual double * | GetDirectionOfProjection () |
virtual void | GetDirectionOfProjection (double &, double &, double &) |
virtual void | GetDirectionOfProjection (double[3]) |
void | SetRoll (double angle) |
double | GetRoll () |
void | SetParallelProjection (int flag) |
virtual int | GetParallelProjection () |
virtual void | ParallelProjectionOn () |
virtual void | ParallelProjectionOff () |
void | SetUseHorizontalViewAngle (int flag) |
virtual int | GetUseHorizontalViewAngle () |
virtual void | UseHorizontalViewAngleOn () |
virtual void | UseHorizontalViewAngleOff () |
void | SetViewAngle (double angle) |
virtual double | GetViewAngle () |
void | SetParallelScale (double scale) |
virtual double | GetParallelScale () |
void | SetClippingRange (double dNear, double dFar) |
void | SetClippingRange (const double a[2]) |
virtual double * | GetClippingRange () |
virtual void | GetClippingRange (double &, double &) |
virtual void | GetClippingRange (double[2]) |
void | SetThickness (double) |
virtual double | GetThickness () |
void | SetWindowCenter (double x, double y) |
virtual double * | GetWindowCenter () |
virtual void | GetWindowCenter (double &, double &) |
virtual void | GetWindowCenter (double[2]) |
virtual double * | GetViewPlaneNormal () |
virtual void | GetViewPlaneNormal (double &, double &, double &) |
virtual void | GetViewPlaneNormal (double[3]) |
void | SetViewShear (double dxdz, double dydz, double center) |
void | SetViewShear (double d[3]) |
virtual double * | GetViewShear () |
virtual void | GetViewShear (double &, double &, double &) |
virtual void | GetViewShear (double[3]) |
virtual void | SetEyeAngle (double) |
virtual double | GetEyeAngle () |
virtual void | SetFocalDisk (double) |
virtual double | GetFocalDisk () |
virtual vtkTransform * | GetViewTransformObject () |
virtual vtkMatrix4x4 * | GetPerspectiveTransformMatrix (double aspect, double nearz, double farz) |
virtual vtkMatrix4x4 * | GetProjectionTransformMatrix (double aspect, double nearz, double farz) |
virtual vtkPerspectiveTransform * | GetProjectionTransformObject (double aspect, double nearz, double farz) |
virtual vtkMatrix4x4 * | GetCompositePerspectiveTransformMatrix (double aspect, double nearz, double farz) |
virtual vtkMatrix4x4 * | GetCompositeProjectionTransformMatrix (double aspect, double nearz, double farz) |
void | SetUserViewTransform (vtkHomogeneousTransform *transform) |
virtual vtkHomogeneousTransform * | GetUserViewTransform () |
void | SetUserTransform (vtkHomogeneousTransform *transform) |
virtual vtkHomogeneousTransform * | GetUserTransform () |
double * | GetOrientation () |
double * | GetOrientationWXYZ () |
void | SetViewPlaneNormal (double x, double y, double z) |
void | SetViewPlaneNormal (const double a[3]) |
virtual void | SetLeftEye (int) |
virtual int | GetLeftEye () |
void | SetConfigParams (double o2screen, double o2right, double o2left, double o2top, double o2bottom, double interOccDist, double scale, vtkMatrix4x4 *surfaceRot) |
void | SetHeadPose (double x00, double x01, double x02, double x03, double x10, double x11, double x12, double x13, double x20, double x21, double x22, double x23, double x30, double x31, double x32, double x33) |
virtual void | SetHeadTracked (int) |
virtual int | GetHeadTracked () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCamera * | SafeDownCast (vtkObject *o) |
static vtkCamera * | New () |
Protected Member Functions | |
vtkCamera () | |
~vtkCamera () | |
vtkMatrix4x4 * | SetTranslation (vtkMatrix4x4 mat) |
void | ComputeCameraLightTransform () |
void | SetSurface2Base (vtkMatrix4x4 *head) |
void | PartialCopy (vtkCamera *source) |
void | ComputeDistance () |
void | ComputeViewTransform () |
void | ComputePerspectiveTransform (double aspect, double nearz, double farz) |
void | ComputeCompositePerspectiveTransform (double aspect, double nearz, double farz) |
void | ComputeProjectionTransform (double aspect, double nearz, double farz) |
void | ComputeCompositeProjectionTransform (double aspect, double nearz, double farz) |
Protected Attributes | |
double | WindowCenter [2] |
double | ObliqueAngles [2] |
double | FocalPoint [3] |
double | Position [3] |
double | ViewUp [3] |
double | ViewAngle |
double | ClippingRange [2] |
double | EyeAngle |
int | ParallelProjection |
double | ParallelScale |
int | Stereo |
int | LeftEye |
double | Thickness |
double | Distance |
double | DirectionOfProjection [3] |
double | ViewPlaneNormal [3] |
double | ViewShear [3] |
int | UseHorizontalViewAngle |
vtkHomogeneousTransform * | UserTransform |
vtkHomogeneousTransform * | UserViewTransform |
vtkTransform * | ViewTransform |
vtkPerspectiveTransform * | ProjectionTransform |
vtkPerspectiveTransform * | Transform |
vtkTransform * | CameraLightTransform |
double | FocalDisk |
vtkCameraCallbackCommand * | UserViewTransformCallbackCommand |
vtkTimeStamp | ViewingRaysMTime |
int | HeadTracked |
vtkMatrix4x4 * | HeadPose |
vtkTransform * | Surface2Base |
vtkMatrix4x4 * | HeadTrackedViewMat |
double | AsymLeft |
double | AsymRight |
double | AsymBottom |
double | AsymTop |
double | EyePos [3] |
double | O2Screen |
double | O2Right |
double | O2Left |
double | O2Top |
double | O2Bottom |
double | EyeOffset |
double | ScaleFactor |
vtkMatrix4x4 * | eyePosMat |
vtkMatrix4x4 * | negEyePosMat |
vtkMatrix4x4 * | eyeOffsetMat |
Friends | |
class | vtkCameraCallbackCommand |
typedef vtkObject vtkCamera::Superclass |
Reimplemented from vtkObject.
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
Definition at line 51 of file vtkCamera.h.
vtkCamera::vtkCamera | ( | ) | [protected] |
vtkCamera::~vtkCamera | ( | ) | [protected] |
void vtkCamera::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject.
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
virtual const char* vtkCamera::GetClassName | ( | ) | [virtual] |
static int vtkCamera::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
virtual int vtkCamera::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
static vtkCamera* vtkCamera::New | ( | ) | [static] |
Construct camera instance with its focal point at the origin, and position=(0,0,1). The view up is along the y-axis, view angle is 30 degrees, and the clipping range is (.1,1000).
Reimplemented from vtkObject.
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
void vtkCamera::SetPosition | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Set/Get the position of the camera in world coordinates. The default position is (0,0,1).
void vtkCamera::SetPosition | ( | const double | a[3] | ) | [inline] |
Set/Get the position of the camera in world coordinates. The default position is (0,0,1).
Definition at line 62 of file vtkCamera.h.
virtual double* vtkCamera::GetPosition | ( | ) | [virtual] |
Set/Get the position of the camera in world coordinates. The default position is (0,0,1).
virtual void vtkCamera::GetPosition | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Set/Get the position of the camera in world coordinates. The default position is (0,0,1).
virtual void vtkCamera::GetPosition | ( | double | [3] | ) | [virtual] |
Set/Get the position of the camera in world coordinates. The default position is (0,0,1).
void vtkCamera::SetFocalPoint | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Set/Get the focal of the camera in world coordinates. The default focal point is the origin.
void vtkCamera::SetFocalPoint | ( | const double | a[3] | ) | [inline] |
Set/Get the focal of the camera in world coordinates. The default focal point is the origin.
Definition at line 71 of file vtkCamera.h.
virtual double* vtkCamera::GetFocalPoint | ( | ) | [virtual] |
Set/Get the focal of the camera in world coordinates. The default focal point is the origin.
virtual void vtkCamera::GetFocalPoint | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Set/Get the focal of the camera in world coordinates. The default focal point is the origin.
virtual void vtkCamera::GetFocalPoint | ( | double | [3] | ) | [virtual] |
Set/Get the focal of the camera in world coordinates. The default focal point is the origin.
void vtkCamera::SetViewUp | ( | double | vx, | |
double | vy, | |||
double | vz | |||
) |
Set/Get the view up direction for the camera. The default is (0,1,0).
void vtkCamera::SetViewUp | ( | const double | a[3] | ) | [inline] |
Set/Get the view up direction for the camera. The default is (0,1,0).
Definition at line 80 of file vtkCamera.h.
virtual double* vtkCamera::GetViewUp | ( | ) | [virtual] |
Set/Get the view up direction for the camera. The default is (0,1,0).
virtual void vtkCamera::GetViewUp | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Set/Get the view up direction for the camera. The default is (0,1,0).
virtual void vtkCamera::GetViewUp | ( | double | [3] | ) | [virtual] |
Set/Get the view up direction for the camera. The default is (0,1,0).
void vtkCamera::OrthogonalizeViewUp | ( | ) |
Recompute the ViewUp vector to force it to be perpendicular to camera->focalpoint vector. Unless you are going to use Yaw or Azimuth on the camera, there is no need to do this.
void vtkCamera::SetDistance | ( | double | ) |
Move the focal point so that it is the specified distance from the camera position. This distance must be positive.
virtual double vtkCamera::GetDistance | ( | ) | [virtual] |
Return the distance from the camera position to the focal point. This distance is positive.
virtual double* vtkCamera::GetDirectionOfProjection | ( | ) | [virtual] |
Get the vector in the direction from the camera position to the focal point. This is usually the opposite of the ViewPlaneNormal, the vector perpendicular to the screen, unless the view is oblique.
virtual void vtkCamera::GetDirectionOfProjection | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Get the vector in the direction from the camera position to the focal point. This is usually the opposite of the ViewPlaneNormal, the vector perpendicular to the screen, unless the view is oblique.
virtual void vtkCamera::GetDirectionOfProjection | ( | double | [3] | ) | [virtual] |
Get the vector in the direction from the camera position to the focal point. This is usually the opposite of the ViewPlaneNormal, the vector perpendicular to the screen, unless the view is oblique.
void vtkCamera::Dolly | ( | double | value | ) |
Divide the camera's distance from the focal point by the given dolly value. Use a value greater than one to dolly-in toward the focal point, and use a value less than one to dolly-out away from the focal point.
void vtkCamera::SetRoll | ( | double | angle | ) |
Set the roll angle of the camera about the direction of projection.
double vtkCamera::GetRoll | ( | ) |
Set the roll angle of the camera about the direction of projection.
void vtkCamera::Roll | ( | double | angle | ) |
Rotate the camera about the direction of projection. This will spin the camera about its axis.
void vtkCamera::Azimuth | ( | double | angle | ) |
Rotate the camera about the view up vector centered at the focal point. Note that the view up vector is whatever was set via SetViewUp, and is not necessarily perpendicular to the direction of projection. The result is a horizontal rotation of the camera.
void vtkCamera::Yaw | ( | double | angle | ) |
Rotate the focal point about the view up vector, using the camera's position as the center of rotation. Note that the view up vector is whatever was set via SetViewUp, and is not necessarily perpendicular to the direction of projection. The result is a horizontal rotation of the scene.
void vtkCamera::Elevation | ( | double | angle | ) |
Rotate the camera about the cross product of the negative of the direction of projection and the view up vector, using the focal point as the center of rotation. The result is a vertical rotation of the scene.
void vtkCamera::Pitch | ( | double | angle | ) |
Rotate the focal point about the cross product of the view up vector and the direction of projection, using the camera's position as the center of rotation. The result is a vertical rotation of the camera.
void vtkCamera::SetParallelProjection | ( | int | flag | ) |
Set/Get the value of the ParallelProjection instance variable. This determines if the camera should do a perspective or parallel projection.
virtual int vtkCamera::GetParallelProjection | ( | ) | [virtual] |
Set/Get the value of the ParallelProjection instance variable. This determines if the camera should do a perspective or parallel projection.
virtual void vtkCamera::ParallelProjectionOn | ( | ) | [virtual] |
Set/Get the value of the ParallelProjection instance variable. This determines if the camera should do a perspective or parallel projection.
virtual void vtkCamera::ParallelProjectionOff | ( | ) | [virtual] |
Set/Get the value of the ParallelProjection instance variable. This determines if the camera should do a perspective or parallel projection.
void vtkCamera::SetUseHorizontalViewAngle | ( | int | flag | ) |
Set/Get the value of the UseHorizontalViewAngle instance variable. If set, the camera's view angle represents a horizontal view angle, rather than the default vertical view angle. This is useful if the application uses a display device which whose specs indicate a particular horizontal view angle, or if the application varies the window height but wants to keep the perspective transform unchanges.
virtual int vtkCamera::GetUseHorizontalViewAngle | ( | ) | [virtual] |
Set/Get the value of the UseHorizontalViewAngle instance variable. If set, the camera's view angle represents a horizontal view angle, rather than the default vertical view angle. This is useful if the application uses a display device which whose specs indicate a particular horizontal view angle, or if the application varies the window height but wants to keep the perspective transform unchanges.
virtual void vtkCamera::UseHorizontalViewAngleOn | ( | ) | [virtual] |
Set/Get the value of the UseHorizontalViewAngle instance variable. If set, the camera's view angle represents a horizontal view angle, rather than the default vertical view angle. This is useful if the application uses a display device which whose specs indicate a particular horizontal view angle, or if the application varies the window height but wants to keep the perspective transform unchanges.
virtual void vtkCamera::UseHorizontalViewAngleOff | ( | ) | [virtual] |
Set/Get the value of the UseHorizontalViewAngle instance variable. If set, the camera's view angle represents a horizontal view angle, rather than the default vertical view angle. This is useful if the application uses a display device which whose specs indicate a particular horizontal view angle, or if the application varies the window height but wants to keep the perspective transform unchanges.
void vtkCamera::SetViewAngle | ( | double | angle | ) |
Set/Get the camera view angle, which is the angular height of the camera view measured in degrees. The default angle is 30 degrees. This method has no effect in parallel projection mode. The formula for setting the angle up for perfect perspective viewing is: angle = 2*atan((h/2)/d) where h is the height of the RenderWindow (measured by holding a ruler up to your screen) and d is the distance from your eyes to the screen.
virtual double vtkCamera::GetViewAngle | ( | ) | [virtual] |
Set/Get the camera view angle, which is the angular height of the camera view measured in degrees. The default angle is 30 degrees. This method has no effect in parallel projection mode. The formula for setting the angle up for perfect perspective viewing is: angle = 2*atan((h/2)/d) where h is the height of the RenderWindow (measured by holding a ruler up to your screen) and d is the distance from your eyes to the screen.
void vtkCamera::SetParallelScale | ( | double | scale | ) |
Set/Get the scaling used for a parallel projection, i.e. the height of the viewport in world-coordinate distances. The default is 1. Note that the "scale" parameter works as an "inverse scale" --- larger numbers produce smaller images. This method has no effect in perspective projection mode.
virtual double vtkCamera::GetParallelScale | ( | ) | [virtual] |
Set/Get the scaling used for a parallel projection, i.e. the height of the viewport in world-coordinate distances. The default is 1. Note that the "scale" parameter works as an "inverse scale" --- larger numbers produce smaller images. This method has no effect in perspective projection mode.
void vtkCamera::Zoom | ( | double | factor | ) |
In perspective mode, decrease the view angle by the specified factor. In parallel mode, decrease the parallel scale by the specified factor. A value greater than 1 is a zoom-in, a value less than 1 is a zoom-out.
void vtkCamera::SetClippingRange | ( | double | dNear, | |
double | dFar | |||
) |
Set/Get the location of the near and far clipping planes along the direction of projection. Both of these values must be positive. How the clipping planes are set can have a large impact on how well z-buffering works. In particular the front clipping plane can make a very big difference. Setting it to 0.01 when it really could be 1.0 can have a big impact on your z-buffer resolution farther away. The default clipping range is (0.1,1000).
void vtkCamera::SetClippingRange | ( | const double | a[2] | ) | [inline] |
Set/Get the location of the near and far clipping planes along the direction of projection. Both of these values must be positive. How the clipping planes are set can have a large impact on how well z-buffering works. In particular the front clipping plane can make a very big difference. Setting it to 0.01 when it really could be 1.0 can have a big impact on your z-buffer resolution farther away. The default clipping range is (0.1,1000).
Definition at line 205 of file vtkCamera.h.
virtual double* vtkCamera::GetClippingRange | ( | ) | [virtual] |
Set/Get the location of the near and far clipping planes along the direction of projection. Both of these values must be positive. How the clipping planes are set can have a large impact on how well z-buffering works. In particular the front clipping plane can make a very big difference. Setting it to 0.01 when it really could be 1.0 can have a big impact on your z-buffer resolution farther away. The default clipping range is (0.1,1000).
virtual void vtkCamera::GetClippingRange | ( | double & | , | |
double & | ||||
) | [virtual] |
Set/Get the location of the near and far clipping planes along the direction of projection. Both of these values must be positive. How the clipping planes are set can have a large impact on how well z-buffering works. In particular the front clipping plane can make a very big difference. Setting it to 0.01 when it really could be 1.0 can have a big impact on your z-buffer resolution farther away. The default clipping range is (0.1,1000).
virtual void vtkCamera::GetClippingRange | ( | double | [2] | ) | [virtual] |
Set/Get the location of the near and far clipping planes along the direction of projection. Both of these values must be positive. How the clipping planes are set can have a large impact on how well z-buffering works. In particular the front clipping plane can make a very big difference. Setting it to 0.01 when it really could be 1.0 can have a big impact on your z-buffer resolution farther away. The default clipping range is (0.1,1000).
void vtkCamera::SetThickness | ( | double | ) |
Set the distance between clipping planes. This method adjusts the far clipping plane to be set a distance 'thickness' beyond the near clipping plane.
virtual double vtkCamera::GetThickness | ( | ) | [virtual] |
Set the distance between clipping planes. This method adjusts the far clipping plane to be set a distance 'thickness' beyond the near clipping plane.
void vtkCamera::SetWindowCenter | ( | double | x, | |
double | y | |||
) |
Set/Get the center of the window in viewport coordinates. The viewport coordinate range is ([-1,+1],[-1,+1]). This method is for if you have one window which consists of several viewports, or if you have several screens which you want to act together as one large screen.
virtual double* vtkCamera::GetWindowCenter | ( | ) | [virtual] |
Set/Get the center of the window in viewport coordinates. The viewport coordinate range is ([-1,+1],[-1,+1]). This method is for if you have one window which consists of several viewports, or if you have several screens which you want to act together as one large screen.
virtual void vtkCamera::GetWindowCenter | ( | double & | , | |
double & | ||||
) | [virtual] |
Set/Get the center of the window in viewport coordinates. The viewport coordinate range is ([-1,+1],[-1,+1]). This method is for if you have one window which consists of several viewports, or if you have several screens which you want to act together as one large screen.
virtual void vtkCamera::GetWindowCenter | ( | double | [2] | ) | [virtual] |
Set/Get the center of the window in viewport coordinates. The viewport coordinate range is ([-1,+1],[-1,+1]). This method is for if you have one window which consists of several viewports, or if you have several screens which you want to act together as one large screen.
void vtkCamera::SetObliqueAngles | ( | double | alpha, | |
double | beta | |||
) |
Get/Set the oblique viewing angles. The first angle, alpha, is the angle (measured from the horizontal) that rays along the direction of projection will follow once projected onto the 2D screen. The second angle, beta, is the angle between the view plane and the direction of projection. This creates a shear transform x' = x + dz*cos(alpha)/tan(beta), y' = dz*sin(alpha)/tan(beta) where dz is the distance of the point from the focal plane. The angles are (45,90) by default. Oblique projections commonly use (30,63.435).
void vtkCamera::ApplyTransform | ( | vtkTransform * | t | ) |
Apply a transform to the camera. The camera position, focal-point, and view-up are re-calculated using the transform's matrix to multiply the old points by the new transform.
virtual double* vtkCamera::GetViewPlaneNormal | ( | ) | [virtual] |
Get the ViewPlaneNormal. This vector will point opposite to the direction of projection, unless you have created an sheared output view using SetViewShear/SetObliqueAngles.
virtual void vtkCamera::GetViewPlaneNormal | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Get the ViewPlaneNormal. This vector will point opposite to the direction of projection, unless you have created an sheared output view using SetViewShear/SetObliqueAngles.
virtual void vtkCamera::GetViewPlaneNormal | ( | double | [3] | ) | [virtual] |
Get the ViewPlaneNormal. This vector will point opposite to the direction of projection, unless you have created an sheared output view using SetViewShear/SetObliqueAngles.
void vtkCamera::SetViewShear | ( | double | dxdz, | |
double | dydz, | |||
double | center | |||
) |
Set/get the shear transform of the viewing frustum. Parameters are dx/dz, dy/dz, and center. center is a factor that describes where to shear around. The distance dshear from the camera where no shear occurs is given by (dshear = center * FocalDistance).
void vtkCamera::SetViewShear | ( | double | d[3] | ) |
Set/get the shear transform of the viewing frustum. Parameters are dx/dz, dy/dz, and center. center is a factor that describes where to shear around. The distance dshear from the camera where no shear occurs is given by (dshear = center * FocalDistance).
virtual double* vtkCamera::GetViewShear | ( | ) | [virtual] |
Set/get the shear transform of the viewing frustum. Parameters are dx/dz, dy/dz, and center. center is a factor that describes where to shear around. The distance dshear from the camera where no shear occurs is given by (dshear = center * FocalDistance).
virtual void vtkCamera::GetViewShear | ( | double & | , | |
double & | , | |||
double & | ||||
) | [virtual] |
Set/get the shear transform of the viewing frustum. Parameters are dx/dz, dy/dz, and center. center is a factor that describes where to shear around. The distance dshear from the camera where no shear occurs is given by (dshear = center * FocalDistance).
virtual void vtkCamera::GetViewShear | ( | double | [3] | ) | [virtual] |
Set/get the shear transform of the viewing frustum. Parameters are dx/dz, dy/dz, and center. center is a factor that describes where to shear around. The distance dshear from the camera where no shear occurs is given by (dshear = center * FocalDistance).
virtual void vtkCamera::SetEyeAngle | ( | double | ) | [virtual] |
Set/Get the separation between eyes (in degrees). This is used when generating stereo images.
virtual double vtkCamera::GetEyeAngle | ( | ) | [virtual] |
Set/Get the separation between eyes (in degrees). This is used when generating stereo images.
virtual void vtkCamera::SetFocalDisk | ( | double | ) | [virtual] |
Set the size of the cameras lens in world coordinates. This is only used when the renderer is doing focal depth rendering. When that is being done the size of the focal disk will effect how significant the depth effects will be.
virtual double vtkCamera::GetFocalDisk | ( | ) | [virtual] |
Set the size of the cameras lens in world coordinates. This is only used when the renderer is doing focal depth rendering. When that is being done the size of the focal disk will effect how significant the depth effects will be.
virtual vtkMatrix4x4* vtkCamera::GetViewTransformMatrix | ( | ) | [virtual] |
Return the matrix of the view transform. The ViewTransform depends on only three ivars: the Position, the FocalPoint, and the ViewUp vector. All the other methods are there simply for the sake of the users' convenience.
virtual vtkTransform* vtkCamera::GetViewTransformObject | ( | ) | [inline, virtual] |
Return the view transform. The ViewTransform depends on only three ivars: the Position, the FocalPoint, and the ViewUp vector. All the other methods are there simply for the sake of the users' convenience.
Definition at line 287 of file vtkCamera.h.
virtual vtkMatrix4x4* vtkCamera::GetPerspectiveTransformMatrix | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [virtual] |
Return the projection transform matrix, which converts from camera coordinates to viewport coordinates. The 'aspect' is the width/height for the viewport, and the nearz and farz are the Z-buffer values that map to the near and far clipping planes. The viewport coordinates of a point located inside the frustum are in the range ([-1,+1],[-1,+1],[nearz,farz]). WARNING: the name of the method is wrong, it should be GetProjectionTransformMatrix() (it is used also in parallel projection)
virtual vtkMatrix4x4* vtkCamera::GetProjectionTransformMatrix | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [virtual] |
Return the projection transform matrix, which converts from camera coordinates to viewport coordinates. The 'aspect' is the width/height for the viewport, and the nearz and farz are the Z-buffer values that map to the near and far clipping planes. The viewport coordinates of a point located inside the frustum are in the range ([-1,+1],[-1,+1],[nearz,farz]).
virtual vtkPerspectiveTransform* vtkCamera::GetProjectionTransformObject | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [virtual] |
Return the projection transform matrix, which converts from camera coordinates to viewport coordinates. The 'aspect' is the width/height for the viewport, and the nearz and farz are the Z-buffer values that map to the near and far clipping planes. The viewport coordinates of a point located inside the frustum are in the range ([-1,+1],[-1,+1],[nearz,farz]).
virtual vtkMatrix4x4* vtkCamera::GetCompositePerspectiveTransformMatrix | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [virtual] |
Return the concatenation of the ViewTransform and the ProjectionTransform. This transform will convert world coordinates to viewport coordinates. The 'aspect' is the width/height for the viewport, and the nearz and farz are the Z-buffer values that map to the near and far clipping planes. The viewport coordinates of a point located inside the frustum are in the range ([-1,+1],[-1,+1],[nearz,farz]). WARNING: the name of the method is wrong, it should be GetCompositeProjectionTransformMatrix() (it is used also in parallel projection)
virtual vtkMatrix4x4* vtkCamera::GetCompositeProjectionTransformMatrix | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [virtual] |
Return the concatenation of the ViewTransform and the ProjectionTransform. This transform will convert world coordinates to viewport coordinates. The 'aspect' is the width/height for the viewport, and the nearz and farz are the Z-buffer values that map to the near and far clipping planes. The viewport coordinates of a point located inside the frustum are in the range ([-1,+1],[-1,+1],[nearz,farz]).
void vtkCamera::SetUserViewTransform | ( | vtkHomogeneousTransform * | transform | ) |
In addition to the instance variables such as position and orientation, you can add an additional transformation for your own use. This transformation is concatenated to the camera's ViewTransform
virtual vtkHomogeneousTransform* vtkCamera::GetUserViewTransform | ( | ) | [virtual] |
In addition to the instance variables such as position and orientation, you can add an additional transformation for your own use. This transformation is concatenated to the camera's ViewTransform
void vtkCamera::SetUserTransform | ( | vtkHomogeneousTransform * | transform | ) |
In addition to the instance variables such as position and orientation, you can add an additional transformation for your own use. This transformation is concatenated to the camera's ProjectionTransform
virtual vtkHomogeneousTransform* vtkCamera::GetUserTransform | ( | ) | [virtual] |
In addition to the instance variables such as position and orientation, you can add an additional transformation for your own use. This transformation is concatenated to the camera's ProjectionTransform
virtual void vtkCamera::Render | ( | vtkRenderer * | ) | [inline, virtual] |
This method causes the camera to set up whatever is required for viewing the scene. This is actually handled by an subclass of vtkCamera, which is created through New()
Reimplemented in vtkMesaCamera, and vtkOpenGLCamera.
Definition at line 385 of file vtkCamera.h.
unsigned long vtkCamera::GetViewingRaysMTime | ( | ) |
Return the MTime that concerns recomputing the view rays of the camera.
void vtkCamera::ViewingRaysModified | ( | ) |
Mark that something has changed which requires the view rays to be recomputed.
virtual void vtkCamera::GetFrustumPlanes | ( | double | aspect, | |
double | planes[24] | |||
) | [virtual] |
Get the plane equations that bound the view frustum. The plane normals point inward. The planes array contains six plane equations of the form (Ax+By+Cz+D=0), the first four values are (A,B,C,D) which repeats for each of the planes. The planes are given in the following order: -x,+x,-y,+y,-z,+z. Warning: it means left,right,bottom,top,far,near (NOT near,far) The aspect of the viewport is needed to correctly compute the planes
double* vtkCamera::GetOrientation | ( | ) |
Get the orientation of the camera.
double* vtkCamera::GetOrientationWXYZ | ( | ) |
Get the orientation of the camera.
void vtkCamera::SetViewPlaneNormal | ( | double | x, | |
double | y, | |||
double | z | |||
) |
void vtkCamera::SetViewPlaneNormal | ( | const double | a[3] | ) |
void vtkCamera::ComputeViewPlaneNormal | ( | ) |
This method is called automatically whenever necessary, it should never be used outside of vtkCamera.cxx.
vtkMatrix4x4* vtkCamera::GetCameraLightTransformMatrix | ( | ) |
Returns a transformation matrix for a coordinate frame attached to the camera, where the camera is located at (0, 0, 1) looking at the focal point at (0, 0, 0), with up being (0, 1, 0).
virtual void vtkCamera::UpdateViewport | ( | vtkRenderer * | vtkNotUsedren | ) | [inline, virtual] |
Update the viewport
Definition at line 427 of file vtkCamera.h.
virtual void vtkCamera::SetLeftEye | ( | int | ) | [virtual] |
Set the Left Eye setting
virtual int vtkCamera::GetLeftEye | ( | ) | [virtual] |
Set the Left Eye setting
void vtkCamera::ComputeProjAndViewParams | ( | ) |
This function does 3 things. 1. It sets the camera mode to head tracked i.e ensures that the Asymmetric Frustuma are uses. 2. It sets variables like AsymLeft,AsymRight, AsymBottom and Asym to set the HeadTracked Projection Matrix. 3. It sets the View matrix Params
void vtkCamera::SetConfigParams | ( | double | o2screen, | |
double | o2right, | |||
double | o2left, | |||
double | o2top, | |||
double | o2bottom, | |||
double | interOccDist, | |||
double | scale, | |||
vtkMatrix4x4 * | surfaceRot | |||
) |
Setting the configuration parameters for head tracked camera
void vtkCamera::SetHeadPose | ( | double | x00, | |
double | x01, | |||
double | x02, | |||
double | x03, | |||
double | x10, | |||
double | x11, | |||
double | x12, | |||
double | x13, | |||
double | x20, | |||
double | x21, | |||
double | x22, | |||
double | x23, | |||
double | x30, | |||
double | x31, | |||
double | x32, | |||
double | x33 | |||
) |
Setting the configuration parameters for head tracked camera
virtual void vtkCamera::SetHeadTracked | ( | int | ) | [virtual] |
HeadTracker mode. It impacts on the computation of the transforms. Initial value is false. vtkSetMacro(HeadTracked,bool);
virtual int vtkCamera::GetHeadTracked | ( | ) | [virtual] |
HeadTracker mode. It impacts on the computation of the transforms. Initial value is false. vtkSetMacro(HeadTracked,bool);
void vtkCamera::ShallowCopy | ( | vtkCamera * | source | ) |
Copy the properties of `source' into `this'. Copy pointers of matrices.
not_this: source!=this
void vtkCamera::DeepCopy | ( | vtkCamera * | source | ) |
Copy the properties of `source' into `this'. Copy the contents of the matrices.
not_this: source!=this
void vtkCamera::ComputeDistance | ( | ) | [protected] |
These methods should only be used within vtkCamera.cxx.
void vtkCamera::ComputeViewTransform | ( | ) | [protected] |
These methods should only be used within vtkCamera.cxx.
void vtkCamera::ComputePerspectiveTransform | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [protected] |
void vtkCamera::ComputeCompositePerspectiveTransform | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [protected] |
void vtkCamera::ComputeProjectionTransform | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [protected] |
These methods should only be used within vtkCamera.cxx.
void vtkCamera::ComputeCompositeProjectionTransform | ( | double | aspect, | |
double | nearz, | |||
double | farz | |||
) | [protected] |
These methods should only be used within vtkCamera.cxx.
vtkMatrix4x4* vtkCamera::SetTranslation | ( | vtkMatrix4x4 | mat | ) | [protected] |
This is aconvenience function to get Identity matrix with translation set to given values
void vtkCamera::ComputeCameraLightTransform | ( | ) | [protected] |
void vtkCamera::SetSurface2Base | ( | vtkMatrix4x4 * | head | ) | [protected] |
This method is used to set the transfromation matrix from Display Surface coordinates wrt the Room Base coordinates
void vtkCamera::PartialCopy | ( | vtkCamera * | source | ) | [protected] |
Copy the ivars. Do nothing for the matrices. Called by ShallowCopy() and DeepCopy()
not_this: source!=this
friend class vtkCameraCallbackCommand [friend] |
Definition at line 554 of file vtkCamera.h.
double vtkCamera::WindowCenter[2] [protected] |
Definition at line 525 of file vtkCamera.h.
double vtkCamera::ObliqueAngles[2] [protected] |
Definition at line 526 of file vtkCamera.h.
double vtkCamera::FocalPoint[3] [protected] |
Definition at line 527 of file vtkCamera.h.
double vtkCamera::Position[3] [protected] |
Definition at line 528 of file vtkCamera.h.
double vtkCamera::ViewUp[3] [protected] |
Definition at line 529 of file vtkCamera.h.
double vtkCamera::ViewAngle [protected] |
Definition at line 530 of file vtkCamera.h.
double vtkCamera::ClippingRange[2] [protected] |
Definition at line 531 of file vtkCamera.h.
double vtkCamera::EyeAngle [protected] |
Definition at line 532 of file vtkCamera.h.
int vtkCamera::ParallelProjection [protected] |
Definition at line 533 of file vtkCamera.h.
double vtkCamera::ParallelScale [protected] |
Definition at line 534 of file vtkCamera.h.
int vtkCamera::Stereo [protected] |
Definition at line 535 of file vtkCamera.h.
int vtkCamera::LeftEye [protected] |
Definition at line 536 of file vtkCamera.h.
double vtkCamera::Thickness [protected] |
Definition at line 537 of file vtkCamera.h.
double vtkCamera::Distance [protected] |
Definition at line 538 of file vtkCamera.h.
double vtkCamera::DirectionOfProjection[3] [protected] |
Definition at line 539 of file vtkCamera.h.
double vtkCamera::ViewPlaneNormal[3] [protected] |
Definition at line 540 of file vtkCamera.h.
double vtkCamera::ViewShear[3] [protected] |
Definition at line 541 of file vtkCamera.h.
int vtkCamera::UseHorizontalViewAngle [protected] |
Definition at line 542 of file vtkCamera.h.
vtkHomogeneousTransform* vtkCamera::UserTransform [protected] |
Definition at line 543 of file vtkCamera.h.
vtkHomogeneousTransform* vtkCamera::UserViewTransform [protected] |
Definition at line 544 of file vtkCamera.h.
vtkTransform* vtkCamera::ViewTransform [protected] |
Definition at line 546 of file vtkCamera.h.
vtkPerspectiveTransform* vtkCamera::ProjectionTransform [protected] |
Definition at line 547 of file vtkCamera.h.
vtkPerspectiveTransform* vtkCamera::Transform [protected] |
Definition at line 548 of file vtkCamera.h.
vtkTransform* vtkCamera::CameraLightTransform [protected] |
Definition at line 549 of file vtkCamera.h.
double vtkCamera::FocalDisk [protected] |
Definition at line 551 of file vtkCamera.h.
vtkCameraCallbackCommand* vtkCamera::UserViewTransformCallbackCommand [protected] |
Definition at line 553 of file vtkCamera.h.
vtkTimeStamp vtkCamera::ViewingRaysMTime [protected] |
Definition at line 560 of file vtkCamera.h.
int vtkCamera::HeadTracked [protected] |
Definition at line 563 of file vtkCamera.h.
vtkMatrix4x4* vtkCamera::HeadPose [protected] |
Definition at line 564 of file vtkCamera.h.
vtkTransform* vtkCamera::Surface2Base [protected] |
Definition at line 565 of file vtkCamera.h.
vtkMatrix4x4* vtkCamera::HeadTrackedViewMat [protected] |
Definition at line 566 of file vtkCamera.h.
double vtkCamera::AsymLeft [protected] |
Definition at line 568 of file vtkCamera.h.
double vtkCamera::AsymRight [protected] |
Definition at line 568 of file vtkCamera.h.
double vtkCamera::AsymBottom [protected] |
Definition at line 568 of file vtkCamera.h.
double vtkCamera::AsymTop [protected] |
Definition at line 568 of file vtkCamera.h.
double vtkCamera::EyePos[3] [protected] |
Definition at line 569 of file vtkCamera.h.
double vtkCamera::O2Screen [protected] |
Definition at line 570 of file vtkCamera.h.
double vtkCamera::O2Right [protected] |
Definition at line 571 of file vtkCamera.h.
double vtkCamera::O2Left [protected] |
Definition at line 572 of file vtkCamera.h.
double vtkCamera::O2Top [protected] |
Definition at line 573 of file vtkCamera.h.
double vtkCamera::O2Bottom [protected] |
Definition at line 574 of file vtkCamera.h.
double vtkCamera::EyeOffset [protected] |
Definition at line 575 of file vtkCamera.h.
double vtkCamera::ScaleFactor [protected] |
Definition at line 576 of file vtkCamera.h.
vtkMatrix4x4* vtkCamera::eyePosMat [protected] |
Definition at line 579 of file vtkCamera.h.
vtkMatrix4x4* vtkCamera::negEyePosMat [protected] |
Definition at line 580 of file vtkCamera.h.
vtkMatrix4x4* vtkCamera::eyeOffsetMat [protected] |
Definition at line 581 of file vtkCamera.h.