16 #ifndef SURGSIM_MATH_CAPSULESHAPE_H 17 #define SURGSIM_MATH_CAPSULESHAPE_H 27 SURGSIM_STATIC_REGISTRATION(CapsuleShape);
37 explicit CapsuleShape(
double length = 0.0,
double radius = 0.0);
98 #endif // SURGSIM_MATH_CAPSULESHAPE_H Definition: CompoundShapeToGraphics.cpp:29
int getType() const override
Definition: CapsuleShape.cpp:31
Vector3d topCenter() const
Return the center of the top sphere of the internal cylinder.
Definition: CapsuleShape.cpp:72
Capsule shape: centered on (0, 0, 0), aligned along Y, with length and radius.
Definition: CapsuleShape.h:31
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:68
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: CapsuleShape.cpp:67
Vector3d bottomCenter() const
Return the center of the bottom sphere of the internal cylinder.
Definition: CapsuleShape.cpp:77
double m_length
Capsule length.
Definition: CapsuleShape.h:89
void updateAabb()
Definition: CapsuleShape.cpp:127
void setLength(double length)
Set the capsule length (i.e.
Definition: CapsuleShape.cpp:46
double getRadius() const
Get the capsule radius (i.e.
Definition: CapsuleShape.cpp:41
SURGSIM_CLASSNAME(SurgSim::Math::CapsuleShape)
Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: CapsuleShape.cpp:82
void setRadius(double radius)
Set the capsule radius (i.e.
Definition: CapsuleShape.cpp:52
double getVolume() const override
Get the volume of the shape.
Definition: CapsuleShape.cpp:58
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:69
bool isValid() const override
Definition: CapsuleShape.cpp:122
CapsuleShape(double length=0.0, double radius=0.0)
Constructor.
Definition: CapsuleShape.cpp:24
double m_radius
Capsule radius.
Definition: CapsuleShape.h:92
double getLength() const
Get the capsule length (i.e.
Definition: CapsuleShape.cpp:36
Generic rigid shape class defining a shape.
Definition: Shape.h:65