C# Class Protogame.FirstPersonCameraComponent

Inheritance: IPrerenderableComponent, IHasTransform, IEnabledComponent
Afficher le fichier Open project: RedpointGames/Protogame Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat Vector3

ComputeWorldSpaceVectorFromLocalSpace() public méthode

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
Résultat Vector3

FirstPersonCameraComponent() public méthode

public FirstPersonCameraComponent ( INode node, IDebugRenderer debugRenderer, IFirstPersonCamera firstPersonCamera ) : System
node INode
debugRenderer IDebugRenderer
firstPersonCamera IFirstPersonCamera
Résultat System

Prerender() public méthode

public Prerender ( Protogame.ComponentizedEntity entity, IGameContext gameContext, IRenderContext renderContext ) : void
entity Protogame.ComponentizedEntity
gameContext IGameContext
renderContext IRenderContext
Résultat void