UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

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 setDeferred (int deferred) const =0

Sets a deferred light flag.

Arguments

  • int deferred - Deferred light flag.

virtual int isDeferred () const =0

Returns a deferred light flag.

Return value

Deferred light flag.

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 setDiffuseScale (float scale) const =0

Sets a light diffuse shading component scale.

Arguments

  • float scale - Light diffuse shading component scale.

virtual float getDiffuseScale () const =0

Returns a light diffuse shading component scale.

Return value

Light diffuse shading component scale.

virtual void setNormalScale (float scale) const =0

Sets a light normal shading component scale.

Arguments

  • float scale - Light normal shading component scale.

virtual float getNormalScale () const =0

Returns a light normal shading component scale.

Return value

Light normal shading component scale.

virtual void setSpecularScale (float scale) const =0

Sets a light specular shading component scale.

Arguments

  • float scale - Light specular shading component scale.

virtual float getSpecularScale () const =0

Returns a light specular shading component scale.

Return value

Light specular shading component scale.

virtual void setSpecularPower (float power) const =0

Sets a light specular shading component power.

Arguments

  • float power - Light specular shading component power.

virtual float getSpecularPower () const =0

Returns a light specular shading component power.

Return value

Light specular shading component power.

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 setTranslucent (int translucent) const =0

Sets a light translucent enable flag.

Arguments

  • int translucent - Light translucent enable flag.

virtual int getTranslucent () const =0

Returns a light translucent enable flag.

Return value

Translucent 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 setTranslucentSize (int size) const =0

Sets the light translucent map size.

Arguments

  • int size - Light translucent map size.

virtual int getTranslucentSize () const =0

Returns the light translucent map size.

Return value

Translucent 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 setShadowAmbient (float ambient) const =0

Sets the light shadow ambient shading value.

Arguments

  • float ambient - Light shadow ambient shading value.

virtual float getShadowAmbient () const =0

Returns the light shadow ambient shading value.

Return value

Light shadow ambient shading value.

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 setTranslucentBias (float bias) const =0

Sets the light translucent bias parameter.

Arguments

  • float bias - Light translucent bias parameter.

virtual float getTranslucentBias () const =0

Returns the light translucent bias parameter.

Return value

Light translucent bias parameter.

virtual void setDeferredDistance (float distance) const =0

Sets the light deferred enable distance.

Arguments

  • float distance - Light deferred enable distance.

virtual float getDeferredDistance () const =0

Returns the light deferred enable distance.

Return value

Light deferred enable distance.

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