KROYSDOCS
HomeWhat's newv0.1.0
PLUGIN SDK / Viewport / ViewportInput

ViewportInput

Mouse state over the viewport.

Kindrecord struct
NamespaceKroys.Plugins
Members12
SourceOptions.cs
DECLARATION

Declaration

Namespace Kroys.Plugins, assembly KroysPlugins.Sdk.dll.

Declaration
public readonly record struct ViewportInput(bool Hovered, Vector2 Mouse, Vector2 ViewportSize, Vector3 RayOrigin, Vector3 RayDirection, uint ButtonsDown, uint ButtonsPressed, uint ButtonsReleased, uint Modifiers, float Wheel)
REFERENCE

Members

Constructors
#public ViewportInput(bool Hovered, Vector2 Mouse, Vector2 ViewportSize, Vector3 RayOrigin, Vector3 RayDirection, uint ButtonsDown, uint ButtonsPressed, uint ButtonsReleased, uint Modifiers, float Wheel)
Mouse state over the viewport.
Hovered
The mouse is over the viewport image.
Mouse
Mouse position in pixels from the viewport's top-left.
ViewportSize
Viewport image size in pixels.
RayOrigin
World-space origin of the pick ray under the mouse.
RayDirection
Normalized direction of the pick ray.
ButtonsDown
Mouse buttons held (1 left, 2 right, 4 middle).
ButtonsPressed
Mouse buttons pressed this frame.
ButtonsReleased
Mouse buttons released this frame.
Modifiers
Keyboard modifiers held (1 Ctrl, 2 Shift, 4 Alt).
Wheel
Mouse wheel movement this frame.
constructor
Properties
#public bool Hovered { get; init; }
The mouse is over the viewport image.
property
#public Vector2 Mouse { get; init; }
Mouse position in pixels from the viewport's top-left.
property
#public Vector2 ViewportSize { get; init; }
Viewport image size in pixels.
property
#public Vector3 RayOrigin { get; init; }
World-space origin of the pick ray under the mouse.
property
#public Vector3 RayDirection { get; init; }
Normalized direction of the pick ray.
property
#public uint ButtonsDown { get; init; }
Mouse buttons held (1 left, 2 right, 4 middle).
property
#public uint ButtonsPressed { get; init; }
Mouse buttons pressed this frame.
property
#public uint ButtonsReleased { get; init; }
Mouse buttons released this frame.
property
#public uint Modifiers { get; init; }
Keyboard modifiers held (1 Ctrl, 2 Shift, 4 Alt).
property
#public float Wheel { get; init; }
Mouse wheel movement this frame.
property
#public bool LeftPressed { get; }
Left button pressed this frame.
property
Signatures
public ViewportInput(bool Hovered, Vector2 Mouse, Vector2 ViewportSize, Vector3 RayOrigin, Vector3 RayDirection, uint ButtonsDown, uint ButtonsPressed, uint ButtonsReleased, uint Modifiers, float Wheel)
public bool Hovered { get; init; }
public Vector2 Mouse { get; init; }
public Vector2 ViewportSize { get; init; }
public Vector3 RayOrigin { get; init; }
public Vector3 RayDirection { get; init; }
public uint ButtonsDown { get; init; }
public uint ButtonsPressed { get; init; }
public uint ButtonsReleased { get; init; }
public uint Modifiers { get; init; }
public float Wheel { get; init; }
public bool LeftPressed { get; }

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.