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

Interface for light handling.

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

Unigine::Light Class

Members


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

Light constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

virtual Ptr< Light > getLight () const =0

Returns a light pointer.

Return value

The light pointer.

virtual void setLightMask (int mask) const =0

Sets a light mask.

Arguments

  • int mask - Light mask.

virtual int getLightMask () const =0

Returns a light mask.

Return value

Light mask.

virtual void setViewportMask (int mask) const =0

Sets a viewport mask.

Arguments

  • int mask - Viewport mask.

virtual int getViewportMask () const =0

Returns a viewport mask.

Return value

Viewport mask.

virtual void setColor (const vec4 & color) const =0

Sets a light color.

Arguments

  • const vec4 & color - Light color.

virtual vec4 getColor () const =0

Returns a light color.

Return value

Light color.

virtual void setMultiplier (float multiplier) const =0

Sets a light color multiplier.

Arguments

  • float multiplier - Light color multiplier.

virtual float getMultiplier () const =0

Returns a light color multiplier.

Return value

Light color multiplier.

virtual void setAttenuation (float attenuation) const =0

Sets a light distance attenuation.

Arguments

  • float attenuation - Light distance attenuation.

virtual float getAttenuation () const =0

Returns a light distance attenuation.

Return value

Light distance attenuation.

virtual void setShadow (int shadow) const =0

Sets a light shadow enable flag.

Arguments

  • int shadow - Light shadow enable flag.

virtual int getShadow () const =0

Returns a light shadow enable flag.

Return value

Shadow enable flag.

virtual void setShadowSize (int size) const =0

Sets the light shadow map size.

Arguments

  • int size - Light shadow map size.

virtual int getShadowSize () const =0

Returns the light shadow map size.

Return value

Shadow map size.

virtual void setShadowOffset (const vec3 & offset) const =0

Sets the light shadow center offset vector.

Arguments

  • const vec3 & offset - Light shadow center offset vector.

virtual vec3 getShadowOffset () const =0

Returns the light shadow center offset vector.

Return value

Shadow center offset vector.

virtual void setShadowBias (float bias) const =0

Sets the light shadow bias parameter.

Arguments

  • float bias - Light shadow bias parameter.

virtual float getShadowBias () const =0

Returns the light shadow bias parameter.

Return value

Light shadow bias parameter.

virtual void setShadowSlope (float slope) const =0

Sets the light shadow slope parameter.

Arguments

  • float slope - Light shadow slope parameter.

virtual float getShadowSlope () const =0

Returns the light shadow slope parameter.

Return value

Light shadow slope parameter.

virtual void setShadowSoftness (float softness) const =0

Sets the light shadow softness parameter.

Arguments

  • float softness - Light shadow softness parameter.

virtual float getShadowSoftness () const =0

Returns the light shadow softness parameter.

Return value

Light shadow softness parameter.

virtual void setVisibleDistance (float distance) const =0

Sets the light visible distance.

Arguments

  • float distance - Light visible distance.

virtual float getVisibleDistance () const =0

Returns the light visible distance.

Return value

Light visible distance.

virtual void setShadowDistance (float distance) const =0

Sets the light shadow distance.

Arguments

  • float distance - Light shadow distance.

virtual float getShadowDistance () const =0

Returns the light shadow distance.

Return value

Light shadow distance.

virtual void setFadeDistance (float distance) const =0

Sets the light fade distance.

Arguments

  • float distance - Light fade distance.

virtual float getFadeDistance () const =0

Returns the light fade distance.

Return value

Light fade distance.
Last update: 2017-07-03
Build: ()