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版本。

Unigine::FieldAnimation Class

Interface for field spacer handling.

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

Unigine::FieldAnimation Class

Members


static int type ()

FieldAnimation type.

Return value

FieldAnimation type identifier.

static Ptr< FieldAnimation > create (const NodePtr & node)

FieldAnimation constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< FieldAnimation > create (const FieldPtr & field)

FieldAnimation constructor.

Arguments

  • const FieldPtr & field - Field smart pointer.

static Ptr< FieldAnimation > create (const vec3 & size)

FieldAnimation constructor.

Arguments

  • const vec3 & size - A size of the Field Animation in units.

virtual void setEllipse (int ellipse) const =0

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.

virtual int isEllipse () const =0

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.

virtual void setSize (const vec3 & size) const =0

Sets an animation field size.

Arguments

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

virtual vec3 getSize () const =0

Returns the animation field size.

Return value

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

virtual void setAttenuation (float attenuation) const =0

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.

virtual float getAttenuation () const =0

Returns the current attenuation coefficient for the Field Animation.

Return value

The current attenuation coefficient value.

virtual void setStem (float stem) const =0

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.

virtual float getStem () const =0

Returns the current stem animation coefficient value.

Return value

The stem animation coefficient value.

virtual void setLeaf (float leaf) const =0

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.

virtual float getLeaf () const =0

Returns the current leaf animation coefficient value.

Return value

The leaf animation coefficient value.

virtual void setScale (float scale) const =0

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.

virtual float getScale () const =0

Returns the current animation scale coefficient value.

Return value

The animation scale coefficient value.

virtual void setWind (const vec3 & wind) const =0

Sets wind coefficients values.

Arguments

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

virtual vec3 getWind () const =0

Returns the wind coefficients values.

Return value

The current wind coefficients values along the X, Y and Z directions.
Last update: 2017-07-03
Build: ()