Nugget
Loading...
Searching...
No Matches
Public Attributes | List of all members
psyqo::Vertex Union Reference

The Vertex struct. More...

#include <psyqo/primitives/common.hh>

Public Attributes

struct { 
 
   union { 
 
      int16_t   x 
 
      int16_t   u 
 
      int16_t   s 
 
      int16_t   w 
 
   }  
 
   union { 
 
      int16_t   y 
 
      int16_t   v 
 
      int16_t   t 
 
      int16_t   h 
 
   }  
 
};  
 
uint32_t packed
 

Detailed Description

The Vertex struct.

Represents a vertex in the VRAM space. Its binary representation is meant to be the same as the vertices that GPU commands await. It should fit in a single register, 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 {x, y}, {u, v}, {s, t}, or {w, h}, for readability purposes.

Using C++ list-initializations, one can create a vertex directly using such syntax:

Vertex{{.x = 18, .y = 42}};

Member Data Documentation

◆ [struct]

struct { ... } psyqo::Vertex

◆ h

int16_t psyqo::Vertex::h

◆ packed

uint32_t psyqo::Vertex::packed

◆ s

int16_t psyqo::Vertex::s

◆ t

int16_t psyqo::Vertex::t

◆ u

int16_t psyqo::Vertex::u

◆ v

int16_t psyqo::Vertex::v

◆ w

int16_t psyqo::Vertex::w

◆ x

int16_t psyqo::Vertex::x

◆ y

int16_t psyqo::Vertex::y

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