Tesla Graphics Engine Documentation (January 2012)
ICamera Interface
TeslaTesla.GraphicsICamera
Interface that defines a camera. Camera's are set to the renderer before a scene is to be rendered, and contains the viewport used to render the scene to the screen.
Declaration Syntax
C#
public interface ICamera : ISavable
Members
All Members Methods Properties



Icon Member Description
Contains(BoundingVolume)
Tests if a bounding volume is contained in the camera's frustum. Used to make cull checks. If the volume is null, it will always return ContainmentType.Inside

CreatePickRay(Vector2)
Creates a ray to do picking tests, where the origin is on the near plane. This is the same as using GetWorldCoordinates for (x,y,0) and (x,y,1) and using the normalized difference as the ray's direction.

CreatePickRay(Vector2%, Ray%)
Creates a ray to do picking tests, where the origin is on the near plane. This is the same as using GetWorldCoordinates for (x,y,0) and (x,y,1) and using the normalized difference as the ray's direction.

Direction
Gets or sets the direction the camera is facing in (forward vector of the camera's frame).

GetFrustumCorners(array<Vector3>[]()[][])
Fills the provided array with the 8 positions representing the corners of the camera's view frustum. The array must have the appropiate length (8 corners).

GetFrustumCorners()()()()
Returns an array of 8 positions, representing the corners of the camera's view frustum.

GetScreenCoordinates(Vector3)
Gets the screen position based on the world position.

GetScreenCoordinates(Vector3%, Vector2%)
Gets the screen position based on the world position.

GetWorldCoordinates(Vector3)
Gets the world position based on the x,y screen coordinates.

GetWorldCoordinates(Vector3%, Vector3%)
Gets the world position based on the x,y screen position.

LookAt(Vector3, Vector3)
Makes the camera look at the target.

Name
Gets or sets the name of the camera.

Position
Gets or sets the position of the camera in world space.

ProjectionMatrix
Gets the projection matrix of the camera.

ProjectionMode
Gets the projection mode of the camera. This can be se in the SetProjection methods.

Read(ISavableReader)
Deserializes the object and populates it from the input.
(Inherited from ISavable.)
Right
Gets or set the left vector of the camera's frame.

Set(ICamera)
Sets this camera to match the values of the source camera.

SetAxes(Vector3, Vector3, Vector3)
Sets the axes of the camera's frame.

SetAxes(Quaternion)
Sets the axes of the camera's frame from a quaternion rotation.

SetAxes(Matrix)
Sets the axes of the camera's frame from a matrix rotation.

SetFrame(Vector3, Vector3, Vector3, Vector3)
Set's the camera's frame.

SetFrame(Vector3, Quaternion)
Sets the camera's frame from the Quaternion rotation.

SetFrame(Vector3, Matrix)
Set's the camera's frame from the Matrix rotation.

SetProjection(ProjectionMode, Single, Single, Single, Single)
Set the camera's projection, either an orthographic camera or a perspective camera.

SetProjection(Single, Single, Single)
Sets the camera's projection. This will always create a perspective camera.

SetProjection(ProjectionMode, Single, Single, Single, Single, Single, Single)
Sets the camera's projection, either an orthographic camera or a perspective camera.

Up
Gets or sets the up vector of the camera's frame.

Update()()()()
Updates the camera's state, e.g. the view matrix and bounding frustum. This should be called whenever the camera's frame or projection matrix change.

ViewMatrix
Gets the view matrix of the camera.

Viewport
Gets or sets the viewport associated with the camera.

ViewProjectionMatrix
Gets the View x Projection matrix.

Write(ISavableWriter)
Serializes the object and writes it to the output.
(Inherited from ISavable.)

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)