DRECT Class Reference

List of all members.

Public Member Functions

 DRECT (double l, double t, double r, double b)
void SetRect (double l, double t, double r, double b)
double Width () const
double Height () const
bool IsNull () const
bool IsEmpty () const
void Empty ()
void Sort ()
void GetCenter (DPoint2 &p) const
DPoint2 GetCenter () const
bool ContainsPoint (const DPoint2 &p, bool bInclusive=false) const
bool ContainsPoint (const DPoint3 &p) const
bool ContainsLine (const DLine2 &line) const
bool ContainsLine (const DLine3 &line) const
bool ContainsRect (const DRECT &r2) const
bool OverlapsRect (const DRECT &r2) const
void Grow (double x, double y)
void GrowToContainPoint (const DPoint2 &p)
void GrowToContainLine (const DLine2 &line)
void GrowToContainLine (const DLine3 &line)
void GrowToContainRect (const DRECT &r2)
bool operator== (const DRECT &v) const
bool operator!= (const DRECT &v) const

Public Attributes

double left
double top
double right
double 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.


Member Function Documentation

bool DRECT::ContainsLine const DLine2 line  )  const
 

Fast, naive test for polyline/polygon inside rectangle.

Returns:
true if any point of the poly is inside the rectangle.


Generated on Tue Apr 22 10:10:59 2008 for vtdata library by  doxygen 1.4.5