IReflectionProbe

Functions

SET_CID

RED_RC

InitializeSphere

RED_RC

InitializeBox

RED_RC

InitializePlanar

RED_RC

Initialize

REFLECTION_PROBE_TYPE

GetType

RED_RC

SetMatrix

const Matrix &

GetMatrix

RED_RC

SetCameraPositionOffset

const Vector3 &

GetCameraPositionOffset

RED_RC

SetEnvironmentMap

bool

HasEnvironmentMap

Object *

GetEnvironmentMap

Object *

GetEnvironmentMapIndex

RED_RC

SetPlanarReflectionTex

Object *

GetPlanarReflectionTex

void

SetRenderPlanar

bool

GetRenderPlanar

RED_RC

SetPlanarReflectionPlaneEquation

Vector4

GetPlanarReflectionPlaneEquation

RED_RC

SetPlanarReflectionPlaneNormal

Vector3

GetPlanarReflectionPlaneNormal

RED_RC

SetPlanarReflectionPlanePoint

Vector3

GetPlanarReflectionPlanePoint

double

GetEffectRadius

RED_RC

SetEffectRadius

double

GetFalloffRadius

RED_RC

SetFalloffRadius

void

GetEffectBox

RED_RC

SetEffectBox

void

GetFalloffBox

RED_RC

SetFalloffBox

double

GetBlendWeight

void

SetBlendWeight

bool

IsActive

void

SetActive

Detailed Description

class IReflectionProbe : public RED::IREDObject

Reflection probe interface for probe manipulation.

Public Functions

SET_CID(CID_class_ARTIReflectionProbe)
virtual RED_RC InitializeSphere(const RED::Matrix &iTransform, double iEffectRadius, double iFalloffRadius) = 0

Initializes a spherical probe.

Parameters
  • iTransform – transform matrix containing the probe position and orientation, PCS.

  • iEffectRadius – effect radius of the sphere, offset relative to iTransform.

  • iFalloffRadius – falloff radius of the sphere, offset relative to iTransform.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

virtual RED_RC InitializeBox(const RED::Matrix &iTransform, const RED::Vector3 &iEffectBoxMin, const RED::Vector3 &iEffectBoxMax, const RED::Vector3 &iFalloffBoxMin, const RED::Vector3 &iFalloffBoxMax) = 0

Initializes a box probe.

Parameters
  • iTransform – transform matrix containing the probe position and orientation, PCS.

  • iEffectBoxMin – effect box minimum point, offset relative to iTransform.

  • iEffectBoxMax – effect box maximum point, offset relative to iTransform.

  • iFalloffBoxMin – falloff box minimum point, offset relative to iTransform.

  • iFalloffBoxMax – falloff box maximum point, offset relative to iTransform.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

virtual RED_RC InitializePlanar(const RED::Matrix &iTransform, const RED::Vector3 &iEffectBoxMin, const RED::Vector3 &iEffectBoxMax, const RED::Vector3 &iFalloffBoxMin, const RED::Vector3 &iFalloffBoxMax) = 0

Initializes a planar probe.

Parameters
  • iTransform – transform matrix containing the probe position and orientation, PCS.

  • iEffectBoxMin – effect box minimum point, offset relative to iTransform.

  • iEffectBoxMax – effect box maximum point, offset relative to iTransform.

  • iFalloffBoxMin – falloff box minimum point, offset relative to iTransform.

  • iFalloffBoxMax – falloff box maximum point, offset relative to iTransform.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

virtual RED_RC Initialize(RED::Object *iOther) = 0

Initializes the probe from another one.

The iOther probe properties are copied to this.

Parameters

iOther – ART::ReflectionProbe to initialize this with.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

virtual ART::REFLECTION_PROBE_TYPE GetType() const = 0

Gets the probe type.

Returns

the reflection probe type: spherical or box.

virtual RED_RC SetMatrix(const RED::Matrix &iMatrix) = 0

Sets the probe transform matrix.

If the probe has a parent body, its transform will be relative to it. Otherwise its transform will be relative to the world coordinates system.

Parameters

iMatrix – The transform matrix.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

virtual const RED::Matrix &GetMatrix() const = 0

Gets the probe transform matrix.

Returns

a reference to the transform matrix.

virtual RED_RC SetCameraPositionOffset(const RED::Vector3 &iCameraPosition) = 0

Sets the probe camera position offset.

This position offset vector is in the probe coordinate system

Parameters

iCameraPositionOffset – The position offset vector.

Returns

RED_OK if the method has succeeded,

RED_FAIL otherwise.

inline virtual const RED::Vector3 &GetCameraPositionOffset() const = 0

Gets the position offset between the camera position and the probe matrix position.

Returns

a reference to the camera position offset vector, in probe coordinate system.

virtual RED_RC SetEnvironmentMap(RED::Object *iEnvironmentMapAtlas, RED::Object *iEnvironmentMapAtlasIndex) = 0

Sets the environment maps atlas.

Parameters
  • iEnvironmentMapAtlas – environment map atlas as RED::IImage2D.

  • iEnvironmentMapAtlasIndex – environment map atlas index as RED::IImage2D.

Returns

RED_OK if the method has succeeded,

RED_BAD_PARAM if the method has received an invalid parameter,

RED_FAIL otherwise.

virtual bool HasEnvironmentMap() const = 0

Tests if the probe has environment maps.

Returns

true if the probe has environment maps.

virtual RED::Object *GetEnvironmentMap() const = 0

Gets the environment map atlas texture.

Returns

the environment maps.

virtual RED::Object *GetEnvironmentMapIndex() const = 0

Gets the environment maps index texture.

Returns

the environment maps index.

