59 wxASSERT_MSG( bbox->
m_validbbox, wxT(
"invalid bbox" ) );
61 if ( ( (
m_minx - Marge ) > ( bbox->
m_maxx + Marge ) ) ||
68 if ( ( m_minx <= bbox->
m_minx ) &&
71 ( m_miny <= bbox->
m_miny ) )
81 m_minx = wxMax( m_minx, bbox->
m_minx );
83 m_miny = wxMax( m_miny, bbox->
m_miny );
207 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
208 wxASSERT_MSG( other.
m_validbbox, wxT(
"invalid bbox" ) );
211 if ( ( (
m_minx - Marge ) > ( other.
m_maxx + Marge ) ) ||
232 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
235 !( ( ( begin.m_y >
m_maxy ) && ( end.m_y >
m_maxy ) ) ||
245 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
247 if ( x >= (
m_minx - Marge ) && x <= (
m_maxx + Marge ) &&
258 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
266 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
268 if ( x >= (
m_minx - Marge ) && x <= (
m_maxx + Marge ) &&
279 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
286 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
294 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
306 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
312 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
318 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
324 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
330 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
336 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
372 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
383 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
414 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
415 wxASSERT_MSG( other.
m_validbbox, wxT(
"invalid bbox" ) );
423 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
424 wxASSERT_MSG( box.
m_validbbox, wxT(
"invalid bbox" ) );
447 wxASSERT_MSG(
m_validbbox, wxT(
"invalid bbox" ) );
452 double x1, y1, x2, y2, x3, y3, x4, y4;
478 void a2dBoundingBox::Dump()
const
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
double GetHeight() const
returns height of the boundingbox
a2dPoint2D GetCentre() const
get centre
bool PointOnBox(double x, double y, double Marge) const
is the coordinate on the border of the boundingbox
OVERLAP Intersect(const a2dBoundingBox &, double Marge=0) const
void Enlarge(const double Marge)
enlarge with the given amount
a2dPoint2D GetMin() const
get the bounding box its minimum
bool IsIdentity(void) const
Is the matrix the identity matrix?
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
const a2dBoundingBox & operator+=(const a2dBoundingBox &box)
OR box to this.
a2dBoundingBox wxNonValidBbox
global non valid boundingbox to use as default argument etc.
bool m_validbbox
true if boundingbox is valid
bool And(a2dBoundingBox *, double Marge=0)
intersect the boundingbox with another, return true if the result is non zero
void TransformPoint(double x, double y, double &tx, double &ty) const
Transform a point.
a2dPoint2D GetMax() const
get the bounding box its maximum
bool GetValid() const
returns true if boundingbox is calculated properly and therefore its valid flag is set...
void Expand(const a2dPoint2D &, const a2dPoint2D &)
expand boundingbox width two points
const a2dBoundingBox & Translate(a2dPoint2D &)
translate with given vector
double GetMinX() const
get minimum X of the boundingbox
bounding class for optimizing drawing speed.
void Shrink(const double Marge)
shrink with the given amount
a2dBoundingBox()
constructor
void SetMin(double px, double py)
set the bounding box its maximum
bool LineIntersect(const a2dPoint2D &begin, const a2dPoint2D &end) const
double m_maxx
maximum X of bounding box in world coordinates
bool PointInBox(const a2dPoint2D &, double Marge=0) const
is the point within the boundingbox
void SetBoundingBox(const a2dPoint2D &a_point)
set the bounding box to be this point
A 2x3 affine matrix class for 2D transformations.
double GetMaxX() const
get maximum X of the boundingbox
a2dBoundingBox & operator+(a2dBoundingBox &)
And operation on two boxes.
void SetMax(double px, double py)
set the bounding box its minimum
void MapBbox(const a2dAffineMatrix &matrix)
double GetMaxY() const
get maximum Y of the boundingbox
double GetWidth() const
returns width of the boundingbox
double m_maxy
maximum Y of bounding box in world coordinates
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
void EnlargeXY(const double MargeX, const double MargeY)
enlarge with the given amount
double GetMinY() const
get minimum Y of the boundingbox
double m_miny
mininum Y of bounding box in world coordinates
a2dBoundingBox & operator=(const a2dBoundingBox &)
set this boundingbox to another boundingbox
double m_minx
mininum X of bounding box in world coordinates