A system that simulates buoyancy of objects immersed in fluid. All SDF parameters are optional. This system must be attached to the world and this system will apply buoyancy to all links that have inertia and collision shapes. More...
|~Buoyancy () override=default|
|void||Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) override|
|Configure the system. More...|
|void||PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) override|
|Public Member Functions inherited from System|
A system that simulates buoyancy of objects immersed in fluid. All SDF parameters are optional. This system must be attached to the world and this system will apply buoyancy to all links that have inertia and collision shapes.
The volume and center of volume will be computed for each link, and stored as components. During each iteration, Archimedes' principle is applied to each link with a volume and center of volume component.
Plane shapes are not handled by this plugin, and will not be affected by buoyancy.
- <uniform_fluid_density> sets the density of the fluid that surrounds the buoyant object.
buoyancy.sdf SDF file contains three submarines. The first submarine is neutrally buoyant, the second sinks, and the third floats. To run:
Constructor & Destructor Documentation
Member Function Documentation
Configure the system.
[in] _entity The entity this plugin is attached to. [in] _sdf The SDF Element associated with this system plugin. [in] _ecm The EntityComponentManager of the given simulation instance. [in] _eventMgr The EventManager of the given simulation instance.
The documentation for this class was generated from the following file: