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
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::LightProb Class

Interface for light omni handling.

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

Unigine::LightProb Class

Members


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

LightProb constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

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

LightProb constructor.

Arguments

  • const LightPtr & light - Light smart pointer.

static Ptr< LightProb > create (const vec4 & color, const vec3 & radius)

LightProb constructor.

Arguments

  • const vec4 & color - Light color.
  • const vec3 & radius - Light radius.

virtual void setRadius (const vec3 & radius) const =0

Sets a light radius.

Arguments

  • const vec3 & radius - Light radius.

virtual vec3 getRadius () const =0

Returns a light radius.

Return value

Light radius.

virtual void setCoefficients (const vec3 * coefficients) const =0

Sets light nine spherical harmonic coefficients.

Arguments

  • const vec3 * coefficients - Light nine spherical harmonic coefficients pointer.

virtual const vec3 * getCoefficients () const =0

Gets light nine spherical harmonic coefficients.

Return value

Light nine spherical harmonic coefficients pointer.

virtual void setImageTextureImage (const ImagePtr & image) const =0

Sets the light environment image texture.

Arguments

  • const ImagePtr & image - Light environment image texture.

virtual void getImageTextureImage (const ImagePtr & image) const =0

Gets the light environment image texture.

Arguments

  • const ImagePtr & image - Light environment image texture.

virtual vec3 getImageTextureColor (const vec3 & direction) const =0

Returns a light color by direction.

Arguments

  • const vec3 & direction - Direction vector.

Return value

Light color at specified direction.

virtual void renderImageTexture (float znear, float zfar, int size) const =0

Renders a light image texture.

Arguments

  • float znear - Rendering near clipping plane.
  • float zfar - Rendering far clipping plane.
  • int size - Rendering image size.
Last update: 2017-07-03
Build: ()