Simox
2.3.74.0
|
An axis-aligned (bounding-)box, defined by its limits in x-, y- and z- direction. More...
Public Member Functions | |
AxisAlignedBoundingBox () | |
Construct an empty AABB centered at (0, 0, 0) with extents (0, 0, 0). More... | |
AxisAlignedBoundingBox (const Eigen::Vector3f &min, const Eigen::Vector3f &max) | |
Construct an AABB with minimal and maximal values. More... | |
AxisAlignedBoundingBox (const Eigen::Vector2f &limits_x, const Eigen::Vector2f &limits_y, const Eigen::Vector2f &limits_z) | |
Construct an AABB with axis-wise limits. More... | |
AxisAlignedBoundingBox (float x_min, float x_max, float y_min, float y_max, float z_min, float z_max) | |
Construct an AABB with given limits. More... | |
AxisAlignedBoundingBox (const Eigen::Matrix32f &limits) | |
Construct an AABB with limits in a 3x2 matrix. More... | |
Eigen::Matrix32f | limits () const |
Eigen::Matrix32f & | limits () |
void | set_limits (const Eigen::Matrix32f &value) |
Eigen::Vector3f | min () const |
Eigen::Matrix32f::ColXpr | min () |
void | set_min (const Eigen::Vector3f &value) |
Eigen::Vector3f | max () const |
Eigen::Matrix32f::ColXpr | max () |
void | set_max (const Eigen::Vector3f &value) |
Eigen::Vector3f | center () const |
void | set_center (const Eigen::Vector3f &value) |
Eigen::Vector3f | extents () const |
void | set_extents (const Eigen::Vector3f &value) |
Eigen::Vector2f | limits_x () const |
Eigen::Matrix32f::RowXpr | limits_x () |
void | set_limits_x (const Eigen::Vector2f &value) |
Eigen::Vector2f | limits_y () const |
Eigen::Matrix32f::RowXpr | limits_y () |
void | set_limits_y (const Eigen::Vector2f &value) |
Eigen::Vector2f | limits_z () const |
Eigen::Matrix32f::RowXpr | limits_z () |
void | set_limits_z (const Eigen::Vector2f &value) |
float | min_x () const |
float & | min_x () |
void | set_min_x (float value) |
float | max_x () const |
float & | max_x () |
void | set_max_x (float value) |
float | min_y () const |
float & | min_y () |
void | set_min_y (float value) |
float | max_y () const |
float & | max_y () |
void | set_max_y (float value) |
float | min_z () const |
float & | min_z () |
void | set_min_z (float value) |
float | max_z () const |
float & | max_z () |
void | set_max_z (float value) |
bool | empty (float prec=Eigen::NumTraits< float >::dummy_precision()) const |
Indicate whether this AABB is empty (i.e. has zero extents). More... | |
float | central_distance (const AxisAlignedBoundingBox &other) const |
Return the distance between center of *this and other 's center. More... | |
float | central_squared_distance (const AxisAlignedBoundingBox &other) const |
Return the squared distance between *this center and other 's center. More... | |
bool | is_colliding (const AxisAlignedBoundingBox &other) const |
Checks whether *this is colliding (i.e. overlapping) with other . More... | |
template<class PointT > | |
bool | is_inside (const PointT &p) const |
Indicates whether point is inside *this . More... | |
template<class PointT > | |
void | expand_to (const PointT &point) |
Expand *this (in-place) to include point . Note that *this should be suitable initialized beforehand. More... | |
void | expand_to (const Eigen::Vector3f &point) |
template<class PointT > | |
void | expanded_to (const PointT &point) const |
Return this AABB expanded to include point . Note that *this should be suitable initialized beforehand. More... | |
AxisAlignedBoundingBox | expanded_to (const Eigen::Vector3f &point) const |
Static Public Member Functions | |
static AxisAlignedBoundingBox | from_points (const std::vector< Eigen::Vector3f > &points) |
Compute the AABB of the given points. More... | |
template<class PointT > | |
static AxisAlignedBoundingBox | from_points (const std::vector< PointT > &points) |
Compute the AABB of the given points. PointT must have x, y, z member variables. More... | |
An axis-aligned (bounding-)box, defined by its limits in x-, y- and z- direction.
simox::AxisAlignedBoundingBox::AxisAlignedBoundingBox | ( | ) |
Construct an empty AABB centered at (0, 0, 0) with extents (0, 0, 0).
simox::AxisAlignedBoundingBox::AxisAlignedBoundingBox | ( | const Eigen::Vector3f & | min, |
const Eigen::Vector3f & | max | ||
) |
Construct an AABB with minimal and maximal values.
simox::AxisAlignedBoundingBox::AxisAlignedBoundingBox | ( | const Eigen::Vector2f & | limits_x, |
const Eigen::Vector2f & | limits_y, | ||
const Eigen::Vector2f & | limits_z | ||
) |
Construct an AABB with axis-wise limits.
simox::AxisAlignedBoundingBox::AxisAlignedBoundingBox | ( | float | x_min, |
float | x_max, | ||
float | y_min, | ||
float | y_max, | ||
float | z_min, | ||
float | z_max | ||
) |
Construct an AABB with given limits.
simox::AxisAlignedBoundingBox::AxisAlignedBoundingBox | ( | const Eigen::Matrix32f & | limits | ) |
Construct an AABB with limits in a 3x2 matrix.
Eigen::Vector3f simox::AxisAlignedBoundingBox::center | ( | ) | const |
float simox::AxisAlignedBoundingBox::central_distance | ( | const AxisAlignedBoundingBox & | other | ) | const |
Return the distance between center of *this
and other
's center.
float simox::AxisAlignedBoundingBox::central_squared_distance | ( | const AxisAlignedBoundingBox & | other | ) | const |
Return the squared distance between *this
center and other
's center.
bool simox::AxisAlignedBoundingBox::empty | ( | float | prec = Eigen::NumTraits<float>::dummy_precision() | ) | const |
Indicate whether this AABB is empty (i.e. has zero extents).
|
inline |
Expand *this
(in-place) to include point
. Note that *this
should be suitable initialized beforehand.
void simox::AxisAlignedBoundingBox::expand_to | ( | const Eigen::Vector3f & | point | ) |
|
inline |
Return this AABB expanded to include point
. Note that *this
should be suitable initialized beforehand.
AxisAlignedBoundingBox simox::AxisAlignedBoundingBox::expanded_to | ( | const Eigen::Vector3f & | point | ) | const |
Eigen::Vector3f simox::AxisAlignedBoundingBox::extents | ( | ) | const |
|
static |
Compute the AABB of the given points.
<tt>simox::error::SimoxError</tt> | If points is empty. |
|
static |
Compute the AABB of the given points. PointT
must have x, y, z member variables.
<tt>simox::error::SimoxError</tt> | If points is empty. |
bool simox::AxisAlignedBoundingBox::is_colliding | ( | const AxisAlignedBoundingBox & | other | ) | const |
Checks whether *this
is colliding (i.e. overlapping) with other
.
bool simox::AxisAlignedBoundingBox::is_inside | ( | const PointT & | p | ) | const |
Indicates whether point
is inside *this
.
Eigen::Matrix32f simox::AxisAlignedBoundingBox::limits | ( | ) | const |
Eigen::Matrix32f & simox::AxisAlignedBoundingBox::limits | ( | ) |
Eigen::Vector2f simox::AxisAlignedBoundingBox::limits_x | ( | ) | const |
Eigen::Matrix32f::RowXpr simox::AxisAlignedBoundingBox::limits_x | ( | ) |
Eigen::Vector2f simox::AxisAlignedBoundingBox::limits_y | ( | ) | const |
Eigen::Matrix32f::RowXpr simox::AxisAlignedBoundingBox::limits_y | ( | ) |
Eigen::Vector2f simox::AxisAlignedBoundingBox::limits_z | ( | ) | const |
Eigen::Matrix32f::RowXpr simox::AxisAlignedBoundingBox::limits_z | ( | ) |
Eigen::Vector3f simox::AxisAlignedBoundingBox::max | ( | ) | const |
Eigen::Matrix32f::ColXpr simox::AxisAlignedBoundingBox::max | ( | ) |
float simox::AxisAlignedBoundingBox::max_x | ( | ) | const |
float & simox::AxisAlignedBoundingBox::max_x | ( | ) |
float simox::AxisAlignedBoundingBox::max_y | ( | ) | const |
float & simox::AxisAlignedBoundingBox::max_y | ( | ) |
float simox::AxisAlignedBoundingBox::max_z | ( | ) | const |
float & simox::AxisAlignedBoundingBox::max_z | ( | ) |
Eigen::Vector3f simox::AxisAlignedBoundingBox::min | ( | ) | const |
Eigen::Matrix32f::ColXpr simox::AxisAlignedBoundingBox::min | ( | ) |
float simox::AxisAlignedBoundingBox::min_x | ( | ) | const |
float & simox::AxisAlignedBoundingBox::min_x | ( | ) |
float simox::AxisAlignedBoundingBox::min_y | ( | ) | const |
float & simox::AxisAlignedBoundingBox::min_y | ( | ) |
float simox::AxisAlignedBoundingBox::min_z | ( | ) | const |
float & simox::AxisAlignedBoundingBox::min_z | ( | ) |
void simox::AxisAlignedBoundingBox::set_center | ( | const Eigen::Vector3f & | value | ) |
void simox::AxisAlignedBoundingBox::set_extents | ( | const Eigen::Vector3f & | value | ) |
void simox::AxisAlignedBoundingBox::set_limits | ( | const Eigen::Matrix32f & | value | ) |
void simox::AxisAlignedBoundingBox::set_limits_x | ( | const Eigen::Vector2f & | value | ) |
void simox::AxisAlignedBoundingBox::set_limits_y | ( | const Eigen::Vector2f & | value | ) |
void simox::AxisAlignedBoundingBox::set_limits_z | ( | const Eigen::Vector2f & | value | ) |
void simox::AxisAlignedBoundingBox::set_max | ( | const Eigen::Vector3f & | value | ) |
void simox::AxisAlignedBoundingBox::set_max_x | ( | float | value | ) |
void simox::AxisAlignedBoundingBox::set_max_y | ( | float | value | ) |
void simox::AxisAlignedBoundingBox::set_max_z | ( | float | value | ) |
void simox::AxisAlignedBoundingBox::set_min | ( | const Eigen::Vector3f & | value | ) |
void simox::AxisAlignedBoundingBox::set_min_x | ( | float | value | ) |
void simox::AxisAlignedBoundingBox::set_min_y | ( | float | value | ) |
void simox::AxisAlignedBoundingBox::set_min_z | ( | float | value | ) |