Cylinder shape volume. More...
#include <shape_volume.hh>
Public Member Functions | |
Volume | CalculateVolume (const ignition::math::Pose3d &pose, double fluidLevel) override |
Calculates volume + centroid of submerged shape if the shape is out of water returns Volume{}. More... | |
CylinderVolume (double r, double l) | |
Default constructor. More... | |
std::string | Display () override |
Display string for cylinder shape. More... | |
Public Member Functions inherited from buoyancy::ShapeVolume | |
virtual | ~ShapeVolume ()=default |
Default destructor. More... | |
Public Attributes | |
double | h |
Height of cylinder. More... | |
double | r |
Radius of cylinder. More... | |
Public Attributes inherited from buoyancy::ShapeVolume | |
double | averageLength |
Average length of object estimate used for drag torque calculation. More... | |
ShapeType | type |
Type of shape. More... | |
double | volume |
Full volume of object. More... | |
Private Attributes | |
Polyhedron | polyhedron |
Polyhedron defining a cylinder. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from buoyancy::ShapeVolume | |
static std::unique_ptr< ShapeVolume > | makeShape (const sdf::ElementPtr sdf) |
Factory method for shape. Parses a shape object from sdf data. More... | |
Cylinder shape volume.
Definition at line 103 of file shape_volume.hh.
|
explicit |
|
overridevirtual |
Calculates volume + centroid of submerged shape if the shape is out of water returns Volume{}.
pose | world pose of volume |
fluidLevel | height of fluid |
Implements buoyancy::ShapeVolume.
Definition at line 167 of file shape_volume.cc.
|
overridevirtual |
Display string for cylinder shape.
Reimplemented from buoyancy::ShapeVolume.
Definition at line 159 of file shape_volume.cc.
double buoyancy::CylinderVolume::h |
Height of cylinder.
Definition at line 121 of file shape_volume.hh.
|
private |
Polyhedron defining a cylinder.
Definition at line 125 of file shape_volume.hh.
double buoyancy::CylinderVolume::r |
Radius of cylinder.
Definition at line 118 of file shape_volume.hh.