Viewport
Namespace: SharpPluginLoader.Core.View
public class Viewport : SharpPluginLoader.Core.MtObject
Inheritance Object → NativeWrapper → MtObject → Viewport
Properties
Camera
Gets the camera of the viewport.
public Camera Camera { get; }
Property Value
Visible
Gets a boolean indicating whether the viewport is visible.
public Boolean& Visible { get; }
Property Value
Region
The region of the viewport.
public MtRect& Region { get; }
Property Value
ViewMatrix
The view matrix of the viewports camera.
public MtMatrix4X4& ViewMatrix { get; }
Property Value
ProjectionMatrix
The projection matrix of the viewports camera.
public MtMatrix4X4& ProjectionMatrix { get; }
Property Value
PrevViewMatrix
The previous view matrix of the viewports camera.
public MtMatrix4X4& PrevViewMatrix { get; }
Property Value
PrevProjectionMatrix
The previous projection matrix of the viewports camera.
public MtMatrix4X4& PrevProjectionMatrix { get; }
Property Value
Instance
The native pointer.
public nint Instance { get; set; }
Property Value
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.