Nugget
|
#include <psyqo/primitives/common.hh>
Public Member Functions | |
bool | isEmpty () |
Public Attributes | ||
union { | ||
Vertex a | ||
Vertex pos | ||
}; | ||
union { | ||
Vertex b | ||
Vertex size | ||
}; | ||
The Rect struct.
Represents a rectangle in the VRAM space. Its binary representation is meant to be the same as the rectangles that GPU commands await. It should fit in two registers, and the MIPS ABI ought to pass it as argument or return value gracefully, making it a nice general purpose utility.
Accessors can be either {a, b}, or {pos, size}, for readability purposes.
Using C++ list-initializations, one can create a rectangle directly using such syntax:
Rect{.a = {.x = 18, .y = 42}, .b = {}};
|
inline |
union { ... } psyqo::Rect |
union { ... } psyqo::Rect |
Vertex psyqo::Rect::a |
Vertex psyqo::Rect::b |
Vertex psyqo::Rect::pos |
Vertex psyqo::Rect::size |