GClasses
GClasses::GDoubleRect Class Reference

Detailed Description

Represents a rectangular region with doubles.

#include <GRect.h>

Public Member Functions

 GDoubleRect ()
 
 GDoubleRect (double _x, double _y, double _w, double _h)
 
bool doesInclude (double _x, double _y)
 Returns true if the specified point is within this rect. More...
 
void include (double _x, double _y)
 Increases the rect size to include the specified point. More...
 
void makeAspect (double _w, double _h)
 Minimally increases the size of this rect (equally on both sides) in order to obtain the specified aspect ratio. More...
 
void set (double _x, double _y, double _w, double _h)
 Sets all 4 values of this rect. More...
 

Public Attributes

double h
 
double w
 
double x
 
double y
 

Constructor & Destructor Documentation

GClasses::GDoubleRect::GDoubleRect ( )
inline
GClasses::GDoubleRect::GDoubleRect ( double  _x,
double  _y,
double  _w,
double  _h 
)
inline

Member Function Documentation

bool GClasses::GDoubleRect::doesInclude ( double  _x,
double  _y 
)
inline

Returns true if the specified point is within this rect.

void GClasses::GDoubleRect::include ( double  _x,
double  _y 
)
inline

Increases the rect size to include the specified point.

void GClasses::GDoubleRect::makeAspect ( double  _w,
double  _h 
)
inline

Minimally increases the size of this rect (equally on both sides) in order to obtain the specified aspect ratio.

void GClasses::GDoubleRect::set ( double  _x,
double  _y,
double  _w,
double  _h 
)
inline

Sets all 4 values of this rect.

Member Data Documentation

double GClasses::GDoubleRect::h
double GClasses::GDoubleRect::w
double GClasses::GDoubleRect::x
double GClasses::GDoubleRect::y