Class Halfspace
Defined in File geometric_shapes.h
Inheritance Relationships
Base Type
public coal::ShapeBase
(Class ShapeBase)
Class Documentation
-
class Halfspace : public coal::ShapeBase
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the direction of the normal. The separation plane is defined as n * x = d; Points in the negative side of the separation plane (i.e. {x | n * x < d}) are inside the half space and points in the positive side of the separation plane (i.e. {x | n * x > d}) are outside the half space. Note: prefer using a Halfspace instead of a Plane if possible, it has better behavior w.r.t. collision detection algorithms.
Public Functions
-
inline Halfspace(const Vec3s &n_, CoalScalar d_)
Construct a half space with normal direction and offset.
-
inline Halfspace(CoalScalar a, CoalScalar b, CoalScalar c, CoalScalar d_)
Construct a plane with normal direction and offset.
-
inline Halfspace()
-
inline CoalScalar signedDistance(const Vec3s &p) const
-
inline CoalScalar distance(const Vec3s &p) const
-
inline CoalScalar minInflationValue() const
-
inline std::pair<Halfspace, Transform3s> inflated(const CoalScalar value) const
Inflate the halfspace by an amount given by
value
. This value can be positive or negative but must always >=minInflationValue()
.- Parameters:
value – [in] of the shape inflation.
- Returns:
a new inflated halfspace and the related transform to account for the change of shape frame
Protected Functions
-
void unitNormalTest()
Turn non-unit normal into unit.
-
inline Halfspace(const Vec3s &n_, CoalScalar d_)