PSYQo
Public Attributes | List of all members
psyqo::Rect Struct Reference

The Rect struct. More...

#include <primitives.hh>

Collaboration diagram for psyqo::Rect:
Collaboration graph
[legend]

Public Attributes

union {
   Vertex   a
 
   Vertex   pos
 
}; 
 
union {
   Vertex   b
 
   Vertex   size
 
}; 
 

Detailed Description

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 = {}};


The documentation for this struct was generated from the following file: