28template <
typename TYPE,
typename TRAITS>
class Range2D
56 Range2D(TYPE x1, TYPE y1, TYPE x2, TYPE y2)
bool overlaps(const BasicRange &rRange) const
bool overlapsMore(const BasicRange &rRange) const
bool isInside(T nValue) const
void intersect(const BasicRange &rRange)
bool equal(const BasicRange &rRange) const
Traits::DifferenceType getRange() const
TYPE getMaxX() const
get upper bound of the set. returns arbitrary values for empty sets.
void grow(TYPE fValue)
grow set by fValue on all sides
bool overlapsMore(const Range2D &rRange) const
yields true if overlaps(rRange) does, and the overlap is larger than infinitesimal
TYPE getWidth() const
return difference between upper and lower X value. returns 0 for empty sets.
bool operator==(const Range2D &rRange) const
TYPE getMinX() const
get lower bound of the set. returns arbitrary values for empty sets.
void expand(const Range2D &rRange)
add rRange to the set, expanding as necessary
bool isInside(const Range2D &rRange) const
yields true if rRange is inside, or equal to set
basegfx::BasicRange< TYPE, TRAITS > maRangeX
TYPE getMinY() const
get lower bound of the set. returns arbitrary values for empty sets.
double getCenterX() const
return center X value of set. returns 0 for empty sets.
void expand(const Tuple2D< TYPE > &rTuple)
add point to the set, expanding as necessary
Range2D(const Tuple2D< TYPE > &rTuple)
Create degenerate interval consisting of a single point.
double getCenterY() const
return center Y value of set. returns 0 for empty sets.
void grow(const Tuple2D< TYPE > &rTuple)
grow set by axis aware values from rTuple
void reset()
reset the object to empty state again, clearing all values
Range2D(const Tuple2D< TYPE > &rTuple1, const Tuple2D< TYPE > &rTuple2)
Create proper interval between the two given points.
TYPE getMaxY() const
get upper bound of the set. returns arbitrary values for empty sets.
void intersect(const Range2D &rRange)
calc set intersection
basegfx::BasicRange< TYPE, TRAITS > maRangeY
bool isInside(const Tuple2D< TYPE > &rTuple) const
yields true if given point is contained in set
Range2D(TYPE x1, TYPE y1, TYPE x2, TYPE y2)
Create proper interval between the two given pairs.
bool isEmpty() const
Check if the interval set is empty.
Tuple2D< TYPE > clamp(const Tuple2D< TYPE > &rTuple) const
clamp value on range
bool equal(const Range2D &rRange) const
TYPE getHeight() const
return difference between upper and lower Y value. returns 0 for empty sets.
bool overlaps(const Range2D &rRange) const
yields true if rRange at least partly inside set
bool operator!=(const Range2D &rRange) const
TYPE getX() const
Get X-Coordinate of 2D Tuple.
TYPE getY() const
Get Y-Coordinate of 2D Tuple.