IFirstPersonCamera

interface IFirstPersonCamera

Given a set of inputs for an FPS camera, sets up the rendering matrix to produce the correct rendering for a FPS camera.

This interface does not represent an instance of a camera; it is a utility class for configuring the rendering context. To attach a camera to a componentized entity, use T:Protogame.FirstPersonCameraComponent.

void Apply(IRenderContext renderContext, Vector3 position, Vector3 lookAt, System.Nullable<Vector3> up, float fieldOfView, float nearPlaneDistance, float farPlaneDistance)

Applies an FPS perspective to the current rendering context.

Parameters:
  • renderContext (Protogame.IRenderContext) – The current render context.
  • position (Microsoft.Xna.Framework.Vector3) – The position of the camera in the world.
  • lookAt (Microsoft.Xna.Framework.Vector3) – The position to look at.
  • up (System.Nullable<Vector3>) – The up vector (defaults to P:Microsoft.Xna.Framework.Vector3.Up.
  • fieldOfView (float) – The field of view in radians (defaults to 75 degrees in radians).
  • nearPlaneDistance (float) – The near plane distance (defaults to 0.1).
  • farPlaneDistance (float) – The far plane distance (defaults to 1000).