24 #include <ignition/math/Pose3.hh> 47 static std::unique_ptr<ShapeVolume> makeShape(
const sdf::ElementPtr
sdf);
50 virtual std::string Display();
57 virtual Volume CalculateVolume(
const ignition::math::Pose3d& pose,
58 double fluidLevel) = 0;
79 explicit BoxVolume(
double x,
double y,
double z);
82 std::string Display()
override;
85 Volume CalculateVolume(
const ignition::math::Pose3d& pose,
86 double fluidLevel)
override;
111 std::string Display()
override;
114 Volume CalculateVolume(
const ignition::math::Pose3d& pose,
115 double fluidLevel)
override;
136 std::string Display()
override;
139 Volume CalculateVolume(
const ignition::math::Pose3d& pose,
140 double fluidLevel)
override;
152 std::stringstream ss;
153 ss <<
"Parse error for <" << shape <<
">: " << message;
155 this->output_ = ss.str();
158 const char*
what()
const throw()
160 return this->output_.c_str();
ShapeType
Type of geometry shape.
std::unique_ptr< ShapeVolume > ShapeVolumePtr
double r
Radius of sphere.
Polyhedron polyhedron
Polyhedron defining a cylinder.
double r
Radius of cylinder.
Submerged volume calculation using polyhedron based on: Exact Buoyancy for Polyhedra by Eric Catto...
Polyhedron polyhedron
Polyhedron defining a box.
double volume
Full volume of object.
double h
Height of cylinder.
Parent shape object for volume objects.
double averageLength
Average length of object estimate used for drag torque calculation.
ShapeType type
Type of shape.
Represents output volume with centroid.
Custom exception for parsing errors.
ParseException(const char *shape, const char *message)
const char * what() const