Table of Contents

Class Camera

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

Perspective camera with view and projection matrix management.

public class Camera

Inheritance

Inherited Members

Constructors

Camera(RendererContext)

public Camera(RendererContext rendererContext)

Parameters

rendererContext RendererContext

Properties

AspectRatio

public float AspectRatio { get; }

Property Value

float

CameraViewMatrix

public Matrix4x4 CameraViewMatrix { get; }

Property Value

Matrix4x4

Forward

public Vector3 Forward { get; }

Property Value

Vector3

Location

public Vector3 Location { get; set; }

Property Value

Vector3

Pitch

public float Pitch { get; set; }

Property Value

float

ProjectionMatrix

public Matrix4x4 ProjectionMatrix { get; }

Property Value

Matrix4x4

Right

public Vector3 Right { get; }

Property Value

Vector3

Up

public Vector3 Up { get; }

Property Value

Vector3

ViewFrustum

public Frustum ViewFrustum { get; }

Property Value

Frustum

ViewProjectionMatrix

public Matrix4x4 ViewProjectionMatrix { get; }

Property Value

Matrix4x4

WindowSize

public Vector2 WindowSize { get; }

Property Value

Vector2

Yaw

public float Yaw { get; set; }

Property Value

float

Methods

ClampRotation()

public void ClampRotation()

CopyFrom(Camera)

public void CopyFrom(Camera fromOther)

Parameters

fromOther Camera

CreateProjectionMatrix()

public void CreateProjectionMatrix()

FrameObject(Vector3, float, float, float)

public void FrameObject(Vector3 objectPosition, float width, float height, float depth)

Parameters

objectPosition Vector3
width float
height float
depth float

FrameObjectFromAngle(Vector3, float, float, float, float, float)

public void FrameObjectFromAngle(Vector3 objectPosition, float width, float height, float depth, float yaw, float pitch)

Parameters

objectPosition Vector3
width float
height float
depth float
yaw float
pitch float

LookAt(Vector3)

public void LookAt(Vector3 target)

Parameters

target Vector3

RecalculateDirectionVectors()

public void RecalculateDirectionVectors()

RecalculateMatrices()

public void RecalculateMatrices()

SetFromTransformMatrix(Matrix4x4)

public void SetFromTransformMatrix(Matrix4x4 matrix)

Parameters

matrix Matrix4x4

SetLocation(Vector3)

public void SetLocation(Vector3 location)

Parameters

location Vector3

SetLocationPitchYaw(Vector3, float, float)

public void SetLocationPitchYaw(Vector3 location, float pitch, float yaw)

Parameters

location Vector3
pitch float
yaw float

SetViewConstants(ViewConstants)

public void SetViewConstants(ViewConstants viewConstants)

Parameters

viewConstants ViewConstants

SetViewportSize(int, int)

public void SetViewportSize(int viewportWidth, int viewportHeight)

Parameters

viewportWidth int
viewportHeight int