16 #ifndef SURGSIM_MATH_CAPSULESHAPE_H
17 #define SURGSIM_MATH_CAPSULESHAPE_H
54 virtual double getVolume()
const override;
74 virtual bool isValid()
const override;
98 #endif // SURGSIM_MATH_CAPSULESHAPE_H
double getLength() const
Get the capsule length (i.e.
Definition: CapsuleShape.cpp:35
Definition: DriveElementFromInputBehavior.cpp:27
Capsule shape: centered on (0, 0, 0), aligned along Y, with length and radius.
Definition: CapsuleShape.h:31
SURGSIM_STATIC_REGISTRATION(BoxShape)
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:62
virtual Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: CapsuleShape.cpp:64
double m_length
Capsule length.
Definition: CapsuleShape.h:89
void setLength(double length)
Set the capsule length (i.e.
Definition: CapsuleShape.cpp:45
SURGSIM_CLASSNAME(SurgSim::Math::CapsuleShape)
virtual Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: CapsuleShape.cpp:79
Vector3d bottomCenter() const
Return the center of the bottom sphere of the internal cylinder.
Definition: CapsuleShape.cpp:74
void setRadius(double radius)
Set the capsule radius (i.e.
Definition: CapsuleShape.cpp:50
virtual double getVolume() const override
Get the volume of the shape.
Definition: CapsuleShape.cpp:55
virtual int getType() override
Definition: CapsuleShape.cpp:30
double getRadius() const
Get the capsule radius (i.e.
Definition: CapsuleShape.cpp:40
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:63
Vector3d topCenter() const
Return the center of the top sphere of the internal cylinder.
Definition: CapsuleShape.cpp:69
virtual bool isValid() const override
Definition: CapsuleShape.cpp:119
CapsuleShape(double length=0.0, double radius=0.0)
Constructor.
Definition: CapsuleShape.cpp:24
double m_radius
Capsule radius.
Definition: CapsuleShape.h:92
Generic rigid shape class defining a shape.
Definition: Shape.h:59