Represents a perfect sphere collision shape.
More...
#include <sphere.hpp>
|
| | Sphere (double radius) |
| | Constructs a new Sphere centered at the local origin.
|
| virtual | ~Sphere ()=default |
| ShapeType | GetType () const override |
| | Gets the exact type of this shape.
|
| double | CalculateVolume () const override |
| | Calculates the volume of the specific shape.
|
| Vector3 | CalculateLocalInertia (double mass) const override |
| | Computes the diagonal of the local inertia tensor for this shape given a mass.
|
| double | GetRadius () const |
| | Gets the radius of the sphere.
|
| virtual | ~Shape ()=default |
Represents a perfect sphere collision shape.
◆ Sphere()
| frcsim::Sphere::Sphere |
( |
double | radius | ) |
|
|
inlineexplicit |
Constructs a new Sphere centered at the local origin.
- Parameters
-
| radius | The radius of the sphere in meters. |
◆ ~Sphere()
| virtual frcsim::Sphere::~Sphere |
( |
| ) |
|
|
virtualdefault |
◆ CalculateLocalInertia()
| Vector3 frcsim::Sphere::CalculateLocalInertia |
( |
double | mass | ) |
const |
|
inlineoverridevirtual |
Computes the diagonal of the local inertia tensor for this shape given a mass.
- Parameters
-
| mass | The mass of the rigid body attached to this shape in kg. |
- Returns
- A Vector3 representing the moments of inertia (Ixx, Iyy, Izz).
Implements frcsim::Shape.
◆ CalculateVolume()
| double frcsim::Sphere::CalculateVolume |
( |
| ) |
const |
|
inlineoverridevirtual |
Calculates the volume of the specific shape.
- Returns
- The geometric volume in cubic meters.
Implements frcsim::Shape.
◆ GetRadius()
| double frcsim::Sphere::GetRadius |
( |
| ) |
const |
|
inline |
Gets the radius of the sphere.
- Returns
- The radius in meters.
◆ GetType()
Gets the exact type of this shape.
- Returns
- The ShapeType enum value corresponding to the derived class.
Implements frcsim::Shape.
The documentation for this class was generated from the following file:
- src/main/driver/include/frcsim/collision_shapes/sphere.hpp