Unigine::PhysicalForce Class
Interface for physical force handling.
To use this class, include the UniginePhysicalForce.h file.
Unigine::PhysicalForce Class
Members
static int type ()
PhysicalForce type.Return value
PhysicalForce type identifier.static Ptr< PhysicalForce > create (const NodePtr & node)
PhysicalForce constructor.Arguments
- const NodePtr & node - Node smart pointer.
static Ptr< PhysicalForce > create (const PhysicalPtr & physical)
PhysicalForce constructor.Arguments
- const PhysicalPtr & physical - Physical smart pointer.
static Ptr< PhysicalForce > create (float radius)
PhysicalForce constructor.Arguments
- float radius - The radius of the physical force node in units.
virtual void setRadius (float radius) const =0
Updates the radius for applying the physical force.Arguments
- float radius - A new radius in units. If a negative value is provided, 0 will be used instead.
virtual float getRadius () const =0
Returns the current radius set for applying the physical force.Return value
The radius in units.virtual void setAttenuation (float attenuation) const =0
Updates the attenuation factor for the physical force.Arguments
- float attenuation - A new attenuation factor.
virtual float getAttenuation () const =0
Returns the current attenuation factor for the physical force.Return value
The attenuation factor.virtual void setAttractor (float attractor) const =0
Updates the attraction force that will be applied to objects in the physical force radius.Arguments
- float attractor - A new attraction force value. Positive values pull objects away from the force point, negative values pull them up to it.
virtual float getAttractor () const =0
Returns the current attraction force applied to objects in the physical force radius. Positive values pull objects away from the force point, negative values pull them up to it.Return value
The attraction force value.virtual void setRotator (float rotator) const =0
Updates the rotation force that will be applied to objects in the physical force radius.Arguments
- float rotator - A new rotation force value. Set a positive value for clockwise rotation or a negative value for counterclockwise one.
virtual float getRotator () const =0
Returns the current rotation force that will be applied to objects in the physical force radius.Return value
The rotation force value.Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)