Represents a cylinder collision shape aligned with the Y axis.
More...
#include <cylinder.hpp>
Represents a cylinder collision shape aligned with the Y axis.
◆ Cylinder()
| frcsim::Cylinder::Cylinder |
( |
double | radius, |
|
|
double | halfHeight ) |
|
inline |
Constructs a new Cylinder.
- Parameters
-
| radius | The radius of the cylinder base in meters. |
| halfHeight | Half the height of the cylinder along the Y axis in meters. |
◆ ~Cylinder()
| virtual frcsim::Cylinder::~Cylinder |
( |
| ) |
|
|
virtualdefault |
◆ CalculateLocalInertia()
| Vector3 frcsim::Cylinder::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::Cylinder::CalculateVolume |
( |
| ) |
const |
|
inlineoverridevirtual |
Calculates the volume of the specific shape.
- Returns
- The geometric volume in cubic meters.
Implements frcsim::Shape.
◆ GetHalfHeight()
| double frcsim::Cylinder::GetHalfHeight |
( |
| ) |
const |
|
inline |
Gets the half-height of the cylinder.
- Returns
- Half the total height (Y-axis extents) in meters.
◆ GetRadius()
| double frcsim::Cylinder::GetRadius |
( |
| ) |
const |
|
inline |
Gets the radius of the cylinder.
- Returns
- The radius in meters.
◆ GetType()
| ShapeType frcsim::Cylinder::GetType |
( |
| ) |
const |
|
inlineoverridevirtual |
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/cylinder.hpp