Table of Contents

Class Viewport

Namespace
SharpPluginLoader.Core.View
Assembly
SharpPluginLoader.Core.dll
public class Viewport : MtObject
Inheritance
Viewport
Inherited Members

Constructors

Viewport()

public Viewport()

Viewport(nint)

public Viewport(nint instance)

Parameters

instance nint

Properties

Camera

Gets the camera of the viewport.

public Camera? Camera { get; }

Property Value

Camera

PrevProjectionMatrix

The previous projection matrix of the viewports camera.

public ref Matrix4x4 PrevProjectionMatrix { get; }

Property Value

Matrix4x4

PrevViewMatrix

The previous view matrix of the viewports camera.

public ref Matrix4x4 PrevViewMatrix { get; }

Property Value

Matrix4x4

ProjectionMatrix

The projection matrix of the viewports camera.

public ref Matrix4x4 ProjectionMatrix { get; }

Property Value

Matrix4x4

Region

The region of the viewport.

public ref Rectangle Region { get; }

Property Value

Rectangle

ViewMatrix

The view matrix of the viewports camera.

public ref Matrix4x4 ViewMatrix { get; }

Property Value

Matrix4x4

Visible

Gets a boolean indicating whether the viewport is visible.

public ref bool Visible { get; }

Property Value

bool

Methods

WorldToScreen(Vector3, out Vector2)

Converts a point in world space to screen space.

public bool WorldToScreen(Vector3 worldPosition, out Vector2 screenPos)

Parameters

worldPosition Vector3

The point in world space.

screenPos Vector2

The point in screen space.

Returns

bool

True if the point is visible, false otherwise.