C# Class Indiefreaks.Xna.Rendering.Camera.ChaseCamera3D

Inheritance: Camera3D
Afficher le fichier Open project: Indiefreaks/igf

Méthodes publiques

Méthode Description
ChaseCamera3D ( float aspectRatio, float fieldOfView, float nearPlaneDistance, float farPlaneDistance ) : System

Creates a new instance of the camera

Reset ( ) : void

Forces camera to be at desired position and to stop moving. The is useful when the chased object is first created or after it has been teleported. Failing to call this after a large change to the chased object's position will result in the camera quickly flying across the world.

Méthodes protégées

Méthode Description
UpdateInput ( InputManager input ) : void

Override this method to catch input events and act on the camera

UpdateViewMatrix ( GameTime gameTime ) : Matrix

Animates the camera from its current position towards the desired offset behind the chased object. The camera's animation is controlled by a simple physical spring attached to the camera and anchored to the desired position.

Private Methods

Méthode Description
UpdateMatrices ( ) : Matrix

Rebuilds camera's view and projection matricies.

UpdateWorldPositions ( ) : void

Rebuilds object space values in world space. Invoke before publicly returning or privately accessing world space values.

Method Details

ChaseCamera3D() public méthode

Creates a new instance of the camera
public ChaseCamera3D ( float aspectRatio, float fieldOfView, float nearPlaneDistance, float farPlaneDistance ) : System
aspectRatio float
fieldOfView float
nearPlaneDistance float
farPlaneDistance float
Résultat System

Reset() public méthode

Forces camera to be at desired position and to stop moving. The is useful when the chased object is first created or after it has been teleported. Failing to call this after a large change to the chased object's position will result in the camera quickly flying across the world.
public Reset ( ) : void
Résultat void

UpdateInput() protected méthode

Override this method to catch input events and act on the camera
protected UpdateInput ( InputManager input ) : void
input InputManager The current input instance
Résultat void

UpdateViewMatrix() protected méthode

Animates the camera from its current position towards the desired offset behind the chased object. The camera's animation is controlled by a simple physical spring attached to the camera and anchored to the desired position.
protected UpdateViewMatrix ( GameTime gameTime ) : Matrix
gameTime Microsoft.Xna.Framework.GameTime
Résultat Matrix