Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
HalfSpace Class Referencefinal

Detailed Description

Definition of a half space.

In its canonical frame, the plane defining the boundary of the half space is that frame's z = 0 plane. By implication, the plane's normal points in the +z direction and the origin lies on the plane. Other shapes are considered to be penetrating the half space if there exists a point on the test shape that lies on the side of the plane opposite the normal.

#include <drake/geometry/shape_specification.h>

Public Member Functions

 HalfSpace ()
 ~HalfSpace () final
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 HalfSpace (const HalfSpace &)=default
HalfSpaceoperator= (const HalfSpace &)=default
 HalfSpace (HalfSpace &&)=default
HalfSpaceoperator= (HalfSpace &&)=default
Public Member Functions inherited from Shape
virtual ~Shape ()
void Reify (ShapeReifier *reifier, void *user_data=nullptr) const
 Causes this description to be reified in the given reifier.
std::unique_ptr< ShapeClone () const
 Creates a unique copy of this shape.
std::string_view type_name () const
 Returns the (unqualified) type name of this Shape, e.g., "Box".
std::string to_string () const
 Returns a string representation of this shape.
template<typename ReturnType = void, typename Visitor>
decltype(auto) Visit (Visitor &&visitor) const
 Calls the given visitor function with *this as the sole argument, but with *this downcast to be the shape's concrete subclass.

Static Public Member Functions

static math::RigidTransform< doubleMakePose (const Vector3< double > &Hz_dir_F, const Vector3< double > &p_FB)
 Creates the pose of a canonical half space in frame F.

Additional Inherited Members

Protected Types inherited from Shape
using VariantShapeConstPtr
 (Internal use only) All concrete subclasses, as const pointers.
Protected Member Functions inherited from Shape
 Shape ()
 (Internal use only) Constructor for use by derived classes.
 Shape (const Shape &)=default
 (Internal use only) For derived classes.
Shapeoperator= (const Shape &)=default
 (Internal use only) For derived classes.
 Shape (Shape &&)=default
 (Internal use only) For derived classes.
Shapeoperator= (Shape &&)=default
 (Internal use only) For derived classes.

Constructor & Destructor Documentation

◆ HalfSpace() [1/3]

HalfSpace ( const HalfSpace & )
default

◆ HalfSpace() [2/3]

HalfSpace ( HalfSpace && )
default

◆ HalfSpace() [3/3]

HalfSpace ( )

◆ ~HalfSpace()

~HalfSpace ( )
final

Member Function Documentation

◆ MakePose()

math::RigidTransform< double > MakePose ( const Vector3< double > & Hz_dir_F,
const Vector3< double > & p_FB )
static

Creates the pose of a canonical half space in frame F.

The half space's normal is aligned to the positive z-axis of its canonical frame H. Given a vector that points in the same direction, measured in the F frame (Hz_dir_F) and a position vector to a point on the half space's boundary* expressed in the same frame, p_FB, creates the pose of the half space in frame F: X_FH.

Parameters
Hz_dir_FA vector in the direction of the positive z-axis of the canonical frame expressed in frame F. It must be a non-zero vector but need not be unit length.
p_FBA point B lying on the half space's boundary measured and expressed in frame F.
Return values
X_FHThe pose of the canonical half-space in frame F.
Exceptions
std::exceptionif the normal is close to a zero-vector (e.g., ‖normal_F‖₂ < ε).

◆ operator=() [1/2]

HalfSpace & operator= ( const HalfSpace & )
default

◆ operator=() [2/2]

HalfSpace & operator= ( HalfSpace && )
default

The documentation for this class was generated from the following file: