Unplugged Viz
High-performance scientific visualization isn't just for the workstation anymore
Durwella.Unplugged.Viz.CameraControl Class Reference

A control for positioning the camera within a TumbleView. The default implementation can be used to provide straightforward control of the camera; alternatively, More...

Public Member Functions

virtual Matrix CreateModelMatrix ()
 Create the model matrix. The default implementation is shown below.

public virtual Matrix CreateModelMatrix()
{
var t = Matrix.CreateTranslation(Translation);
var s = Matrix.CreateScale(ZoomScale);
var r = CreateRotationMatrix();
return t * s * r;
}

CreateRotationMatrix is defined as follows:

Matrix CreateRotationMatrix()
{
var q = Roll * Orientation;
return Matrix.CreateFromQuaternion(q);
}
More...
 
virtual Matrix CreateViewProjectionMatrix ()
 Create the view projection matrix. The default implementation is shown below.

public virtual Matrix CreateViewProjectionMatrix()
{
var view = Matrix.CreateLookAt(CameraPosition, Vector3.Zero, Vector3.Up);
var perspective = Matrix.CreatePerspectiveFieldOfView(FOV, AspectRatio, NearPlane, FarPlane);
return view * perspective;
}
More...
 
virtual Matrix CreateModelViewProjectionMatrix ()
 Create the model view projection. The default implementation is shown below.

public virtual Matrix CreateModelViewProjectionMatrix()
{
var viewProjection = CreateViewProjectionMatrix();
var model = CreateModelMatrix();
return model * viewProjection;
}
More...
 

Properties

Quaternion Orientation [get, set]
 Gets or sets the orientation of the TumbleView to which the CameraControl is attached. More...
 
Quaternion Roll [get, set]
 Gets or sets the roll of the camera. More...
 
Vector3 Translation [get, set]
 Gets or sets the translation of the TumbleView to which the CameraControl is attached. More...
 
Vector3 CameraPosition [get, set]
 Gets or sets the camera position. More...
 
float ZoomScale [get, set]
 Gets or sets the zoom scale of the camera. More...
 

Detailed Description

A control for positioning the camera within a TumbleView. The default implementation can be used to provide straightforward control of the camera; alternatively,

Inherits BindableObject.

Member Function Documentation

virtual Matrix Durwella.Unplugged.Viz.CameraControl.CreateModelMatrix ( )
virtual

Create the model matrix. The default implementation is shown below.

public virtual Matrix CreateModelMatrix()
{
var t = Matrix.CreateTranslation(Translation);
var s = Matrix.CreateScale(ZoomScale);
var r = CreateRotationMatrix();
return t * s * r;
}

CreateRotationMatrix is defined as follows:

Matrix CreateRotationMatrix()
{
var q = Roll * Orientation;
return Matrix.CreateFromQuaternion(q);
}

Returns
The model matrix.
See also
CreateModelViewProjectionMatrix
virtual Matrix Durwella.Unplugged.Viz.CameraControl.CreateModelViewProjectionMatrix ( )
virtual

Create the model view projection. The default implementation is shown below.

public virtual Matrix CreateModelViewProjectionMatrix()
{
var viewProjection = CreateViewProjectionMatrix();
var model = CreateModelMatrix();
return model * viewProjection;
}

Returns
The model projection matrix.
virtual Matrix Durwella.Unplugged.Viz.CameraControl.CreateViewProjectionMatrix ( )
virtual

Create the view projection matrix. The default implementation is shown below.

public virtual Matrix CreateViewProjectionMatrix()
{
var view = Matrix.CreateLookAt(CameraPosition, Vector3.Zero, Vector3.Up);
var perspective = Matrix.CreatePerspectiveFieldOfView(FOV, AspectRatio, NearPlane, FarPlane);
return view * perspective;
}

Returns
The view projection matrix.
See also
CreateModelViewProjectionMatrix

Property Documentation

Vector3 Durwella.Unplugged.Viz.CameraControl.CameraPosition
getset

Gets or sets the camera position.

See also
CreateViewProjectionMatrix
Quaternion Durwella.Unplugged.Viz.CameraControl.Orientation
getset

Gets or sets the orientation of the TumbleView to which the CameraControl is attached.

See also
CreateRotationMatrix
Quaternion Durwella.Unplugged.Viz.CameraControl.Roll
getset

Gets or sets the roll of the camera.

See also
CreateRotationMatrix
Vector3 Durwella.Unplugged.Viz.CameraControl.Translation
getset

Gets or sets the translation of the TumbleView to which the CameraControl is attached.

See also
CreateModelMatrix
float Durwella.Unplugged.Viz.CameraControl.ZoomScale
getset

Gets or sets the zoom scale of the camera.

See also
CreateModelMatrix

The documentation for this class was generated from the following file: