Unigine::LightEnvironmentProbe Class
Interface for environment probes handling.
To use this class, include the UnigineLightEnvironmnetProbe.h file.
Unigine::LightEnvironmentProbe Class
Members
static int type ()
LightEnvironmentProbe type.Return value
LightEnvironmentProbe type identifier.static Ptr< LightEnvironmentProbe > create (const NodePtr & node)
LightEnvironmentProbe constructor.Arguments
- const NodePtr & node - Node smart pointer.
Return value
LightEnvironmentProbe.static Ptr< LightEnvironmentProbe > create (const LightPtr & light)
LightEnvironmentProbe constructor.Arguments
- const LightPtr & light - Light smart pointer.
Return value
LightEnvironmentProbe.static Ptr< LightEnvironmentProbe > create (const vec4 & color, const vec3 & radius, const char * name)
LightEnvironmentProbe constructor.Arguments
- const vec4 & color - Color of the environment probe.
- const vec3 & radius - Radii of the environment probe.
- const char * name - Path to a cube texture of the environment probe.
Return value
LightEnvironmentProbe.virtual void setRadius (const vec3 & radius) const =0
Sets the radius of the environment probe.Arguments
- const vec3 & radius - Radius of the environment probe.
virtual vec3 getRadius () const =0
Returns the radius of the environment probe.Return value
Radius of the environment probe.virtual void setDynamic (const int dynamic) const =0
Sets the value indicating if reflections are dynamic (the cubemap is generated dynamically).Arguments
- const int dynamic - 1 to enable dynamic reflections; 0 to use a reflection cubemap.
virtual int isDynamic () const =0
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.virtual void setResolution (const int resolution) const =0
Sets the resolution of the reflection mask in pixels (available only when the Dynamic flag is set to 1).Arguments
- const int resolution - Resolution of the reflection mask in pixels.
virtual int getResolution () const =0
Returns the current resolution of the reflection mask in pixels (available only when the Dynamic flag is set to 1).Return value
Resolution of the reflection mask in pixels.virtual void setReflectionUpdate (const int update) const =0
Sets the update interval for the cube texture used for dynamic reflections.Arguments
- const 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.
virtual int getReflectionUpdate () const =0
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.
virtual void setReflectionMask (const int mask) const =0
Sets a mask that specifies materials to reflect.The reflection mask can be specified only for dynamic reflections (when the Dynamic flag is set to 1).
Arguments
- const int mask - Reflection mask (integer, each bit of which is used to represent a mask).
virtual int getReflectionMask () const =0
Returns the mask that specifies materials to reflect.The reflection mask can be specified only for dynamic reflections (when the Dynamic flag is set to 1).
Return value
Reflection mask (integer, each bit of which is used to represent a mask).virtual void setZNear (const float znear) const =0
Sets the distance to the near clipping plane for image grabbing (available only when the Dynamic flag is set to 1).Arguments
- const float znear - Distance to the near clipping plane.
virtual float getZNear () const =0
Returns the distance to the near clipping plane used for image grabbing (available only when the Dynamic flag is set to 1).Return value
Distance to the near clipping plane.virtual void setZFar (const float zfar) const =0
Sets the distance to the far clipping plane for image grabbing (available only when the Dynamic flag is set to 1).Arguments
- const float zfar - Distance to the far clipping plane.
virtual float getZFar () const =0
Returns the distance to the far clipping plane used for image grabbing (available only when the Dynamic flag is set to 1).Return value
Distance to the far clipping plane.virtual void setImageTextureName (const char * name) const =0
Sets a path to a cube texture used for the environment probe.Arguments
- const char * name - Path to a cube texture.
virtual const char * getImageTextureName () const =0
Returns the path to the reflection cube texture used for the environment probe.Return value
Path to the cube texture.virtual int setImageTextureImage (const ImagePtr & image, int dynamic) const =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 ImagePtr & image - Image smart pointer.
- 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.virtual int getImageTextureImage (const ImagePtr & image) const =0
Grabs the cube texture (RGBA16F) containing the rendered environment probe and saves it into the given Image.Arguments
- const ImagePtr & image - Image smart pointer.
Return value
1 if the cube texture has been grabbed successfully; otherwise, 0.Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter