Go to the documentation of this file.
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
Capsule shape: centered on (0, 0, 0), aligned along Y, with length and radius.
Definition: CapsuleShape.h:32
void setRadius(double radius)
Set the capsule radius (i.e.
Definition: CapsuleShape.cpp:52
CapsuleShape(double length=0.0, double radius=0.0)
Constructor.
Definition: CapsuleShape.cpp:24
Vector3d bottomCenter() const
Return the center of the bottom sphere of the internal cylinder.
Definition: CapsuleShape.cpp:77
double getVolume() const override
Get the volume of the shape.
Definition: CapsuleShape.cpp:58
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:69
double getLength() const
Get the capsule length (i.e.
Definition: CapsuleShape.cpp:36
int getType() const override
Definition: CapsuleShape.cpp:31
double getRadius() const
Get the capsule radius (i.e.
Definition: CapsuleShape.cpp:41
Vector3d topCenter() const
Return the center of the top sphere of the internal cylinder.
Definition: CapsuleShape.cpp:72
Definition: CompoundShapeToGraphics.cpp:30
void setLength(double length)
Set the capsule length (i.e.
Definition: CapsuleShape.cpp:46
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
double m_length
Capsule length.
Definition: CapsuleShape.h:89
double m_radius
Capsule radius.
Definition: CapsuleShape.h:92
bool isValid() const override
Definition: CapsuleShape.cpp:122
void updateAabb()
Definition: CapsuleShape.cpp:127
Generic rigid shape class defining a shape.
Definition: Shape.h:66
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:68
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: CapsuleShape.cpp:67
SURGSIM_CLASSNAME(SurgSim::Math::CapsuleShape)