Unigine::PhysicalWater Class
Interface for physical water handling. Physical water is used to simulate a force field affecting water objects.
To use this class, include the UniginePhysicalWater.h file.
Unigine::PhysicalWater Class
Members
static int type ()
PhysicalWater type.Return value
PhysicalWater type identifier.static Ptr< PhysicalWater > create (const NodePtr & node)
PhysicalWater constructor.Arguments
- const NodePtr & node - Node smart pointer.
static Ptr< PhysicalWater > create (const PhysicalPtr & physical)
PhysicalWater constructor.Arguments
- const PhysicalPtr & physical - Physical smart pointer.
static Ptr< PhysicalWater > create (const vec3 & size)
PhysicalWater constructor.Arguments
- const vec3 & size - The size of the water box in units.
virtual void setSize (const vec3 & size) const =0
Sets a size of the physical water node.Arguments
- const vec3 & size - A size of the water box in units. If a negative value is provided, 0 will be used instead.
virtual vec3 getSize () const =0
Returns the current size of the physical water node.Return value
The size of the water box in units.virtual void setVelocity (const vec3 & velocity) const =0
Sets a velocity of the flow in physical water.Arguments
- const vec3 & velocity - A velocity in units per second.
virtual vec3 getVelocity () const =0
Returns the current velocity of the flow in physical water.Return value
The velocity in units per second.virtual void setDensity (float density) const =0
Sets a density of the water that determines objects buoyancy.Arguments
- float density - A density value. If a negative value is provided, 0 will be used instead.
virtual float getDensity () const =0
Returns the current density of the physical water that determines objects buoyancy.Return value
The density value.virtual void setLinearDamping (float damping) const =0
Sets a value indicating how much the linear velocity of the objects decreases when they get into the physical water.Arguments
- float damping - A linear damping value. If a negative value is provided, 0 will be used instead.
virtual float getLinearDamping () const =0
Returns the current value indicating how much the linear velocity of the objects decreases when they get into the physical water.Return value
The linear damping value.virtual void setAngularDamping (float damping) const =0
Sets a value indicating how much the angular velocity of the objects decreases when they get into the physical water.Arguments
- float damping - An angular damping value. If a negative value is provided, 0 will be used instead.
virtual float getAngularDamping () const =0
Returns the current value indicating how much the angular velocity of the objects decreases when they get into the physical water.Return value
The angular damping value.Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)