Box.hh
Go to the documentation of this file.
void SetMaterial(const Material &_mat)
Set the material associated with this box.
Box(const Precision _length, const Precision _width, const Precision _height)
Construct a box with specified dimensions.
std::optional< Vector3< Precision > > CenterOfVolumeBelow(const Plane< Precision > &_plane) const
Center of volume below the plane. This is useful when calculating where buoyancy should be applied,...
bool SetDensityFromMass(const Precision _mass)
Set the density of this box based on a mass value. Density is computed using double DensityFromMass(c...
Box(const Vector3< Precision > &_size, const Material &_mat)
Construct a box with specified dimensions, in vector form and a material.
bool operator!=(const Box< Precision > &_b) const
Inequality test operator.
Precision DensityFromMass(const Precision _mass) const
Compute the box's density given a mass value. The box is assumed to be solid with uniform density....
IntersectionPoints< Precision > VerticesBelow(const Plane< Precision > &_plane) const
All the vertices which are on or below the plane.
bool operator==(const Box< Precision > &_b) const
Equality test operator.
bool MassMatrix(MassMatrix3< Precision > &_massMat) const
Get the mass matrix for this box. This function is only meaningful if the box's size and material hav...
IntersectionPoints< Precision > Intersections(const Plane< Precision > &_plane) const
Get intersection between a plane and the box's edges. Edges contained on the plane are ignored.
void SetSize(const Precision _length, const Precision _width, const Precision _height)
Set the size of the box.
Box(const Vector3< Precision > &_size)
Construct a box with specified dimensions, in vector form.
void SetSize(const math::Vector3< Precision > &_size)
Set the size of the box.
Precision VolumeBelow(const Plane< Precision > &_plane) const
Get the volume of the box below a plane.
const Material & Material() const
Get the material associated with this box.
Box(const Precision _length, const Precision _width, const Precision _height, const Material &_mat)
Construct a box with specified dimensions and a material.
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: MassMatrix3.hh:46
Definition: Angle.hh:43