This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::LightWorld Class

Header: #include <UnigineLights.h>
Inherits: Light
Read More

LightWorld Class

Members


static LightWorldPtr create ( const Math::vec4 & color ) #

Constructor. Creates a new world light source with a given color.

Arguments

  • const Math::vec4 & color - Color of the new light source.

static Ptr<LightWorld> cast ( const Ptr<Node> & node ) #

Casts a LightWorld out of the Node instance.

Arguments

  • const Ptr<Node> & node - Pointer to Node.

Return value

Pointer to LightWorld.

static Ptr<LightWorld> cast ( const Ptr<Light> & base ) #

Casts a LightWorld out of the Light instance.

Arguments

  • const Ptr<Light> & base - Pointer to Light.

Return value

Pointer to LightWorld.

void setMode ( int mode ) #

Sets rendering mode for the light source. This option determines whether the light is to be rendered as a dynamic or static one.

Arguments

  • int mode - Light mode, one of the MODE_* variables.

int getMode ( ) #

Returns the current rendering mode for the light source. This option determines whether the light is to be rendered as a dynamic or static one.

Return value

Light mode, one of the MODE_* variables.

void setDisableAngle ( float angle ) #

Sets an angle at which the light source is disabled (shadows and the diffuse component is disabled). However, the light source still affects scattering.

Arguments

  • float angle - Angle at which the light source is disabled.

float getDisableAngle ( ) #

Returns an angle at which the light source is disabled (shadows and the diffuse component is disabled). However, the light source still affects scattering.

Return value

Angle at at which the light source is disabled.

void setNumShadowCascades ( int cascades ) #

Sets the number of shadow cascades with different shadow maps. All the shadow maps have the same resolution, but are applied to different cascades. Thus, close-range shadows are of higher quality and distant ones of lower.

Arguments

  • int cascades - Number of shadow cascades. Accepted values are from 1 to 4. The default is 4.

int getNumShadowCascades ( ) #

Returns the number of shadow cascades with different shadow maps. All the shadow maps have the same resolution, but are applied to different cascades. Thus, close-range shadows are of higher quality and distant ones of lower.

Return value

The number of shadow cascades. The minimum number of cascades is 1, the maximum is 4.

void setScattering ( int scattering ) #

Sets a lighting type for the world light.

Arguments

int getScattering ( ) #

Returns a lighting type set for the world light.

Return value

One of the SCATTERING_* variables.

void setShadowCascadeMode ( int mode ) #

Sets the shadow cascade generation mode for the world light source. There are two modes available:
  • Dynamic - shadow cascades are built dynamically relative to the camera's position.
  • Static - shadow cascades are built relative to the world light's position and baked. This mode is suitable for archviz projects.

Arguments

int getShadowCascadeMode ( ) #

Returns the current shadow cascade generation mode for the world light source. There are two modes available:
  • Dynamic - shadow cascades are built dynamically relative to the camera's position.
  • Static - shadow cascades are built relative to the world light's position and baked. This mode is suitable for archviz projects.

Return value

Shadow cascade mode, one of the SHADOW_CASCADE_MODE_* variables.

void setShadowCascadeBorder ( int num, float r ) #

Sets the multiplier for the distance to the border of the specified shadow cascade at which the corresponding shadows are rendered.

Arguments

  • int num - The number of the cascade in range [0;num_cascades-1].
  • float r - Distance multiplier to be set, in range [0; 1].

float getShadowCascadeBorder ( int num ) #

Returns the multiplier for the distance to the border of the specified shadow cascade at which the corresponding shadows are rendered.

Arguments

  • int num - The number of the cascade in range [0;num_cascades-1].

Return value

Current distance multiplier, in range [0;1].

void setShadowHeight ( float height ) #

Sets the view height of the orthographic projection used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Arguments

  • float height - View height of the orthographic projection used for shadow cascade generation, in units.

float getShadowHeight ( ) #

Returns the current view height of the orthographic projection used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Return value

Current view height of the orthographic projection used for shadow cascade generation, in units.

void setShadowWidth ( float width ) #

Sets the view width of the orthographic projection used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Arguments

  • float width - View width of the orthographic projection used for shadow cascade generation, in units.

float getShadowWidth ( ) #

Returns the current view width of the orthographic projection used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Return value

Current view width of the orthographic projection used for shadow cascade generation, in units.

void setShadowZFar ( float zfar ) #

Sets the distance to the far clipping plane to be used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Arguments

  • float zfar - Distance to the far clipping plane to be used, in units.

float getShadowZFar ( ) #

Returns the current distance to the far clipping plane used for generation of static shadow cascades. Static cascades are generated relative to the world light's position.
Notice
This parameter is available only when the shadow cascade mode of the world light is set to static.

Return value

Distance to the far clipping plane currently used, in units.

static int type ( ) #

Returns the type of the node.

Return value

Light type identifier.
Last update: 16.08.2019
Build: ()