Expand description
Viewport-space coordinate math and conversions.
All math functions in this module are host-neutral and work in terms of normalized or pixel viewport coordinates, without assuming a specific browser or OS window environment.
Structs§
- Ray3D
- A 3D ray defined by an origin and a normalized direction.
- Viewport
Rect - Host-neutral viewport rectangle in physical or logical pixels.
Functions§
- viewport_
to_ ray - Unprojects a 2D viewport point into a 3D ray for object picking.
- viewport_
to_ world_ 2d - Transforms a 2D viewport pixel point into 2D world coordinates.
- world_
to_ viewport_ 2d - Transforms a 2D world point into viewport pixel coordinates.