|
cangine
|
Helper for converting screen-space positions into normalized device coordinates. More...
#include <position.hpp>

Static Public Member Functions | |
| static Vector3 | normalize (const Vector3 &v) |
| Normalizes a 3D position into clip space. | |
| static Vector2 | normalize (const Vector2 &v) |
| Normalizes a 2D position into clip space. | |
| static Vertex | normalize (const Vertex &v) |
| Normalizes a vertex's position into clip space. | |
Static Public Attributes | |
| static Window * | window_instance = nullptr |
| Window used as the reference frame for normalization. | |
Helper for converting screen-space positions into normalized device coordinates.
Normalization maps pixel coordinates (relative to the active window) into the [-1, 1] clip-space range expected by the renderer.
Normalizes a 2D position into clip space.
| v | Position in screen/pixel space. |
Normalizes a 3D position into clip space.
| v | Position in screen/pixel space (z is the layer). |
Normalizes a vertex's position into clip space.
| v | Vertex whose position is in screen/pixel space. |
|
static |
Window used as the reference frame for normalization.