12 #ifndef __WXBOUNDINGBOX_H__
13 #define __WXBOUNDINGBOX_H__
20 #include "wx/geometry.h"
68 void Enlarge(
const double Marge );
71 void EnlargeXY(
const double MargeX,
const double MargeY );
74 void Shrink(
const double Marge );
83 void Expand(
double x,
double y );
97 bool PointInBox(
const a2dPoint2D&,
double Marge = 0 )
const;
100 bool PointInBox(
double x,
double y,
double Marge = 0 )
const;
103 bool PointOnBox(
double x,
double y,
double Marge )
const;
120 double GetWidth()
const;
122 double GetHeight()
const;
125 bool GetValid()
const;
128 void SetValid(
bool );
131 void SetBoundingBox(
const a2dPoint2D& a_point );
134 void SetMin(
double px,
double py );
137 void SetMax(
double px,
double py );
146 double GetMinX()
const;
149 double GetMinY()
const;
152 double GetMaxX()
const;
155 double GetMaxY()
const;
157 inline double GetSize()
162 return wxMax( fabs( m_maxx - m_minx ), fabs( m_maxy - m_miny ) );
169 void SetMinX(
double minx ) { m_minx = minx; }
171 void SetMinY(
double miny ) { m_miny = miny; }
173 void SetMaxX(
double maxx ) { m_maxx = maxx; }
175 void SetMaxY(
double maxy ) { m_maxy = maxy; }
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
void SetMaxY(double maxy)
set the bounding box its maximum Y, does not validate the box
void SetMaxX(double maxx)
set the bounding box its maximum X, does not validate the box
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
a2dBoundingBox wxNonValidBbox
global non valid boundingbox to use as default argument etc.
bool m_validbbox
true if boundingbox is valid
void SetMinY(double miny)
set the bounding box its minimum Y, does not validate the box
double m_maxx
maximum X of bounding box in world coordinates
A 2x3 affine matrix class for 2D transformations.
double m_maxy
maximum Y of bounding box in world coordinates
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
double m_miny
mininum Y of bounding box in world coordinates
void SetMinX(double minx)
set the bounding box its minimum X, does not validate the box
double m_minx
mininum X of bounding box in world coordinates