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::FieldSpacer Class

Interface for field spacer handling.

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

Unigine::FieldSpacer Class

Members


static int type ()

FieldSpacer type.

Return value

FieldSpacer type identifier.

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

FieldSpacer constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

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

FieldSpacer constructor.

Arguments

  • const FieldPtr & field - Field smart pointer.

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

FieldSpacer constructor.

Arguments

  • const vec3 & size - A size of the Field Spacer along the X, Y and Z axes in units.

virtual void setEllipse (int ellipse) const =0

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

Arguments

  • int ellipse - 1 for the ellipse-shaped Field Spacer, 0 for the cubical one.

virtual int isEllipse () const =0

Returns the size of the Field Spacer.

Return value

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

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

Sets a size for the Field Spacer.

Arguments

  • const vec3 & size - A size of the Field Spacer 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 size of the Field Spacer.

Return value

The size of the Field Spacer in units.

virtual void setAttenuation (float attenuation) const =0

Sets an attenuation factor value for the Field Spacer.

Arguments

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

virtual float getAttenuation () const =0

Returns the current attenuation factor for the Field Spacer.

Return value

The attenuation factor value.
Last update: 2017-07-03
Build: ()