Nugget
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
psyqo::Rect Struct Reference

The Rect struct. More...

#include <psyqo/primitives/common.hh>

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

Public Member Functions

bool isEmpty ()
 

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

Member Function Documentation

◆ isEmpty()

bool psyqo::Rect::isEmpty ( )
inline

Member Data Documentation

◆ [union]

union { ... } psyqo::Rect

◆ [union]

union { ... } psyqo::Rect

◆ a

Vertex psyqo::Rect::a

◆ b

Vertex psyqo::Rect::b

◆ pos

Vertex psyqo::Rect::pos

◆ size

Vertex psyqo::Rect::size

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