Class Camera
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
Current
The current camera
public static Camera Current { get; set; }
Property Value
Far
The far plane of the camera
public float Far { get; set; }
Property Value
Near
The near plane of the camera
public float Near { get; set; }
Property Value
Resolution
The resolution of the camera
public Vector2 Resolution { get; set; }
Property Value
Transform
The transform of the camera, which includes position, rotation, and scale
public Transform Transform { get; set; }
Property Value
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
GetProjectionMatrix(Viewport)
Gets the projection matrix of the camera
public abstract Matrix4 GetProjectionMatrix(Viewport viewport)
Parameters
viewportViewport
Returns
GetViewMatrix()
Gets the view matrix of the camera
public abstract Matrix4 GetViewMatrix()
Returns
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
Returns
IsPointInFrustum(Viewport, Vector3)
Checks if a point is in the frustum of the camera
public abstract bool IsPointInFrustum(Viewport viewport, Vector3 point)
Parameters
Returns
LookAt(Vector3)
Looks at a target point in 3D space
public abstract void LookAt(Vector3 target)
Parameters
targetVector3
SetAsCurrent()
Sets the camera as the current camera
public void SetAsCurrent()