PLUGIN SDK / Viewport / ViewportInput
ViewportInput
Mouse state over the viewport.
Kindrecord struct
NamespaceKroys.Plugins
Members12
Source
Options.csDECLARATION
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.
Properties
#public bool Hovered { get; init; }The mouse is over the viewport image.
#public Vector2 Mouse { get; init; }Mouse position in pixels from the viewport's top-left.
#public Vector2 ViewportSize { get; init; }Viewport image size in pixels.
#public Vector3 RayOrigin { get; init; }World-space origin of the pick ray under the mouse.
#public Vector3 RayDirection { get; init; }Normalized direction of the pick ray.
#public uint ButtonsDown { get; init; }Mouse buttons held (1 left, 2 right, 4 middle).
#public uint ButtonsPressed { get; init; }Mouse buttons pressed this frame.
#public uint ButtonsReleased { get; init; }Mouse buttons released this frame.
#public uint Modifiers { get; init; }Keyboard modifiers held (1 Ctrl, 2 Shift, 4 Alt).
#public float Wheel { get; init; }Mouse wheel movement this frame.
#public bool LeftPressed { get; }Left button pressed this frame.
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.