Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __GELRECT_H__
00017 #define __GELRECT_H__
00018
00019 namespace gel
00020 {
00021 class GelRect
00022 {
00023 public:
00025
00026 GelRect() { left = top = width = height = 0; }
00027
00029
00033 GelRect( int _left, int _top, int _width, int _height );
00034
00036
00040 void set( int _left, int _top, int _width, int _height );
00041
00043
00044 void toOGLview( int view[4] ) const;
00045
00046 GelRect operator=( const GelRect &r ) { left=r.left; top=r.top; width=r.width; height=r.height; return *this; }
00047
00048 bool operator==( const GelRect &r ) const { return ( left==r.left && top==r.top && width==r.width && height==r.height ); }
00049 bool operator!=( const GelRect &r ) const { return ( left!=r.left || top!=r.top || width!=r.width || height!=r.height ); }
00050
00051 public:
00052 int left, top, width, height;
00053 };
00054
00055 class GelRectf
00056 {
00057 public:
00059
00060 GelRectf() { left = top = width = height = 0; }
00061
00063
00067 GelRectf( float _left, float _top, float _width, float _height );
00068
00070
00074 void set( float _left, float _top, float _width, float _height );
00075
00076 GelRectf operator=( const GelRectf &r ) { left=r.left; top=r.top; width=r.width; height=r.height; return *this; }
00077
00078 bool operator==( const GelRectf &r ) const { return ( left==r.left && top==r.top && width==r.width && height==r.height ); }
00079 bool operator!=( const GelRectf &r ) const { return ( left!=r.left || top!=r.top || width!=r.width || height!=r.height ); }
00080
00081 public:
00082 float left, top, width, height;
00083 };
00084 }
00085
00086 #endif // __GELRECT_H__