This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

PhysicalForce Class

Interface for physical force handling.

To use this class, include the UniginePhysicalForce.h file.

PhysicalForce Class

Members


PhysicalForce (float radius)

Constructor. Creates a physical force node with the specified radius in units.

Arguments

  • float radius - The radius of the physical force node in units.

void setRadius (float radius)

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.

void setAttenuation (float attenuation)

Updates the attenuation factor for the physical force.

Arguments

  • float attenuation - A new attenuation factor.

void setRotator (float rotator)

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.

float getAttenuation ()

Returns the current attenuation factor for the physical force.

Return value

The attenuation factor.

void setAttractor (float attractor)

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.

float getRotator ()

Returns the current rotation force that will be applied to objects in the physical force radius.

Return value

The rotation force value.

float getAttractor ()

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.

float getRadius ()

Returns the current radius set for applying the physical force.

Return value

The radius in units.
Last update: 03.07.2017
Build: ()