detail/Cylinder.hh
Go to the documentation of this file.
Quaternion< Precision > RotationalOffset() const
Get the rotational offset. By default, a cylinder's length is aligned with the Z axis. The rotational offset encodes a rotation from the z axis.
Definition: detail/Cylinder.hh:75
bool operator==(const Cylinder &_cylinder) const
Check if this cylinder is equal to the provided cylinder. Radius, length, and material properties wil...
Definition: detail/Cylinder.hh:103
Cylinder()=default
Default constructor. The default radius and length are both zero. The default rotational offset is Qu...
void SetRadius(const Precision _radius)
Set the radius in meters.
Definition: detail/Cylinder.hh:54
const Material & Mat() const
Get the material associated with this cylinder.
Definition: detail/Cylinder.hh:89
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: MassMatrix3.hh:45
bool MassMatrix(MassMatrix3d &_massMat) const
Get the mass matrix for this cylinder. This function is only meaningful if the cylinder's radius...
Definition: detail/Cylinder.hh:112
bool equal(const T &_a, const T &_b, const T &_epsilon=T(1e-6))
check if two values are equal, within a tolerance
Definition: Helpers.hh:552
void SetMat(const Material &_mat)
Set the material associated with this cylinder.
Definition: detail/Cylinder.hh:96
Precision Volume() const
Get the volume of the cylinder in m^3.
Definition: detail/Cylinder.hh:121
Precision Length() const
Get the length in meters.
Definition: detail/Cylinder.hh:61
bool SetDensityFromMass(const Precision _mass)
Set the density of this cylinder based on a mass value. Density is computed using Precision DensityFr...
Definition: detail/Cylinder.hh:129
bool SetFromCylinderZ(const Material &_mat, const T _length, const T _radius, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on a Material and equivalent cylinder aligned with Z axis...
Definition: MassMatrix3.hh:1118
void SetRotationalOffset(const Quaternion< Precision > &_rotOffset)
Set the rotation offset. See Quaternion<Precision> RotationalOffset() for details on the rotational o...
Definition: detail/Cylinder.hh:82
T pow(T... args)
Definition: Angle.hh:39
Precision Radius() const
Get the radius in meters.
Definition: detail/Cylinder.hh:47
#define IGN_PI
Define IGN_PI, IGN_PI_2, and IGN_PI_4. This was put here for Windows support.
Definition: Helpers.hh:180
Precision DensityFromMass(const Precision _mass) const
Compute the cylinder's density given a mass value. The cylinder is assumed to be solid with uniform d...
Definition: detail/Cylinder.hh:139