C# Class Protogame.FirstPersonCameraComponent

Inheritance: IPrerenderableComponent, IHasTransform, IEnabledComponent
Exibir arquivo Open project: RedpointGames/Protogame Class Usage Examples

Public Methods

Method Description
ComputeWorldSpaceLateralVectorFromLocalSpace ( Vector3 local ) : Vector3

Computes a world space directional vector based on a directional vector local to the camera, using only the yaw component of the camera's view matrix. If you pass Vector3.Forward to this method, you'll get a world space vector that roughly translates to what is "laterally forward" for the player.

ComputeWorldSpaceVectorFromLocalSpace ( Vector3 local ) : Vector3

Computes a world space directional vector based on a directional vector local to the camera, using the camera's view matrix. If you pass Vector3.Forward to this method, you'll get a world space vector that roughly translates to what is "forward" for the player.

If the camera is angled upward, this vector will include that upward component. For a value more suited towards movement calculations, see GetWorldSpaceLateralLookAtVector.

FirstPersonCameraComponent ( INode node, IDebugRenderer debugRenderer, IFirstPersonCamera firstPersonCamera ) : System
Prerender ( Protogame.ComponentizedEntity entity, IGameContext gameContext, IRenderContext renderContext ) : void

Method Details

ComputeWorldSpaceLateralVectorFromLocalSpace() public method

Computes a world space directional vector based on a directional vector local to the camera, using only the yaw component of the camera's view matrix. If you pass Vector3.Forward to this method, you'll get a world space vector that roughly translates to what is "laterally forward" for the player.
public ComputeWorldSpaceLateralVectorFromLocalSpace ( Vector3 local ) : Vector3
local Vector3
return Vector3

ComputeWorldSpaceVectorFromLocalSpace() public method

Computes a world space directional vector based on a directional vector local to the camera, using the camera's view matrix. If you pass Vector3.Forward to this method, you'll get a world space vector that roughly translates to what is "forward" for the player.

If the camera is angled upward, this vector will include that upward component. For a value more suited towards movement calculations, see GetWorldSpaceLateralLookAtVector.

public ComputeWorldSpaceVectorFromLocalSpace ( Vector3 local ) : Vector3
local Vector3
return Vector3

FirstPersonCameraComponent() public method

public FirstPersonCameraComponent ( INode node, IDebugRenderer debugRenderer, IFirstPersonCamera firstPersonCamera ) : System
node INode
debugRenderer IDebugRenderer
firstPersonCamera IFirstPersonCamera
return System

Prerender() public method

public Prerender ( Protogame.ComponentizedEntity entity, IGameContext gameContext, IRenderContext renderContext ) : void
entity Protogame.ComponentizedEntity
gameContext IGameContext
renderContext IRenderContext
return void