KROYSDOCS
HomeWhat's newv0.1.0
C/C++ SDK / C ABI · Viewport (editor, 2.1; capability viewport-tools) / KroysViewportInput

KroysViewportInput

Mouse state over the viewport, passed to the active tool's OnInput.

Kindstruct
Headerkroys/kroys_plugin.h
Members14
DECLARATION

Declaration

Declared in kroys/kroys_plugin.h.

kroys_plugin.h
typedef struct KroysViewportInput { ... } KroysViewportInput;
REFERENCE

Members

Fields
#uint32_t structSize;

Size of this struct as the writer compiled it (sizeof); the reader uses it to detect members appended by later minor versions.

field
#int32_t hovered;

the mouse is over the viewport image

field
#float mouseX;

pixels from the viewport's top-left

field
#float mouseY;

Pixels from the viewport's top edge.

field
#float viewportWidth;

Viewport image width in pixels.

field
#float viewportHeight;

Viewport image height in pixels.

field
#float rayOrigin[3];

world-space pick ray under the mouse

field
#float rayDirection[3];

Normalized direction of the pick ray.

field
#uint32_t buttonsDown;

KROYS_MOUSE_*

field
#uint32_t buttonsPressed;

KROYS_MOUSE_* pressed this frame.

field
#uint32_t buttonsReleased;

KROYS_MOUSE_* released this frame.

field
#uint32_t modifiers;

KROYS_MODIFIER_*

field
#float wheel;

Mouse wheel movement this frame.

field
#uint32_t reserved;

Padding reserved for later use; leave it 0.

field
Members
uint32_t structSize;
int32_t hovered;
float mouseX;
float mouseY;
float viewportWidth;
float viewportHeight;
float rayOrigin[3];
float rayDirection[3];
uint32_t buttonsDown;
uint32_t buttonsPressed;
uint32_t buttonsReleased;
uint32_t modifiers;
float wheel;
uint32_t reserved;

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