123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #ifndef __SCREENRECT_H__
- #define __SCREENRECT_H__
- class idScreenRect {
- public:
-
- short x1;
- short y1;
- short x2;
- short y2;
-
- float zmin;
- float zmax;
-
- void Clear();
- bool IsEmpty() const;
- short GetWidth() const { return x2 - x1 + 1; }
- short GetHeight() const { return y2 - y1 + 1; }
- int GetArea() const { return ( x2 - x1 + 1 ) * ( y2 - y1 + 1 ); }
-
- void Expand();
-
- void AddPoint( float x, float y );
- void Intersect( const idScreenRect &rect );
- void Union( const idScreenRect &rect );
- bool Equals( const idScreenRect &rect ) const;
- };
- void R_ShowColoredScreenRect( const idScreenRect &rect, int colorIndex );
- #endif
|