Documentation for vtkCamera

vtkCamera - a virtual camera for 3D rendering

Super Class: vtkObject

Description:

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.

 

Methods:

void vtkCamera ()
void vtkCamera ()
void PrintSelf (unknown & ,vtkIndent )
const char *GetClassName ()
static vtkCamera *New ()
void SetPosition (float ,float ,float )
void SetPosition (float )
float *GetPosition ()
void SetFocalPoint (float ,float ,float )
void SetFocalPoint (float )
float *GetFocalPoint ()
void SetViewUp (float ,float ,float )
void SetViewUp (float )
float *GetViewUp ()
void SetClippingRange (float ,float )
void SetClippingRange (float )
float *GetClippingRange ()
void Render (vtkRenderer *)
void SetViewAngle (float )
float GetViewAngle ()
void SetEyeAngle (float )
float GetEyeAngle ()
int GetStereo ()
void SetWindowCenter (float ,float )
float *GetWindowCenter ()
void SetParallelScale (float )
float GetParallelScale ()
void SetFocalDisk (float )
float GetFocalDisk ()
void SetLeftEye (int )
int GetLeftEye ()
void SetThickness (float )
float GetThickness ()
void SetDistance (float )
float GetDistance ()
void SetParallelProjection (int )
int GetParallelProjection ()
void ParallelProjectionOn ()
void ParallelProjectionOff ()
void SetViewPlaneNormal (float ,float ,float )
void SetViewPlaneNormal (float )
float *GetViewPlaneNormal ()
void ComputeViewPlaneNormal ()
void ComputeDistance ()
void ComputeViewTransform ()
void ComputePerspectiveTransform (float ,float ,float )
vtkMatrix4x4 *GetViewTransformMatrix ()
vtkMatrix4x4 *GetPerspectiveTransformMatrix (float ,float ,float )
vtkMatrix4x4 *GetCompositePerspectiveTransformMatrix (float ,float ,float )
void SetRoll (float )
void Roll (float )
float GetRoll ()
void Zoom (float )
void Dolly (float )
void Azimuth (float )
void Yaw (float )
void Elevation (float )
void Pitch (float )
void OrthogonalizeViewUp ()
float *GetOrientation ()
float *GetOrientationWXYZ ()
unsigned long GetViewingRaysMTime ()
void ViewingRaysModified ()
void GetFrustumPlanes (float )
vtkMatrix4x4 &GetViewTransform ()
vtkMatrix4x4 &GetPerspectiveTransform (float ,float ,float )
vtkMatrix4x4 &GetCompositePerspectiveTransform (float ,float ,float )

 

Detailed Method Descriptions:

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).

static vtkCamera *New ()

Set/Get the position of the camera in world coordinates.

void SetPosition (float ,float ,float )
void SetPosition (float )
float *GetPosition ()

Set/Get the focal point of the camera in world coordinates

void SetFocalPoint (float ,float ,float )
void SetFocalPoint (float )
float *GetFocalPoint ()

Set/Get the view up direction for the camera.

void SetViewUp (float ,float ,float )
void SetViewUp (float )
float *GetViewUp ()

Set/Get the location of the front and back clipping planes along the direction of projection. These are positive distances along the direction of projection. How these values 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.

void SetClippingRange (float ,float )
void SetClippingRange (float )
float *GetClippingRange ()

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()

void Render (vtkRenderer *)

Set/Get the camera view angle (i.e., the width of view in degrees). Larger values yield greater perspective distortion. vtkSetClampMacro(ViewAngle,float,1.0,179.0);

void SetViewAngle (float )
float GetViewAngle ()

Set/Get the separation between eyes (in degrees). This is used when generating stereo images.

void SetEyeAngle (float )
float GetEyeAngle ()

Is this camera rendering in stereo?

int GetStereo ()

Set/Get the center of the window. vtkSetVector2Macro(WindowCenter,float);

