MathPlot
Public Member Functions | Public Attributes | List of all members
mpFloatRectSimple Struct Reference

Define a simple rectangular box X refer to X axis Y refer to Y axis. More...

#include <mathplot.h>

Collaboration diagram for mpFloatRectSimple:
Collaboration graph
[legend]

Public Member Functions

 mpFloatRectSimple (mpRange< double > _x, mpRange< double > _y)
 Construct a simple rectangular box. More...
 
bool PointIsInside (double px, double py) const
 Is point inside this bounding box? More...
 
void UpdateBoundingBoxToInclude (double px, double py)
 Update bounding box (X and Y axis) to include this point. More...
 
void InitializeBoundingBox (double px, double py)
 Initialize bounding box with an initial point. More...
 

Public Attributes

mpRange< double > x
 range over x direction
 
mpRange< double > y
 range over y direction
 

Detailed Description

Define a simple rectangular box X refer to X axis Y refer to Y axis.

Constructor & Destructor Documentation

◆ mpFloatRectSimple()

mpFloatRectSimple::mpFloatRectSimple ( mpRange< double >  _x,
mpRange< double >  _y 
)
inline

Construct a simple rectangular box.

Parameters
_xrange over x direction
_yrange over y direction

Member Function Documentation

◆ InitializeBoundingBox()

void mpFloatRectSimple::InitializeBoundingBox ( double  px,
double  py 
)
inline

Initialize bounding box with an initial point.

Parameters
pxpoint on x-axis
pypoint on y-axis

◆ PointIsInside()

bool mpFloatRectSimple::PointIsInside ( double  px,
double  py 
) const
inline

Is point inside this bounding box?

Parameters
pxpoint on x-axis
pypoint on y-axis
Returns
true if point is inside the box

◆ UpdateBoundingBoxToInclude()

void mpFloatRectSimple::UpdateBoundingBoxToInclude ( double  px,
double  py 
)
inline

Update bounding box (X and Y axis) to include this point.

Expand the range to include the point.

Parameters
pxpoint on x-axis
pypoint on y-axis