#include <drake/geometry/proximity/obb.h>
|
template<typename MeshType > |
using | Maker = ObbMaker< MeshType > |
| The class used for various creation operations on this bounding volume. More...
|
|
|
| Obb (const math::RigidTransformd &X_HB, const Vector3< double > &half_width) |
| Constructs an oriented bounding box measured and expressed in frame H. More...
|
|
const Vector3< double > & | center () const |
| Returns the center of the box – equivalent to the position vector from the hierarchy frame's origin Ho to this box's origin Bo: p_HoBo_H . More...
|
|
const Vector3< double > & | half_width () const |
| Returns the half_width – equivalent to the position vector from the box's center Bo to the box's first octant (+,+,+) corner U expressed in the box's frame B: p_BoU_B . More...
|
|
const math::RigidTransformd & | pose () const |
| Returns the pose X_HB of the box frame B in the hierarchy frame H. More...
|
|
double | CalcVolume () const |
|
bool | Equal (const Obb &other) const |
| Compares the values of the two Obb instances for exact equality down to the last bit. More...
|
|
|
| Obb (const Obb &)=default |
|
Obb & | operator= (const Obb &)=default |
|
| Obb (Obb &&)=default |
|
Obb & | operator= (Obb &&)=default |
|
|
static bool | HasOverlap (const Obb &a_G, const Obb &b_H, const math::RigidTransformd &X_GH) |
| Reports whether the two oriented bounding boxes a_G and b_H intersect. More...
|
|
static bool | HasOverlap (const Obb &obb_G, const Aabb &aabb_H, const math::RigidTransformd &X_GH) |
| Reports whether oriented bounding box obb_G intersects the given axis-aligned bounding box aabb_H . More...
|
|
static bool | HasOverlap (const Obb &bv_H, const internal::Plane< double > &plane_P, const math::RigidTransformd &X_PH) |
| (Internal use only) Checks whether bounding volume bv intersects the given plane. More...
|
|
static bool | HasOverlap (const Obb &bv_H, const HalfSpace &hs_C, const math::RigidTransformd &X_CH) |
| Checks whether bounding volume bv intersects the given half space. More...
|
|
◆ Maker
The class used for various creation operations on this bounding volume.
◆ Obb() [1/3]
◆ Obb() [2/3]
◆ Obb() [3/3]
Obb |
( |
const math::RigidTransformd & |
X_HB, |
|
|
const Vector3< double > & |
half_width |
|
) |
| |
Constructs an oriented bounding box measured and expressed in frame H.
- Parameters
-
X_HB | The pose of the box in the hierarchy frame H. The box is centered on Bo and aligned with Bx, By, and Bz. |
half_width | The half measures of the box in each of the Bx, By, and Bz directions. |
- Precondition
- half_width.x(), half_width.y(), half_width.z() are not negative.
◆ CalcVolume()
- Returns
- Volume of the bounding box.
◆ center()
Returns the center of the box – equivalent to the position vector from the hierarchy frame's origin Ho to this
box's origin Bo: p_HoBo_H
.
◆ Equal()
bool Equal |
( |
const Obb & |
other | ) |
const |
Compares the values of the two Obb instances for exact equality down to the last bit.
Assumes that the quantities are measured and expressed in the same frame.
◆ half_width()
Returns the half_width – equivalent to the position vector from the box's center Bo to the box's first octant (+,+,+) corner U expressed in the box's frame B: p_BoU_B
.
◆ HasOverlap() [1/4]
static bool HasOverlap |
( |
const Obb & |
a_G, |
|
|
const Obb & |
b_H, |
|
|
const math::RigidTransformd & |
X_GH |
|
) |
| |
|
static |
Reports whether the two oriented bounding boxes a_G
and b_H
intersect.
The poses of a_G
and b_H
are defined in their corresponding hierarchy frames G and H, respectively.
- Parameters
-
a_G | The first oriented box. |
b_H | The second oriented box. |
X_GH | The relative pose between hierarchy frame G and hierarchy frame H. |
- Returns
true
if the boxes intersect.
◆ HasOverlap() [2/4]
static bool HasOverlap |
( |
const Obb & |
obb_G, |
|
|
const Aabb & |
aabb_H, |
|
|
const math::RigidTransformd & |
X_GH |
|
) |
| |
|
static |
Reports whether oriented bounding box obb_G
intersects the given axis-aligned bounding box aabb_H
.
The poses of obb_G
and aabb_H
are defined in their corresponding hierarchy frames G and H, respectively.
- Parameters
-
obb_G | The oriented box. |
aabb_H | The axis-aligned box. |
X_GH | The relative pose between the obb hierarchy frame G and the aabb hierarchy frame H. |
- Returns
true
if the boxes intersect.
◆ HasOverlap() [3/4]
static bool HasOverlap |
( |
const Obb & |
bv_H, |
|
|
const internal::Plane< double > & |
plane_P, |
|
|
const math::RigidTransformd & |
X_PH |
|
) |
| |
|
static |
(Internal use only) Checks whether bounding volume bv
intersects the given plane.
The bounding volume is centered on its canonical frame B, and B is posed in the corresponding hierarchy frame H. The plane is defined in frame P.
The box and plane intersect if any point within the bounding volume has zero height (see CalcHeight()).
- Parameters
-
bv_H | The bounding box to test. |
plane_P | The plane to test against the bv . The plane is expressed in frame P, therefore, to evaluate the height of a point with respect to it, that point must be measured and expressed in P. |
X_PH | The relative pose between the hierarchy frame H and the plane frame P. |
- Returns
true
if the plane intersects the box.
◆ HasOverlap() [4/4]
static bool HasOverlap |
( |
const Obb & |
bv_H, |
|
|
const HalfSpace & |
hs_C, |
|
|
const math::RigidTransformd & |
X_CH |
|
) |
| |
|
static |
Checks whether bounding volume bv
intersects the given half space.
The bounding volume is centered on its canonical frame B, and B is posed in the corresponding hierarchy frame H. The half space is defined in its canonical frame C (such that the boundary plane of the half space is perpendicular to Cz and Co lies on the boundary plane).
- Parameters
-
bv_H | The bounding box to test. |
hs_C | The half space to test against the bv . The half space is expressed in Frame C, therefore, to evaluate the signed distance of a point with respect to it, that point must be measured and expressed in C. |
X_CH | The relative pose between the hierarchy frame H and the half space canonical frame C. |
- Returns
true
if the half space intersects the box.
◆ operator=() [1/2]
◆ operator=() [2/2]
Obb& operator= |
( |
const Obb & |
| ) |
|
|
default |
◆ pose()
const math::RigidTransformd& pose |
( |
| ) |
const |
Returns the pose X_HB of the box frame B in the hierarchy frame H.
◆ ObbTester
The documentation for this class was generated from the following file:
- drake/geometry/proximity/obb.h