Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

ps
Class CRect

   in Overlay.h
   in Overlay.cpp

class CRect

Rectangle class used for screen rectangles. It's very similar to the MS CRect, but with FLOATS because it's meant to be used with OpenGL which takes float values. Changed to floats 2004-08-31 /GL


Field Summary
 float bottom
          Dimensions
 float left
          Dimensions
 float right
          Dimensions
 float top
          Dimensions
 
Constructor Summary
CRect( const CPos& pos )
          
CRect( const CSize& size )
          
CRect( const CPos& upperleft, const CPos& bottomright )
          
CRect( const CPos& pos, const CSize& size )
          
CRect( const float& _l, const float& _t, const float& _r, const float& _b )
          
CRect()
          
 
Method Summary
 CPos BottomRight() const
          Get Position equivalent to bottom/right corner
 CPos CenterPoint() const
          Get Position equivalent to the center of the rectangle
 float GetHeight() const
          
 CSize GetSize() const
          Get Size
 float GetWidth() const
          
 bool operator!=( const CRect& a ) const
          
 CRect operator+( const CSize& a ) const
          
 CRect operator+( const CPos& a ) const
          
 CRect operator+( void ) const
          
 CRect operator+( const CRect& a ) const
          
 void operator+=( const CPos& a )
          
 void operator+=( const CRect& a )
          
 void operator+=( const CSize& a )
          
 CRect operator-( const CPos& a ) const
          
 CRect operator-( const CRect& a ) const
          
 CRect operator-( const CSize& a ) const
          
 CRect operator-( void ) const
          
 void operator-=( const CSize& a )
          
 void operator-=( const CRect& a )
          
 void operator-=( const CPos& a )
          
 void operator=( const CRect& a )
          
 bool operator==( const CRect& a ) const
          
 bool PointInside( const CPos& point ) const
          Evalutates if point is within the rectangle
 CRect Scale( float x, float y ) const
          
 CPos TopLeft() const
          Get Position equivalent to top/left corner
 

Field Detail

bottom

public float bottom;
Dimensions

left

public float left;
Dimensions

right

public float right;
Dimensions

top

public float top;
Dimensions


Constructor Detail

CRect

public CRect( const CPos& pos );

CRect

public CRect( const CSize& size );

CRect

public CRect( const CPos& upperleft, const CPos& bottomright );

CRect

public CRect( const CPos& pos, const CSize& size );

CRect

public CRect( const float& _l, const float& _t, const float& _r, const float& _b );

CRect

public CRect();


Method Detail

BottomRight

public CPos BottomRight() const;
Get Position equivalent to bottom/right corner

CenterPoint

public CPos CenterPoint() const;
Get Position equivalent to the center of the rectangle

GetHeight

public float GetHeight() const;
Returns:
Height of Rectangle

GetSize

public CSize GetSize() const;
Get Size

GetWidth

public float GetWidth() const;
Returns:
Width of Rectangle

operator!=

public bool operator!=( const CRect& a ) const;

operator+

public CRect operator+( const CSize& a ) const;

operator+

public CRect operator+( const CPos& a ) const;

operator+

public CRect operator+( void ) const;

operator+

public CRect operator+( const CRect& a ) const;

operator+=

public void operator+=( const CPos& a );

operator+=

public void operator+=( const CRect& a );

operator+=

public void operator+=( const CSize& a );

operator-

public CRect operator-( const CPos& a ) const;

operator-

public CRect operator-( const CRect& a ) const;

operator-

public CRect operator-( const CSize& a ) const;

operator-

public CRect operator-( void ) const;

operator-=

public void operator-=( const CSize& a );

operator-=

public void operator-=( const CRect& a );

operator-=

public void operator-=( const CPos& a );

operator=

public void operator=( const CRect& a );

operator==

public bool operator==( const CRect& a ) const;

PointInside

public bool PointInside( const CPos& point ) const;
Evalutates if point is within the rectangle
Parameters:
point - CPos representing point
Returns:
true if inside.

Scale

public CRect Scale( float x, float y ) const;

TopLeft

public CPos TopLeft() const;
Get Position equivalent to top/left corner

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD