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

A flat-colored quad. More...

#include <psyqo/primitives/quads.hh>

Collaboration diagram for psyqo::Prim::Quad:
Collaboration graph
[legend]

Public Member Functions

 Quad ()
 
 Quad (Color c)
 
 Quad (const Quad &other, Color c)
 
QuadsetColor (Color c)
 
Color getColor () const
 
QuadsetOpaque ()
 
QuadsetSemiTrans ()
 
bool isSemiTrans () const
 
QuadsetPointA (Vertex v)
 
QuadsetPointB (Vertex v)
 
QuadsetPointC (Vertex v)
 
QuadsetPointD (Vertex v)
 

Public Attributes

Vertex pointA
 
Vertex pointB
 
Vertex pointC
 
Vertex pointD
 

Detailed Description

A flat-colored quad.

This primitive will draw a flat-colored quad. It will be drawn between the pointA, pointB, pointC, and pointD vertices. Note that the ordering of the vertices matters for proper rendering, and it is not intuitive. The quad will be drawn using two triangles: the first triangle will be drawn with the pointA, pointB, and pointC vertices, and the second triangle will be drawn with the pointB, pointC, and pointD vertices. This means that the vertices of the quad need to be sent in a Z pattern to be drawn properly. Failure to do so will result in a weird looking 5-edged polygon resembling a M envelope, which is not what you want.

Constructor & Destructor Documentation

◆ Quad() [1/3]

psyqo::Prim::Quad::Quad ( )
inline

◆ Quad() [2/3]

psyqo::Prim::Quad::Quad ( Color  c)
inline

◆ Quad() [3/3]

psyqo::Prim::Quad::Quad ( const Quad other,
Color  c 
)
inline

Member Function Documentation

◆ getColor()

Color psyqo::Prim::Quad::getColor ( ) const
inline

◆ isSemiTrans()

bool psyqo::Prim::Quad::isSemiTrans ( ) const
inline

◆ setColor()

Quad & psyqo::Prim::Quad::setColor ( Color  c)
inline

◆ setOpaque()

Quad & psyqo::Prim::Quad::setOpaque ( )
inline

◆ setPointA()

Quad & psyqo::Prim::Quad::setPointA ( Vertex  v)
inline

◆ setPointB()

Quad & psyqo::Prim::Quad::setPointB ( Vertex  v)
inline

◆ setPointC()

Quad & psyqo::Prim::Quad::setPointC ( Vertex  v)
inline

◆ setPointD()

Quad & psyqo::Prim::Quad::setPointD ( Vertex  v)
inline

◆ setSemiTrans()

Quad & psyqo::Prim::Quad::setSemiTrans ( )
inline

Member Data Documentation

◆ pointA

Vertex psyqo::Prim::Quad::pointA

◆ pointB

Vertex psyqo::Prim::Quad::pointB

◆ pointC

Vertex psyqo::Prim::Quad::pointC

◆ pointD

Vertex psyqo::Prim::Quad::pointD

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