This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related 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.

Unigine.FieldAnimation Class

Inherits:Field

Interface for field animation handling.

FieldAnimation Class

Members


static FieldAnimation(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

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

FieldAnimation cast(Node node)

Casts a FieldAnimation out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

FieldAnimation instance.

FieldAnimation cast(Field base)

Casts a FieldAnimation out of the Field instance.

Arguments

  • Field base - Field instance.

Return value

FieldAnimation instance.

void setAnimationScale(float scale)

Sets the animation scale value indicating the scale for speed of vegetation swaying.

Arguments

  • float scale - The scale for speed of vegetation swaying value.

float getAnimationScale()

Returns the animation scale value indicating the scale for speed of vegetation swaying.

Return value

The scale for speed of vegetation swaying value.

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.

float getAttenuation()

Returns the current attenuation coefficient for the Field Animation.

Return value

The current attenuation coefficient value.

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.

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.

void setLeaf(float leaf)

Sets a leaf animation coefficient value.

Arguments

  • float leaf - Scale for the rotation angle of vegetation leaves. If a negative value is provided, 0 will be used instead.

float getLeaf()

Returns the current leaf animation coefficient value.

Return value

The leaf animation coefficient value.

void setSize(vec3 size)

Sets an animation field size.

Arguments

  • 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.

vec3 getSize()

Returns the animation field size.

Return value

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

void setStem(float stem)

Sets a stem animation coefficient value.

Arguments

  • float stem - Scale for movement amplitude of grass and vegetation stems. If a negative value is provided, 0 will be used instead.

float getStem()

Returns the current stem animation coefficient value.

Return value

The stem animation coefficient value.

void setWind(vec3 wind)

Sets wind coefficients values.

Arguments

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

vec3 getWind()

Returns the wind coefficients values.

Return value

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

int type()

Returns the type of the object.

Return value

FieldAnimation type identifier.
Last update: 2018-08-10
Build: ()