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

Unigine::LightWorld Class

Interface for light omni handling.

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

Unigine::LightWorld Class

Members


static int type ()

LightWorld type.

Return value

LightWorld type identifier.

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

LightWorld constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< LightWorld > create (const LightPtr & light)

LightWorld constructor.

Arguments

  • const LightPtr & light - Light smart pointer.

static Ptr< LightWorld > create (const vec4 & color)

LightWorld constructor.

Arguments

  • const vec4 & color - Light color.

virtual void setScattering (int scattering) const =0

Sets a light scattering flag.

Arguments

  • int scattering - Light scattering flag.

virtual int getScattering () const =0

Returns a light scattering flag.

Return value

Light scattering flag.

virtual void setShadowRange (float range) const =0

Sets a light shadow range.

Arguments

  • float range - Light shadow range.

virtual float getShadowRange () const =0

Returns a light shadow range.

Return value

Light shadow range.

virtual void setShadowDistribute (float distribute) const =0

Sets the light shadow distribution parameter.

Arguments

  • float distribute - Light shadow distribution parameter.

virtual float getShadowDistribute () const =0

Returns the light shadow distribution parameter.

Return value

Light shadow distribution parameter.

virtual void setNumShadowSplits (int num) const =0

Sets the number of light shadow splits.

Arguments

  • int num - The number of light shadow splits.

virtual int getNumShadowSplits () const =0

Returns the number of light shadow splits.

Return value

The number of light shadow splits.

Unigine::LightWorld::SCATTERING_* Enumeration

SCATTERING_NONE = 0
SCATTERING_SUN
SCATTERING_MOON
Last update: 2017-07-03
Build: ()