Camera

Namespace: SharpPluginLoader.Core.View

public class Camera : SharpPluginLoader.Core.MtObject

Inheritance ObjectNativeWrapperMtObjectCamera

Properties

Position

The position of the camera, in world space coordinates.

public MtVector3& Position { get; }

Property Value

MtVector3&

Up

The up vector of the camera, in local coordinates.

public MtVector3& Up { get; }

Property Value

MtVector3&

Target

The target of the camera, in local coordinates.

public MtVector3& Target { get; }

Property Value

MtVector3&

FarClip

The far clip plane of the camera.

public Single& FarClip { get; }

Property Value

Single&

NearClip

The near clip plane of the camera.

public Single& NearClip { get; }

Property Value

Single&

AspectRatio

The aspect ratio of the camera.

public Single& AspectRatio { get; }

Property Value

Single&

FieldOfView

The field of view of the camera, in radians.

public Single& FieldOfView { get; }

Property Value

Single&

Instance

The native pointer.

public nint Instance { get; set; }

Property Value

IntPtr

Constructors

Camera(IntPtr)

public Camera(nint instance)

Parameters

instance IntPtr

Camera()

public Camera()

Methods

GetTargetWorld()

Gets the target of the camera in world space coordinates.

public MtVector3 GetTargetWorld()

Returns

MtVector3
The target of the camera in world space coordinates.

GetViewMatrix()

Computes the view matrix of the camera.

public MtMatrix4X4 GetViewMatrix()

Returns

MtMatrix4X4
The view matrix of the camera.

Remarks:

Warning: This method does not perform any caching. It is recommended to cache the result of this method.

GetProjectionMatrix()

Computes the projection matrix of the camera.

public MtMatrix4X4 GetProjectionMatrix()

Returns

MtMatrix4X4
The projection matrix of the camera.

Remarks:

Warning: This method does not perform any caching. It is recommended to cache the result of this method.