Class Plane

Inheritance Relationships

Base Type

Class Documentation

class Plane : public coal::ShapeBase

Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction. Note: prefer using a Halfspace instead of a Plane if possible, it has better behavior w.r.t. collision detection algorithms.

Public Functions

inline Plane(const Vec3s &n_, CoalScalar d_)

Construct a plane with normal direction and offset.

inline Plane(CoalScalar a, CoalScalar b, CoalScalar c, CoalScalar d_)

Construct a plane with normal direction and offset.

inline Plane()
inline Plane(const Plane &other)
inline Plane &operator=(const Plane &other)

operator =

inline virtual Plane *clone() const

Clone *this into a new Plane.

inline CoalScalar signedDistance(const Vec3s &p) const
inline CoalScalar distance(const Vec3s &p) const
virtual void computeLocalAABB()

Compute AABB.

inline virtual NODE_TYPE getNodeType() const

Get node type: a plane.

Public Members

Vec3s n

Plane normal.

CoalScalar d

Plane offset.

Protected Functions

void unitNormalTest()

Turn non-unit normal into unit.