void SetWindowCenter (float ,float )
float *GetWindowCenter ()

Set/Get the scaling used for a parallel projection. vtkSetMacro(ParallelScale,float);

void SetParallelScale (float )
float GetParallelScale ()

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.

void SetFocalDisk (float )
float GetFocalDisk ()

Set/Get whether this is the left eye's render or the right eye's. This is normally only used in stereo rendering and is handled automatically.

void SetLeftEye (int )
int GetLeftEye ()

Set the distance between clipping planes. A side effect of this method is to adjust the back clipping plane to be equal to the front clipping plane plus the thickness.

void SetThickness (float )
float GetThickness ()

Set the distance of the focal point from the camera. The focal point is modified accordingly. This should be positive.

void SetDistance (float )
float GetDistance ()

Set/Get the value of the ParallelProjection instance variable. This determines if the camera should do a perspective or parallel projection. vtkSetMacro(ParallelProjection,int);

void SetParallelProjection (int )
int GetParallelProjection ()
void ParallelProjectionOn ()
void ParallelProjectionOff ()

Set/Get the direction that the camera points. Adjusts position to be consistent with the view plane normal.

void SetViewPlaneNormal (float ,float ,float )
void SetViewPlaneNormal (float )
float *GetViewPlaneNormal ()

Compute the view plane normal from the position and focal point.

void ComputeViewPlaneNormal ()

Compute the camera distance, which is the distance between the focal point and position.

void ComputeDistance ()

Compute the view transform matrix. This is used in converting between view and world coordinates. It does not include any perspective effects but it does include shearing and scaling.

void ComputeViewTransform ()

Compute the perspective transform matrix. This is used in converting between view and world coordinates.

void ComputePerspectiveTransform (float ,float ,float )

Return the perspective transform matrix. See ComputePerspectiveTransform.

vtkMatrix4x4 *GetViewTransformMatrix ()
vtkMatrix4x4 *GetPerspectiveTransformMatrix (float ,float ,float )
vtkMatrix4x4 *GetCompositePerspectiveTransformMatrix (float ,float ,float )

Set the roll angle of the camera about the view plane normal.

void SetRoll (float )

Rotate the camera around the view plane normal.

void Roll (float )

Returns the roll of the camera.

float GetRoll ()

Change the ViewAngle of the camera so that more or less of a scene occupies the viewport. A value > 1 is a zoom-in. A value <1 is a zoom-out.

void Zoom (float )

Move the position of the camera along the view plane normal. Moving towards the focal point (e.g., > 1) is a dolly-in, moving away from the focal point (e.g., <1) is a dolly-out.

void Dolly (float )

Rotate the camera about the view up vector centered at the focal point.

void Azimuth (float )

Rotate the focal point about the view up vector centered at the camera's position.

void Yaw (float )

Rotate the camera about the cross product of the view plane normal and the view up vector centered on the focal point.

void Elevation (float )

Rotate the focal point about the cross product of the view up vector and the view plane normal, centered at the camera's position.

void Pitch (float )

Recompute the view up vector so that it is perpendicular to the view plane normal.

void OrthogonalizeViewUp ()

Returns the orientation of the camera. This is a vector of X,Y and Z rotations that when performed in the order RotateZ, RotateX, and finally RotateY, will yield the same 3x3 rotation matrix for the camera.

float *GetOrientation ()

Returns the WXYZ orientation of the camera.

float *GetOrientationWXYZ ()

Return the MTime that concerns recomputing the view rays of the camera.

unsigned long GetViewingRaysMTime ()

Mark that something has changed which requires the view rays to be recomputed.

void ViewingRaysModified ()

Get the plane equations that bound the view frustum. The plane normals point inward.

void GetFrustumPlanes (float )

For legacy compatibility. Do not use.

vtkMatrix4x4 &GetViewTransform ()
vtkMatrix4x4 &GetPerspectiveTransform (float ,float ,float )