library of assembled shared sources |
http://lass.cocamware.com |
#include <min_max_policy.h>
Static Public Member Functions | ||||
template<typename PointType > | ||||
static void | setMin (PointType &oMin, const PointType &iMax, const PointType &iMin) | |||
set value oMin to iMin
| ||||
template<typename PointType > | ||||
static void | setMax (const PointType &iMin, PointType &oMax, const PointType &iMax) | |||
set value oMax to iMax
| ||||
template<typename PointType > | ||||
static void | checkMinMax (const PointType &iMin, const PointType &iMax) | |||
check if iMin and iMax are valid minima and maxima. |
Aabb3D<int, StrictMinMax> aabb(Point3D<int>(1, 2, 3), Point3D<int>(4, 5, 6)); aabb.min() = Point3D<int>(5, 5, 5);
The above example will throw an exception. The first line is correct, it constructs an AABB of which the maximum is indeed larger than the minimum. It's in the second line. Here, we try to adjust the minimum of the AABB by setting it to 3D point (5, 5, 5). The z coordinate is no problem: 5 is indeed less that 6. The y coordinate isn't a problem either: 5 is not greater than 5. It's the x coordinate that causes the trouble: 5 is greater than 4. Bang! an exception is thrown.
The rest of the class are implementation details for the AABB and should not be called by the client (you :). In short we can say of this policy: make sure that minima are minima and maxima maxima.
Definition at line 118 of file min_max_policy.h.
static void lass::prim::StrictMinMax::setMin | ( | PointType & | oMin, | |
const PointType & | iMax, | |||
const PointType & | iMin | |||
) | [inline, static] |
set value oMin to iMin
throw | error if iMin it is in conflict with iMax. |
Definition at line 124 of file min_max_policy.h.
References LASS_THROW_EX, and lass::prim::pointwiseMin().
static void lass::prim::StrictMinMax::setMax | ( | const PointType & | iMin, | |
PointType & | oMax, | |||
const PointType & | iMax | |||
) | [inline, static] |
set value oMax to iMax
throw | error if iMax it is in conflict with iMin. |
Definition at line 138 of file min_max_policy.h.
References LASS_THROW_EX, and lass::prim::pointwiseMin().
static void lass::prim::StrictMinMax::checkMinMax | ( | const PointType & | iMin, | |
const PointType & | iMax | |||
) | [inline, static] |
check if iMin and iMax are valid minima and maxima.
throw | error if iMin and iMax are inconsistent. |
Definition at line 152 of file min_max_policy.h.
References LASS_THROW_EX, and lass::prim::pointwiseMin().
Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by 1.5.7.1 |