27 #ifndef GLVIEWER_GEOM_H 
   28 #define GLVIEWER_GEOM_H 
   37 #pragma warning( disable:4251 ) 
   48   GLViewer_Pnt( GLfloat theX, GLfloat theY ) : myX( theX ), myY( theY ) {}
 
   50   GLfloat 
x()
 const { 
return myX; }
 
   51   GLfloat 
y()
 const { 
return myY; }
 
   52   void    setX( GLfloat theX ) { myX = theX; }
 
   53   void    setY( GLfloat theY ) { myY = theY; }
 
   54   void    setXY( GLfloat theX, GLfloat theY ) { myX = theX; myY = theY; }
 
   55   void    move( GLfloat theDX, GLfloat theDY ) { myX += theDX; myY += theDY; }
 
   72   GLViewer_Rect( 
float theLeft, 
float theRight, 
float theTop, 
float theBottom )
 
   73     : myLeft(theLeft), myRight(theRight), myTop(theTop), myBottom(theBottom) {}
 
   75     myLeft = ( float )theRect.left(); myRight = ( float )theRect.right();
 
   76     myTop = ( float )theRect.top(); myBottom = ( float )theRect.bottom(); }
 
   78   float       left()
 const { 
return myLeft; }
 
   79   float       right()
 const { 
return myRight; }
 
   80   float       top()
 const { 
return myTop; }
 
   81   float       bottom()
 const { 
return myBottom; }
 
   83   float       width()
 const { 
return fabs( myRight - myLeft ); }
 
   84   float       height()
 const { 
return fabs( myTop - myBottom ); }
 
   86   void        setLeft( 
float theLeft ) { myLeft = theLeft; }
 
   87   void        setRight( 
float theRight ) { myRight = theRight; }
 
   88   void        setTop( 
float theTop ) { myTop = theTop; }
 
   89   void        setBottom( 
float theBottom ) { myBottom = theBottom; }
 
   91   void        setCoords( 
float theLeft, 
float theRight, 
float theBottom, 
float theTop )
 
   92   { myLeft = theLeft; myRight = theRight; myBottom = theBottom; myTop = theTop; }
 
   95   QRect       
toQRect() { 
return QRect( ( 
int )myLeft, ( 
int )myBottom,
 
   96                                         ( 
int )( myRight - myLeft ),
 
   97                                         ( 
int )( myTop - myBottom ) ); }
 
  105   bool        isNull()
 const { 
return myLeft == 0.0 && myRight == 0.0 && myBottom == 0.0 && myTop == 0.0; }
 
  107   bool        isValid()
 const { 
return ( myLeft < myRight && myBottom < myTop ); }
 
  112                                                       pnt.
y() > bottom() &&
 
  115   void        move( 
const float x, 
const float y )
 
  148                     const GLfloat theC );
 
  176   int               Count()
 const { 
return myPoints->count(); }
 
  195 #pragma warning ( default:4251 )