This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

PhysicalWind Class

A PhysicalWind class is used to simulate a box-shaped area inside of which the wind is blowing. The wind gradually decreases up to the box boundaries.

Notice
A physical wind will affect only an object that meets the following requirements:
  • The object's bounds must be inside the physical wind box.
  • A cloth body or a rigid body must be assigned to the object. If the rigid body is used, a shape should be also assigned.

See Also

  • An article on Physical Wind
  • A set of samples located in the data/samples/physicals folder:
    1. wind_00
    2. wind_01
    3. wind_02
    4. wind_03
    5. wind_04
    6. wind_05

PhysicalWind Class

This class inherits from Physical

Members


PhysicalWind (vec3 size)

Constructor. Creates a physical wind node of the specified size.

Arguments

  • vec3 size - Wind box size in units.

float getAngularDamping ()

Returns the current value indicating how much the angular velocity of the objects decreases when they get inside the physical wind node.

Return value

Angular damping value.

float getLinearDamping ()

Returns the current value indicating how much the linear velocity of the objects decreases when they get inside the physical wind node.

Return value

Linear damping value.

vec3 getSize ()

Returns the current size of the physical wind node.

Return value

Wind box size in units.

vec3 getThreshold ()

Returns the current threshold distance values along the coordinates axes relative to the wind node size (that is, inside of it). It determines the area of gradual change from zero to full wind velocity. See also setThreshold().

Return value

Threshold distance in units.

vec3 getVelocity ()

Returns the current velocity of the physical wind flow along the axes.

Return value

Velocity in units per second.

void setAngularDamping (float damping)

Sets a value indicating how much the angular velocity of the objects decreases when they get inside the wind node.

Arguments

  • float damping - Angular damping value. If a negative value is provided, 0 will be used instead.

void setLinearDamping (float damping)

Sets a value indicating how much the linear velocity of the objects decreases when they get inside the wind node.

Arguments

  • float damping - Linear damping value. If a negative value is provided, 0 will be used instead.

void setSize (vec3 size)

Sets the size of the physical wind node.

Arguments

  • vec3 size - Wind box size in units.

void setThreshold (vec3 threshold)

Sets the threshold distance values along the coordinates axes relative to the wind node size (that is, inside of it). It determines the area of gradual change from zero to full wind velocity.

The threshold distance values form an invisible box, inside which the wind blows with full velocity:

Arguments

  • vec3 threshold - Threshold distance in units.

void setVelocity (vec3 velocity)

Sets velocity of the physical wind flow along the axes.

Arguments

  • vec3 velocity - Velocity in units per second.
Last update: 2017-07-03
Build: ()