|
JSim 2026.06.01-p(1)
|
Base class for all collision geometries in the physics engine. More...
#include <shape.hpp>
Public Member Functions | |
| virtual | ~Shape ()=default |
| virtual ShapeType | GetType () const =0 |
| Gets the exact type of this shape. | |
| virtual double | CalculateVolume () const =0 |
| Calculates the volume of the specific shape. | |
| virtual Vector3 | CalculateLocalInertia (double mass) const =0 |
| Computes the diagonal of the local inertia tensor for this shape given a mass. | |
Base class for all collision geometries in the physics engine.
Defines the common interface for collision detection, volume calculations, and inertial property computation.
|
virtualdefault |
|
pure virtual |
Computes the diagonal of the local inertia tensor for this shape given a mass.
| mass | The mass of the rigid body attached to this shape in kg. |
Implemented in frcsim::Box, frcsim::Cylinder, and frcsim::Sphere.
|
pure virtual |
Calculates the volume of the specific shape.
Implemented in frcsim::Box, frcsim::Cylinder, and frcsim::Sphere.
|
pure virtual |
Gets the exact type of this shape.
Implemented in frcsim::Box, frcsim::Cylinder, and frcsim::Sphere.