Viewport

Namespace: SharpPluginLoader.Core.View

public class Viewport : SharpPluginLoader.Core.MtObject

Inheritance ObjectNativeWrapperMtObjectViewport

Properties

Camera

Gets the camera of the viewport.

public Camera Camera { get; }

Property Value

Camera

Visible

Gets a boolean indicating whether the viewport is visible.

public Boolean& Visible { get; }

Property Value

Boolean&

Region

The region of the viewport.

public MtRect& Region { get; }

Property Value

MtRect&

ViewMatrix

The view matrix of the viewports camera.

public MtMatrix4X4& ViewMatrix { get; }

Property Value

MtMatrix4X4&

ProjectionMatrix

The projection matrix of the viewports camera.

public MtMatrix4X4& ProjectionMatrix { get; }

Property Value

MtMatrix4X4&

PrevViewMatrix

The previous view matrix of the viewports camera.

public MtMatrix4X4& PrevViewMatrix { get; }

Property Value

MtMatrix4X4&

PrevProjectionMatrix

The previous projection matrix of the viewports camera.

public MtMatrix4X4& PrevProjectionMatrix { get; }

Property Value

MtMatrix4X4&

Instance

The native pointer.

public nint Instance { get; set; }

Property Value

IntPtr

Constructors

Viewport(IntPtr)

public Viewport(nint instance)

Parameters

instance IntPtr

Viewport()

public Viewport()

Methods

WorldToScreen(MtVector3, MtVector2&)

Converts a point in world space to screen space.

public bool WorldToScreen(MtVector3 worldPosition, MtVector2& screenPos)

Parameters

worldPosition MtVector3
The point in world space.

screenPos MtVector2&
The point in screen space.

Returns

Boolean
True if the point is visible, false otherwise.