#include <RTree.h>
Public Member Functions | |
void | combineRect (const Rect &r) |
enlarge this rectangle to encompass Rect r. | |
void | combineRects (const Rect &a, const Rect &b) |
set this rectangle to the minimum rectangle enclosing both a and b. | |
bool | containsRect (const Rect &r) const |
checks if the other rectangle is contained within this one | |
AreaType | getArea () const |
calculate the enclosed area | |
Point | getCenter () const |
returns the center point of the rectangle | |
AreaType | getIntersectingArea (const Rect &a) const |
calculate the intersecting area of this rectangle with a. | |
AreaType | getMargin () const |
calculate the margin of the rectangle, i.e. the 2*sum of both sides | |
void | intersectRect (const Rect &a) |
intersect this rectangle with a. | |
void | intersectRects (const Rect &a, const Rect &b) |
set this rectangle to the minimum rectangle contained by both a and b. | |
bool | intersectsRect (const Rect &r) const |
checks if the other rectangle intersects this one. | |
bool | operator== (const Rect &o) const |
equality comparison operator | |
Rect (CoordType _x1, CoordType _y1, CoordType _x2, CoordType _y2) | |
initializing constructor | |
Rect () | |
noop constructor | |
void | setInfinite () |
sets the coordinates to the minimum and maximum of the data range, thus creating an invalid rect on which to start combining others. | |
bool | touchesRect (const Rect &r) const |
checks if the other rectangle touches this one. means if it shares a border. | |
bool | valid () const |
check that it is a valid rectangle | |
Public Attributes | |
CoordType | x1 |
CoordType | x2 |
CoordType | y1 |
CoordType | y2 |
Definition at line 122 of file RTree.h.
void VGServer::RTree::Rect::combineRect | ( | const Rect & | r | ) | [inline] |
enlarge this rectangle to encompass Rect r.
Definition at line 160 of file RTree.h.
References x1, x2, y1, and y2.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::adjustTree(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNode(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroups(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroupsRStar().
set this rectangle to the minimum rectangle enclosing both a and b.
Definition at line 169 of file RTree.h.
References x1, x2, y1, and y2.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::findLeastEnlargement(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::findLeastOverlap(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::insertChild(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsQuadratic(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroups().
bool VGServer::RTree::Rect::containsRect | ( | const Rect & | r | ) | const [inline] |
AreaType VGServer::RTree::Rect::getArea | ( | ) | const [inline] |
calculate the enclosed area
Definition at line 196 of file RTree.h.
References x1, x2, y1, and y2.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::findLeastEnlargement(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::findLeastOverlap(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsQuadratic(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroups(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroupsRStar(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::writeFig().
Point VGServer::RTree::Rect::getCenter | ( | ) | const [inline] |
calculate the intersecting area of this rectangle with a.
Definition at line 202 of file RTree.h.
References x1, x2, y1, and y2.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::findLeastOverlap(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroupsRStar().
AreaType VGServer::RTree::Rect::getMargin | ( | ) | const [inline] |
void VGServer::RTree::Rect::intersectRect | ( | const Rect & | a | ) | [inline] |
bool VGServer::RTree::Rect::intersectsRect | ( | const Rect & | r | ) | const [inline] |
bool VGServer::RTree::Rect::operator== | ( | const Rect & | o | ) | const [inline] |
void VGServer::RTree::Rect::setInfinite | ( | ) | [inline] |
sets the coordinates to the minimum and maximum of the data range, thus creating an invalid rect on which to start combining others.
Definition at line 153 of file RTree.h.
References x1, x2, y1, and y2.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::adjustTreeReinsert(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::adjustTreeSplit(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::calcStats(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::calcWasteArea(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::NodeHead::initializeRoot(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::NodeHead::initializeSibling(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::splitNodeMakeGroupsRStar().
bool VGServer::RTree::Rect::touchesRect | ( | const Rect & | r | ) | const [inline] |
bool VGServer::RTree::Rect::valid | ( | ) | const [inline] |
Definition at line 125 of file RTree.h.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< _NodeData >::SplitDist::cmp_axis1_lower(), combineRect(), combineRects(), containsRect(), getArea(), getCenter(), getIntersectingArea(), getMargin(), intersectRect(), intersectRects(), intersectsRect(), operator==(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsLinear(), Rect(), setInfinite(), touchesRect(), valid(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::writeFig(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::writeFig().
Definition at line 125 of file RTree.h.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< _NodeData >::SplitDist::cmp_axis1_upper(), combineRect(), combineRects(), containsRect(), getArea(), getCenter(), getIntersectingArea(), getMargin(), intersectRect(), intersectRects(), operator==(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsLinear(), Rect(), setInfinite(), touchesRect(), valid(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::writeFig(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::writeFig().
Definition at line 125 of file RTree.h.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< _NodeData >::SplitDist::cmp_axis2_lower(), combineRect(), combineRects(), containsRect(), getArea(), getCenter(), getIntersectingArea(), getMargin(), intersectRect(), intersectRects(), intersectsRect(), operator==(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsLinear(), Rect(), setInfinite(), touchesRect(), valid(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::writeFig(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::writeFig().
Definition at line 125 of file RTree.h.
Referenced by VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< _NodeData >::SplitDist::cmp_axis2_upper(), combineRect(), combineRects(), containsRect(), getArea(), getCenter(), getIntersectingArea(), getMargin(), intersectRect(), intersectRects(), operator==(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::pickSeedsLinear(), Rect(), setInfinite(), touchesRect(), valid(), VGServer::RTree::Tree< _DataType, _DataTypeCallback >::writeFig(), and VGServer::RTree::Tree< _DataType, _DataTypeCallback >::Node< VGServer::RTree::Tree::InnerNodeData >::writeFig().