Table of Contents

Class Camera

Namespace
LibGFX.Graphics
Assembly
LibGFX.dll
public abstract class Camera
Inheritance
Camera
Derived
Inherited Members

Properties

AABB

The axis-aligned bounding box (AABB) of the camera, used for frustum culling

public AABB AABB { get; set; }

Property Value

AABB

Current

The current camera

public static Camera Current { get; set; }

Property Value

Camera

Far

The far plane of the camera

public float Far { get; set; }

Property Value

float

Near

The near plane of the camera

public float Near { get; set; }

Property Value

float

Resolution

The resolution of the camera

public Vector2 Resolution { get; set; }

Property Value

Vector2

Transform

The transform of the camera, which includes position, rotation, and scale

public Transform Transform { get; set; }

Property Value

Transform

Methods

ComputeAABB()

Computes the axis-aligned bounding box (AABB) of the camera based on its position and orientation

public abstract void ComputeAABB()

GetAspectRatio()

Gets the aspect ratio of the camera

public float GetAspectRatio()

Returns

float

GetProjectionMatrix(Viewport)

Gets the projection matrix of the camera

public abstract Matrix4 GetProjectionMatrix(Viewport viewport)

Parameters

viewport Viewport

Returns

Matrix4

GetViewMatrix()

Gets the view matrix of the camera

public abstract Matrix4 GetViewMatrix()

Returns

Matrix4

IsAABBInFrustum(Viewport, Vector3, Vector3)

Checks if a axis-aligned bounding box (AABB) is in the frustum of the camera

public abstract bool IsAABBInFrustum(Viewport viewport, Vector3 min, Vector3 max)

Parameters

viewport Viewport
min Vector3
max Vector3

Returns

bool

IsPointInFrustum(Viewport, Vector3)

Checks if a point is in the frustum of the camera

public abstract bool IsPointInFrustum(Viewport viewport, Vector3 point)

Parameters

viewport Viewport
point Vector3

Returns

bool

LookAt(Vector3)

Looks at a target point in 3D space

public abstract void LookAt(Vector3 target)

Parameters

target Vector3

SetAsCurrent()

Sets the camera as the current camera

public void SetAsCurrent()