Class ShapeBase
Defined in File geometric_shapes.h
Inheritance Relationships
Base Type
public coal::CollisionGeometry(Class CollisionGeometry)
Derived Types
public coal::Box(Class Box)public coal::Capsule(Class Capsule)public coal::Cone(Class Cone)public coal::ConvexBase(Class ConvexBase)public coal::Cylinder(Class Cylinder)public coal::Ellipsoid(Class Ellipsoid)public coal::Halfspace(Class Halfspace)public coal::Plane(Class Plane)public coal::Sphere(Class Sphere)public coal::TriangleP(Class TriangleP)public coal::details::LargeConvex(Struct LargeConvex)public coal::details::SmallConvex(Struct SmallConvex)
Class Documentation
-
class ShapeBase : public coal::CollisionGeometry
Base class for all basic geometric shapes.
Subclassed by coal::Box, coal::Capsule, coal::Cone, coal::ConvexBase, coal::Cylinder, coal::Ellipsoid, coal::Halfspace, coal::Plane, coal::Sphere, coal::TriangleP, coal::details::LargeConvex, coal::details::SmallConvex
Public Functions
-
inline ShapeBase()
-
inline virtual ~ShapeBase()
-
inline virtual OBJECT_TYPE getObjectType() const
Get object type: a geometric shape.
-
inline void setSweptSphereRadius(CoalScalar radius)
Set radius of sphere swept around the shape. Must be >= 0.
-
inline CoalScalar getSweptSphereRadius() const
Get radius of sphere swept around the shape. This radius is always >= 0.
Protected Attributes
-
CoalScalar m_swept_sphere_radius = {0}
Radius of the sphere swept around the shape. Default value is 0. Note: this property differs from
inflatedmethod of certain derived classes (e.g. Box, Sphere, Ellipsoid, Capsule, Cone, Cylinder) in the sense that inflated returns a new shape which can be inflated but also deflated. Also, an inflated shape is not rounded. It simply has a different size. Sweeping a shape with a sphere is a different operation (a Minkowski sum), which rounds the sharp corners of a shape. The swept sphere radius is a property of the shape itself and can be manually updated between collision checks.
-
inline ShapeBase()