This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::LightEnvironmentProbe Class

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

LightEnvironmentProbe Class

Members


static LightEnvironmentProbePtr create(const Math::vec4 & color, const Math::vec3 & attenuation_distance, const char * name = 0)

Constructor. Creates a new environment probe with cubemap modulation based on given parameters.

Arguments

  • const Math::vec4 & color - Color of the environment probe.
  • const Math::vec3 & attenuation_distance - Radii of the environment probe.
  • const char * name - Path to a cube texture of the environment probe.

Ptr<LightEnvironmentProbe> cast(const Ptr<Node> & node)

Arguments

  • const Ptr<Node> & node

Ptr<LightEnvironmentProbe> cast(const Ptr<Light> & base)

Arguments

  • const Ptr<Light> & base

void setAmbientColor(const Math::vec4 & color)

Sets given ambient color to the LightEnvironment Probe.

Arguments

  • const Math::vec4 & color -

Math::vec4 & getAmbientColor()

Returns ambient color value of the LightEnvironment Probe.

Return value

Ambient color value.

void setAmbientIntensity(float intensity)

Sets given ambient intensity value to the LightEnvironment Probe. If ambient intensity is set to 1 and reflection intensity is set to 0, the Probe will be pure Light Probe.

Arguments

  • float intensity - Ambient intensity value.

float getAmbientIntensity()

Returns ambient intensity of the LightEnvironment Probe.

Return value

Ambient intensity value.

void setAttenuationDistance(const Math::vec3 & distance)

Sets the distance from the light source shape, at which the light source doesn't illuminate anything.

Arguments

  • const Math::vec3 & distance - Distance from the light source shape, at which the light source doesn't illuminate anything.

Math::vec3 getAttenuationDistance()

Returns the distance from the light source shape, at which the light source doesn't illuminate anything.

Return value

Distance from the light source shape, at which the light source doesn't illuminate anything.

void setBoxGI(int boxgi)

Arguments

  • int boxgi

int isBoxGI()

void setBoxGlossCorners(float corners)

Arguments

  • float corners

float getBoxGlossCorners()

void setBoxProjection(int projection)

Arguments

  • int projection

int isBoxProjection()

void setBoxSize(const Math::vec3 & size)

Arguments

  • const Math::vec3 & size

Math::vec3 getBoxSize()

void setDynamic(int dynamic)

Sets the value indicating if reflections are dynamic (the cubemap is generated dynamically).

Arguments

  • int dynamic - 1 to enable dynamic reflections; 0 to use a reflection cubemap.

int isDynamic()

Returns the value indicating if reflections are dynamic (the cubemap is generated dynamically).

Return value

1 if dynamic reflections are used; 0 if a reflection cubemap is used.

void setImageTexture(const Ptr<Texture> & texture)

Arguments

  • const Ptr<Texture> & texture

Ptr<Texture> getImageTexture()

int setImageTextureImage(const Ptr<Image> & image, int dynamic = 0)

Sets the given image as the cube texture of the environment probe. If you need to set the cube texture for all environment probes in the scene, set the dynamic flag to 1.

Arguments

  • const Ptr<Image> & image - Cube texture to set.
  • int dynamic - Dynamic texture flag:
    • If set to 0, changing the cube texture of the current environment probe will also affect all environment probes in the scene.
    • If set to 1, a cube texture will be successfully set only for the current environment probe.

Return value

1 if the cube texture is set successfully; otherwise, 0.

int getImageTextureImage(const Ptr<Image> & image)

Grabs the cube texture (RGBA16F) containing the rendered environment probe and saves it into the given Image instance.

Arguments

  • const Ptr<Image> & image - Image into which the texture is saved.

Return value

1 if the cube texture has been grabbed successfully; otherwise, 0.

void setImageTextureName(const char * name)

Sets a path to a cube texture.

Arguments

  • const char * name - Path to a cube texture.

const char * getImageTextureName()

Returns the path to the reflection cube texture used for the environment probe.

Return value

Path to the cube texture.

void setLocalSpace(int space)

Arguments

  • int space

int isLocalSpace()

void setReflectionColor(const Math::vec4 & color)

Sets given reflection color to the LightEnvironment Probe. If reflection intensity is set to 1 and ambient intensity is set to 0, the Probe will be pure Reflection Probe.

Arguments

  • const Math::vec4 & color - Color value.

Math::vec4 getReflectionColor()

Returns a reflection color of the LightEnvironment Probe.

Return value

Color value.

void setReflectionIntensity(float intensity)

Sets given reflection intensity value to the LightEnvironemt Probe.

Arguments

  • float intensity - Reflection intensity value.

float getReflectionIntensity()

Returns the reflection intensity of the LightEnvironment Probe.

Return value

Reflection intensity value.

void setReflectionMask(int mask)

Sets a mask that specifies materials to reflect.
Notice
The reflection mask can be specified only for dynamic reflections (when the Dynamicflag is set to1).

Arguments

  • int mask - Reflection mask (integer, each bit of which is used to represent a mask).

int getReflectionMask()

Returns the mask that specifies materials to reflect.
Notice
The reflection mask can be specified only for dynamic reflections (when the Dynamicflag is set to1).

Return value

The reflection mask (integer, each bit of which is used to represent a mask).

void setReflectionUpdate(int update)

Sets the update interval for the cube texture used for dynamic reflections.

Arguments

  • int update - Update interval for the dynamic cube texture. The available values are:
    • 1 - refresh only one face each frame.
    • 2 - refresh 2 faces each frame.
    • 3 - refresh 3 faces each frame.
    • 4 - refresh 4 faces each frame.
    • 5 - refresh 5 faces each frame.
    • 6 - refresh 6 faces each frame.

int getReflectionUpdate()

Returns the current update interval set for the cube texture used for dynamic reflections.

Return value

Update interval for the dynamic cube texture. The available values are:
  • 1 - refresh only one face each frame.
  • 2 - refresh 2 faces each frame.
  • 3 - refresh 3 faces each frame.
  • 4 - refresh 4 faces each frame.
  • 5 - refresh 5 faces each frame.
  • 6 - refresh 6 faces each frame.

void setResolution(int resolution)

Sets the resolution of the reflection mask in pixels (available only when the Dynamicflag is set to1).

Arguments

  • int resolution - Resolution of the reflection mask in pixels.

int getResolution()

Returns the current resolution of the reflection mask in pixels (available only when the Dynamicflag is set to1).

Return value

Resolution of the reflection mask in pixels.

void setSkyCutout(int cutout)

Arguments

  • int cutout

int isSkyCutout()

void setZFar(float zfar)

Sets the distance to the far clipping plane for image grabbing (available only when the Dynamicflag is set to1).

Arguments

  • float zfar - Distance to the far clipping plane.

float getZFar()

Returns the distance to the far clipping plane used for image grabbing (available only when the Dynamicflag is set to1)

Return value

Distance to the far clipping plane.

void setZNear(float znear)

Sets the distance to the near clipping plane for image grabbing (available only when the Dynamicflag is set to1).

Arguments

  • float znear - Distance to the near clipping plane.

float getZNear()

Returns the distance to the near clipping plane used for image grabbing (available only when the Dynamicflag is set to1)

Return value

Distance to the near clipping plane.

int type()

Last update: 03.07.2017
Build: ()