virtual RED_RC SetPlanarReflectionTex(RED::Object *iPlanarReflectionTex) = 0

Sets the reflection texture for planar probes.

Parameters

iPlanarReflectionTex – the reflection texture.

Returns

RED_OK if the method has succeeded,

RED_INIT_FAILED if this method is called on a probe that is not planar,

RED_FAIL otherwise.

inline virtual RED::Object *GetPlanarReflectionTex() const = 0

Gets the reflection texture for planar probes.

Returns

the reflection texture.

virtual void SetRenderPlanar(bool iRender) = 0

Sets this reflection probe to handle the rendering of the planar reflection texture. For geometry instances, ReflectionProbe objects are duplicated but share the same planar reflection texture, which needs to be rendered only once. If several reflections probes share the same reflection tex and have SetRenderPlanar to true, the rendering will happen several times for nothing. If several reflections probes share the same reflection tex but none has SetRenderPlanar to true, the texture will not be rendered.

Parameters

iRender – true to render, false to let another probe render.

inline virtual bool GetRenderPlanar() const = 0

Gets the render planar parameter.

Returns

the render planar parameter.

virtual RED_RC SetPlanarReflectionPlaneEquation(const RED::Vector4 &iPlaneEquation) = 0

Sets the plane equation for planar probes.

Parameters

iPlaneEquation – : RED::Vector4(a,b,c,d) for a plane of equation ax + by + cz + d = 0 in world coordinates.

Returns

RED_OK if the method has succeeded,

RED_INIT_FAILED if this method is called on a probe that is not planar,

RED_FAIL otherwise.

inline virtual RED::Vector4 GetPlanarReflectionPlaneEquation() const = 0

Gets the plane equation for planar probes.

Returns

RED::Vector4(a,b,c,d) for a plane of equation ax + by + cz + d = 0 in world coordinates.

virtual RED_RC SetPlanarReflectionPlaneNormal(const RED::Vector3 &iPlaneNormal) = 0

Sets the plane normal for planar probes.

Parameters

iPlaneNormal – : normal to the plane, WCS.

Returns

RED_OK if the method has succeeded,

RED_INIT_FAILED if this method is called on a probe that is not planar,

RED_FAIL otherwise.

inline virtual RED::Vector3 GetPlanarReflectionPlaneNormal() const = 0

Gets the plane normal vector for planar probes.

virtual RED_RC SetPlanarReflectionPlanePoint(const RED::Vector3 &iPlanePoint) = 0

Sets a reference point located on the plane.

Parameters

iPlanePoint – : any point located on the plane, WCS.

Returns

RED_OK if the method has succeeded,

RED_INIT_FAILED if this method is called on a probe that is not planar,

RED_FAIL otherwise.

inline virtual RED::Vector3 GetPlanarReflectionPlanePoint() const = 0

Gets a point located on the plane for planar probes.

virtual double GetEffectRadius() const = 0

Gets the probe effect radius in the case of a spherical one.

Returns

the probe effect radius.

virtual RED_RC SetEffectRadius(double iRadius) = 0

Sets the probe effect radius in the case of a spherical one.

Parameters

iRadius – the probe effect radius.

Returns

RED_OK if the method has succeeded,

RED_BAD_PARAM if the method has received an invalid parameter,

RED_FAIL otherwise.

virtual double GetFalloffRadius() const = 0

Gets the probe falloff radius in the case of a spherical one.

Returns

the probe falloff radius.

virtual RED_RC SetFalloffRadius(double iRadius) = 0

Sets the probe falloff radius in the case of a spherical one.

Parameters

iRadius – the probe falloff radius.

Returns

RED_OK if the method has succeeded,

RED_BAD_PARAM if the method has received an invalid parameter,

RED_FAIL otherwise.

virtual void GetEffectBox(RED::Vector3 &oMin, RED::Vector3 &oMax) const = 0

Gets the probe effect box in the case of a box one.

Parameters
  • oMin – Returned probe effect box min.

  • oMax – Returned probe effect box max.

virtual RED_RC SetEffectBox(const RED::Vector3 &iMin, const RED::Vector3 &iMax) = 0

Sets the probe effect box in the case of a box one.

Parameters
  • iMin – Probe effect box min.

  • iMax – Probe effect box max.

Returns

RED_OK if the method has succeeded,

RED_BAD_PARAM if the method has received an invalid parameter,

RED_FAIL otherwise.

virtual void GetFalloffBox(RED::Vector3 &oFalloffMin, RED::Vector3 &oFalloffMax) const = 0

Gets the probe falloff box in the case of a box one.

Parameters
  • oFalloffMin – Returned probe falloff box min.

  • oFalloffMax – Returned probe falloff box max.

virtual RED_RC SetFalloffBox(const RED::Vector3 &iMin, const RED::Vector3 &iMax) = 0

Sets the probe falloff box in the case of a box one.

Parameters
  • iMin – Probe falloff box min.

  • iMax – Probe falloff box max.

Returns

RED_OK if the method has succeeded,

RED_BAD_PARAM if the method has received an invalid parameter,

RED_FAIL otherwise.

virtual double GetBlendWeight() const = 0

Gets the probe blend weight.

Returns

the probe blend weight.

virtual void SetBlendWeight(double iBlendWeight) = 0

Sets the probe blend weight ]0,+inf] .

The blend weight is used at rendering. It is the importance of the probe against other probes when there volumes intersect each other.

Parameters

iBlendWeight – Probe blend weight.

virtual bool IsActive() const = 0

Tells if the probe is active or not.

Returns

true if the reflection probe is active, false otherwise.

virtual void SetActive(bool iActive) = 0

Activates or deactivates the probe.

Parameters

iActive – True to activate the probe.