The definition of a plane in ℜ³, posed in an arbitrary frame.
The plane normal implicitly defines "above" and "below" directions relative to the plane. The "height" of a point relative to the plane can be queried.
It is defined with the implicit equation: P(x⃗ = n̂⋅x⃗- d = 0. A particular instance is measured and expressed in a particular frame, such that only points measured and expressed in that same frame can be meaningfully compared to the plane. E.g.,
#include <drake/geometry/proximity/plane.h>
Public Member Functions | |
| Plane (const Vector3< T > &normal, const Vector3< T > &point_on_plane, bool already_normalized=false) | |
| Constructs a Plane in frame F which is normal to normal and passes through the point point_on_plane. | |
| template<typename U = T> | |
| promoted_numerical_t< U, T > | CalcHeight (const Vector3< U > &point) const |
| Computes the height of Point Q relative to the plane. | |
| const Vector3< T > & | unit_normal () const |
| Gets the plane's unit normal expressed in frame F. | |
| const Vector3< T > | reference_point () const |
| Returns a point on the plane, measured and expressed in frame F. | |
| bool | BoxOverlaps (const Eigen::Vector3d &half_width, const Eigen::Vector3d &box_center_in_plane, const math::RotationMatrixd &box_orientation_in_plane) const |
| Reports if the given box intersects this plane. | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| Plane (const Plane &)=default | |
| Plane & | operator= (const Plane &)=default |
| Plane (Plane &&)=default | |
| Plane & | operator= (Plane &&)=default |
|
default |
|
default |
| Plane | ( | const Vector3< T > & | normal, |
| const Vector3< T > & | point_on_plane, | ||
| bool | already_normalized = false ) |
Constructs a Plane in frame F which is normal to normal and passes through the point point_on_plane.
| normal | A (possibly unit-length) vector perpendicular to the plane expressed in Frame F (the n̂ in the implicit equation). By default, the vector will be normalized before being stored (see below), becoming the nhat_F documented above. |
| point_on_plane | A point on the plane measured and expressed in Frame F, p_FP. The d in the implicit equation is derived from this quantity. |
| already_normalized | (Advanced) If true, the normal will be treated as if it has already been normalized by the caller. It should still essentially have unit length. This function reserves the right to validate this property in debug build up to an arbitrary tolerance. When in doubt, allow the plane to normalize the normal vector. |
| bool BoxOverlaps | ( | const Eigen::Vector3d & | half_width, |
| const Eigen::Vector3d & | box_center_in_plane, | ||
| const math::RotationMatrixd & | box_orientation_in_plane ) const |
Reports if the given box intersects this plane.
The plane is specified in a frame P (the plane normal is not necessarily aligned with Pz). The box is specified in generic terms. It is an box whose axes are aligned to frame B, centered on Bo, and posed in the plane's frame P.
| half_width | The half-width extents of the box along its local axes. |
| box_center_in_plane | The center of the box measured and expressed in the plane's frame: p_PBo. |
| box_orientation_in_plane | The orientation of the box expressed in the plane's frame. The ith column goes with the ith half width: R_PB. |
| promoted_numerical_t< U, T > CalcHeight | ( | const Vector3< U > & | point | ) | const |
Computes the height of Point Q relative to the plane.
A positive height indicates the point lies above the plane; negative height indicates below. The point must be measured and expressed in the same frame as the plane.
The return type depends on both the plane's scalar type T and the given query point's scalar type U. See promoted_numerical_t for details.
| point | The quantity p_FQ (query point Q measured and expressed in the plane's frame F). |
| const Vector3< T > reference_point | ( | ) | const |
Returns a point on the plane, measured and expressed in frame F.
This is not necessarily the same point used to construct the plane.
| const Vector3< T > & unit_normal | ( | ) | const |
Gets the plane's unit normal expressed in frame F.