ICamera

Represents an interface for a camera that defines the properties and methods required for controlling and manipulating the camera's view in a 3D scene.

Properties

Position

(Vector3) { get; set }: Gets or sets the position of the camera in 3D space.

FieldOfView

(float) { get; set }: Gets or sets the field of view angle of the camera's projection.

Front

(Vector3) : Gets the front vector of the camera.

(Vector3) : Gets the right vector of the camera.

Up

(Vector3) : Gets the up vector of the camera.

Public Methods

GetInverseViewMatrix

 Matrix4x4 GetInverseViewMatrix()

Gets the inverse view matrix of the camera.

Returns: Matrix4x4

  • The inverse view matrix.

GetProjectionMatrix

 Matrix4x4 GetProjectionMatrix()

Gets the projection matrix of the camera.

Returns: Matrix4x4

  • The projection matrix.

GetViewMatrix

 Matrix4x4 GetViewMatrix()

Gets the view matrix of the camera.

Returns: Matrix4x4

  • The view matrix.

Project

 Vector2 Project(Vector3 mouse3D)

Projects a 3D point in world space to a 2D point in screen space.

Parameters:

  • mouse3D (Vector3): The 3D point to project.

Returns: Vector2

  • The projected 2D point in screen space.

UnProject

 Vector3 UnProject(Vector2 mouse2D)

Unprojects a 2D point in screen space to a 3D point in world space.

Parameters:

  • mouse2D (Vector2): The 2D point to unproject.

Returns: Vector3

  • The unprojected 3D point in world space.