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.
#int32_t hovered;the mouse is over the viewport image
#float mouseX;pixels from the viewport's top-left
#float mouseY;Pixels from the viewport's top edge.
#float viewportWidth;Viewport image width in pixels.
#float viewportHeight;Viewport image height in pixels.
#float rayOrigin[3];world-space pick ray under the mouse
#float rayDirection[3];Normalized direction of the pick ray.
#uint32_t buttonsDown;KROYS_MOUSE_*
#uint32_t buttonsPressed;KROYS_MOUSE_* pressed this frame.
#uint32_t buttonsReleased;KROYS_MOUSE_* released this frame.
#uint32_t modifiers;KROYS_MODIFIER_*
#float wheel;Mouse wheel movement this frame.
#uint32_t reserved;Padding reserved for later use; leave it 0.
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.