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
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
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.

FieldAnimation Class

Interface for field spacer handling.

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

FieldAnimation Class

Members


FieldAnimation (const Math::vec3 & size)

Creates a new field animation node of the specified size:
  • If the field animation is of an ellipse shape, its radius values along the axes must be specified.
  • Otherwise, dimensions of the cube must be specified.

Arguments

  • const Math::vec3 & size - A size of the field animation along X, Y and Z axes in units.

void setScale (float scale)

Sets an animation scale coefficient value.

Arguments

  • float scale - A new animation scale coefficient value. If a negative value is provided, 0 will be used instead.

void setSize (const Math::vec3 & size)

Sets an animation field size.

Arguments

  • const Math::vec3 & size - A new animation field size along the X, Y and Z axes in units. If a negative value is provided, 0 will be used instead.

void setStem (float stem)

Sets a stem animation coefficient value.

Arguments

  • float stem - A new stem animation coefficient value. If a negative value is provided, 0 will be used instead.

int isEllipse ()

Returns a value indicating if the Field Animation is of an ellipse shape.

Return value

1 if the Field Animation is of an ellipse shape; otherwise, 0.

float getScale ()

Returns the current animation scale coefficient value.

Return value

The animation scale coefficient value.

Math::vec3 getWind ()

Returns the wind coefficients values.

Return value

The current wind coefficients values along the X, Y and Z directions.

float getLeaf ()

Returns the current leaf animation coefficient value.

Return value

The leaf animation coefficient value.

float getAttenuation ()

Returns the current attenuation coefficient for the Field Animation.

Return value

The current attenuation coefficient value.

float getStem ()

Returns the current stem animation coefficient value.

Return value

The stem animation coefficient value.

Math::vec3 getSize ()

Returns the animation field size.

Return value

The current animation field size along the X, Y and Z axes in units.

void setWind (const Math::vec3 & wind)

Sets wind coefficients values.

Arguments

  • const Math::vec3 & wind - Wind coefficients values along the X, Y and Z directions.

void setAttenuation (float attenuation)

Sets an attenuation coefficient value for the Field Animation.

Arguments

  • float attenuation - An attenuation coefficient value. If a too small value is provided, 1E-6 will be used instead.

void setLeaf (float leaf)

Sets a leaf animation coefficient value.

Arguments

  • float leaf - A new leaf coefficient value. If a negative value is provided, 0 will be used instead.

void setEllipse (int ellipse)

Transforms a cubical Field Animation into an ellipse-shaped one.

Arguments

  • int ellipse - 1 for the ellipse-shaped Field Animation, 0 for the cubical one.
Last update: 2017-07-03
Build: ()