vtdata library
Public Member Functions | Public Attributes | List of all members
FRECT Class Reference

Public Member Functions

 FRECT (float l, float t, float r, float b)
 
void SetRect (float l, float t, float r, float b)
 
float Width () const
 
float Height () const
 
bool IsEmpty () const
 
void SetToZero ()
 
void Sort ()
 
bool ContainsPoint (float x, float y) const
 
void Center (FPoint2 &center) const
 
FPoint2 Center () const
 
void operator+= (const FPoint2 &delta)
 

Public Attributes

float left
 
float top
 
float right
 
float bottom
 

Detailed Description

DRECT / FRECT

These rectangle classes are meant to be used for geographical areas, or texture coordinates, which assume that the vertical axis increases upward, not like typical screen coordinates which increase downwards.

This means that the Height() method returns top-bottom, not bottom-top as would be the case with downward-increasing coordinates.