This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

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
Build: ()