class RED::ISoftRenderingContext
Software rendering context interface. Contains global rendering parameters. More...
#include <REDISoftRenderingContext.h>
Inherits: IREDObject.
Public functions:
virtual void | GetAmbientLight ( double oAmbientLight[4] ) const = 0 |
virtual RED::Object * | GetBackground2DImage ( ) const = 0 |
virtual const RED::Matrix & | GetBackground2DImageMatrix ( ) const = 0 |
virtual RED::Object * | GetBackgroundCubeImage ( ) const = 0 |
virtual const RED::Matrix & | GetBackgroundCubeImageMatrix ( ) const = 0 |
virtual void | GetBackgroundDepth ( double & oBackgroundDepth ) const = 0 |
virtual bool | GetBackgroundImagesDirectVisibility ( ) const = 0 |
virtual double | GetBackgroundImagesIntensityScale2D ( ) const = 0 |
virtual double | GetBackgroundImagesIntensityScaleCube ( ) const = 0 |
virtual void | GetCaustics ( bool & oEnabled, unsigned int & oPhotonsCount, double & oSearchRadius, unsigned int & oSearchPhotonsCount ) const = 0 |
virtual void | GetClearColor ( double oClearColor[4] ) const = 0 |
virtual void | GetClearDepth ( double & oClearDepth ) const = 0 |
virtual void | GetGISettings ( bool & oGIEnabled, double & oGIError, double & oGlossinessThreshold, bool & oLighting, int & oEstimatorSamplingRate, int & oEstimatorInterSamplesCount, int & oCachePassesCount, int & oCacheHemiSamplesCount, int & oCacheInterpSamplesCount, double & oCacheNormalTolerance, double & oCacheDistanceTolerance, bool & oCachePrecise ) const = 0 |
virtual const RED::Matrix & | GetInvertViewingMatrix ( ) const = 0 |
virtual const RED::ISoftLight & | GetLight ( unsigned int iLight ) const = 0 |
virtual unsigned int | GetLightsCount ( ) const = 0 |
virtual double | GetPhysicalLightCutoff ( ) const = 0 |
virtual const RED::Matrix & | GetProjectionMatrix ( ) const = 0 |
virtual double | GetRayAdaptiveSamplingAllowedTime ( ) const = 0 |
virtual double | GetRayAdaptiveSamplingThreshold ( ) const = 0 |
virtual double | GetRayCutoffThreshold ( ) const = 0 |
virtual double | GetRayMaxSecondaryRayIntensity ( ) const = 0 |
virtual int | GetRayReflectionDepth ( ) const = 0 |
virtual bool | GetRayRefractionBack ( ) const = 0 |
virtual int | GetRayRefractionDepth ( ) const = 0 |
virtual int | GetRayShadowDepth ( ) const = 0 |
virtual int | GetRayTransparencyDepth ( ) const = 0 |
virtual int | GetRayVolumeDepth ( ) const = 0 |
virtual int | GetRayWorldCacheSamplesCount ( ) const = 0 |
virtual int | GetShadowMapDepth ( ) const = 0 |
virtual int | GetStateNumber ( ) const = 0 |
virtual const RED::Matrix & | GetViewingMatrix ( ) const = 0 |
virtual const RED::Matrix & | GetViewportMatrix ( ) const = 0 |
virtual const RED::Matrix & | GetViewProjectionMatrix ( ) const = 0 |
virtual const RED::Matrix & | GetViewProjectionViewportMatrix ( ) const = 0 |
virtual RED::Object * | GetVolumeShape ( ) const = 0 |
virtual RED::Object * | GetVRL ( ) const = 0 |
virtual bool | IsAreaSampling ( ) const = 0 |
virtual bool | IsBackgroundImage ( ) const = 0 |
virtual bool | IsEmissiveBackground ( ) const = 0 |
virtual bool | IsGIEnabled ( ) const = 0 |
virtual bool | IsGlossyEffects ( ) const = 0 |
virtual bool | IsRayDisplacement ( ) const = 0 |
virtual bool | IsRayForcedTransparency ( ) const = 0 |
virtual bool | IsVolumetricEffects ( ) const = 0 |
virtual int | ShowGISamples ( ) const = 0 |
Public static functions:
static RED::CID | GetClassID ( ) |
Detailed description:
Software rendering context interface. Contains global rendering parameters.
Use this interface to retrieve the values of all the engine parameters at render time.
Functions documentation
public static RED::CID RED::ISoftRenderingContext::GetClassID | ( | ) |
public virtual void RED::ISoftRenderingContext::GetAmbientLight | ( | double | oAmbientLight[4] | ) const = 0 |
Gets the color of the ambient light.
Parameters:
oAmbientLight: | The ambient light color. |
public virtual RED::Object * RED::ISoftRenderingContext::GetBackground2DImage | ( | ) const = 0 |
Retrieves the background 2D image.
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetBackground2DImageMatrix | ( | ) const = 0 |
Retrieves the background 2D image transform.
Returns:
public virtual RED::Object * RED::ISoftRenderingContext::GetBackgroundCubeImage | ( | ) const = 0 |
Retrieves the background cube image.
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetBackgroundCubeImageMatrix | ( | ) const = 0 |
Retrieves the background cube image transform.
Returns:
public virtual void RED::ISoftRenderingContext::GetBackgroundDepth | ( | double & | oBackgroundDepth | ) const = 0 |
Retrieves the depth of the background images.
The rendering of the background writes a depth value in the rendering buffer. This value is set to a constant depth, slightly below 1.0, which is the default clear depth of a rendering buffer.
Parameters:
oBackgroundDepth: | The background image rendering depth. |
public virtual bool RED::ISoftRenderingContext::GetBackgroundImagesDirectVisibility | ( | ) const = 0 |
Retrieves background images direct visibility setting.
Returns:
public virtual double RED::ISoftRenderingContext::GetBackgroundImagesIntensityScale2D | ( | ) const = 0 |
Returns:
public virtual double RED::ISoftRenderingContext::GetBackgroundImagesIntensityScaleCube | ( | ) const = 0 |
Returns:
public virtual void RED::ISoftRenderingContext::GetCaustics | ( | bool & | oEnabled, |
unsigned int & | oPhotonsCount, | ||
double & | oSearchRadius, | ||
unsigned int & | oSearchPhotonsCount | ||
) | const = 0 |
Gets the current caustics settings.
Caustics are automatically disabled as soon as the photons count or the search radius is 0 (even if the caustics are enabled at the engine level). So, the 'oEnabled' value returned by the call may not reflect the true value of the corresponding engine option (RED::OPTIONS_RAY_ENABLE_CAUSTICS).
Parameters:
oEnabled | true if caustics are enabled, false otherwise. |
oPhotonsCount | total number of requested caustics photons. |
oSearchRadius | caustics photons search radius in scene units. |
oSearchPhotonsCount | maximum number of photons to be searched for. |
public virtual void RED::ISoftRenderingContext::GetClearColor | ( | double | oClearColor[4] | ) const = 0 |
Gets the clear color.
This is the buffer clear color that was defined using RED::IViewpointRenderList::SetClearColor.
Parameters:
oClearColor: | The image clear color. |
public virtual void RED::ISoftRenderingContext::GetClearDepth | ( | double & | oClearDepth | ) const = 0 |
Gets the clear depth.
This is the buffer clear depth that was defined using RED::IViewpointRenderList::SetClearDepth.
Parameters:
oClearDepth: | The image clear depth. |
public virtual void RED::ISoftRenderingContext::GetGISettings | ( | bool & | oGIEnabled, |
double & | oGIError, | ||
double & | oGlossinessThreshold, | ||
bool & | oLighting, | ||
int & | oEstimatorSamplingRate, | ||
int & | oEstimatorInterSamplesCount, | ||
int & | oCachePassesCount, | ||
int & | oCacheHemiSamplesCount, | ||
int & | oCacheInterpSamplesCount, | ||
double & | oCacheNormalTolerance, | ||
double & | oCacheDistanceTolerance, | ||
bool & | oCachePrecise | ||
) | const = 0 |
Gets the current GI settings.
Note that GI is considered disabled, regardless of the option value being set, if we render an image using external, ready-to-use, GI caches.
Parameters:
oGIEnabled: | true if GI is enabled, false otherwise. |
oGIError: | user-defined GI error. |
oGlossinessThreshold: | the user-defined threshold for glossiness approximation using the GI cache (see RED::OPTIONS_RAY_GI_FOR_GLOSSINESS). |
oLighting: | the value of the RED::OPTIONS_RAY_GI_FOR_LIGHTING option. |
oEstimatorSamplingRate: | the number of rays traced to compute the GI estimator. |
oEstimatorInterSamplesCount: | the number of samples used during GI estimator interpolation. |
oCachePassesCount: | the number of passes to compute the irradiance cache (can be negative in convergence mode). |
oCacheHemiSamplesCount: | the hemispherical sampling rays count. |
oCacheInterpSamplesCount: | the cache interpolation count. |
oCacheNormalTolerance: | the cache normal tolerance. |
oCacheDistanceTolerance: | the cache distance tolerance. |
oCachePrecise: | the precise cache flag value. |
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetInvertViewingMatrix | ( | ) const = 0 |
Gets the inverse of the viewing transform matrix.
Returns:
public virtual const RED::ISoftLight & RED::ISoftRenderingContext::GetLight | ( | unsigned int | iLight | ) const = 0 |
Returns the requested light.
Parameters:
iLight: | index of the light to retrieve. |
Returns:
public virtual unsigned int RED::ISoftRenderingContext::GetLightsCount | ( | ) const = 0 |
Returns the number of lights.
Returns:
public virtual double RED::ISoftRenderingContext::GetPhysicalLightCutoff | ( | ) const = 0 |
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetProjectionMatrix | ( | ) const = 0 |
Gets the projection transform matrix.
The projection matrix is the camera perspective / orthographic or custom transform matrix. See RED::IViewpoint::GetProjectionMatrix for details.
Returns:
public virtual double RED::ISoftRenderingContext::GetRayAdaptiveSamplingAllowedTime | ( | ) const = 0 |
Returns:
public virtual double RED::ISoftRenderingContext::GetRayAdaptiveSamplingThreshold | ( | ) const = 0 |
Returns:
public virtual double RED::ISoftRenderingContext::GetRayCutoffThreshold | ( | ) const = 0 |
Returns:
public virtual double RED::ISoftRenderingContext::GetRayMaxSecondaryRayIntensity | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayReflectionDepth | ( | ) const = 0 |
Returns:
public virtual bool RED::ISoftRenderingContext::GetRayRefractionBack | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayRefractionDepth | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayShadowDepth | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayTransparencyDepth | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayVolumeDepth | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetRayWorldCacheSamplesCount | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetShadowMapDepth | ( | ) const = 0 |
Returns:
public virtual int RED::ISoftRenderingContext::GetStateNumber | ( | ) const = 0 |
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetViewingMatrix | ( | ) const = 0 |
Gets the viewing transform matrix (sight, top, right, eye).
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetViewportMatrix | ( | ) const = 0 |
Gets the viewport transform matrix.
The viewport transform matrix for the rendered camera. See RED::IViewpointRenderList::GetViewportMatrix for details.
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetViewProjectionMatrix | ( | ) const = 0 |
Gets the view matrix * projection matrix of the camera.
The view-projection matrix is the product of the camera projection matrix by the invert viewing matrix defined by the camera axis system. See RED::IViewpoint::GetViewProjectionMatrix for details.
Returns:
public virtual const RED::Matrix & RED::ISoftRenderingContext::GetViewProjectionViewportMatrix | ( | ) const = 0 |
Gets the viewport * view-projection transform matrix.
This method returns the viewport matrix of the camera in it's VRL multiplied by the view-projection matrix of the camera. This is the complete transform applied to a (x,y,z,1) position in space to get to a screen (x,y,z,w) coordinate.
The method returns non normalized coordinates (e.g. full screen coordinates). The RED::ISoftRenderingContext::GetViewProjectionMatrix transforms a point into normalized coordinates before the application of the viewport transform.
For all details on the REDsdk transformation pipeline, please refer to Matrix transforms in a cluster.
Returns:
public virtual RED::Object * RED::ISoftRenderingContext::GetVolumeShape | ( | ) const = 0 |
Retrieves the volume shape of our scene if any.
Returns:
public virtual RED::Object * RED::ISoftRenderingContext::GetVRL | ( | ) const = 0 |
Gets the source VRL hosting our rendered camera.
Returns:
public virtual bool RED::ISoftRenderingContext::IsAreaSampling | ( | ) const = 0 |
Returns:
public virtual bool RED::ISoftRenderingContext::IsBackgroundImage | ( | ) const = 0 |
Do we have a background image to handle?
Returns:
public virtual bool RED::ISoftRenderingContext::IsEmissiveBackground | ( | ) const = 0 |
Do we consider the background as emitting energy?
We have an emissive background if our scene contains an emissive skylight which is set to be emissive using RED::ISkyLightShape::SetEmissiveSky.
Returns:
public virtual bool RED::ISoftRenderingContext::IsGIEnabled | ( | ) const = 0 |
Return true if GI is enabled.
Note that GI is considered disabled, regardless of the option value being set, if we render an image using external, ready-to-use, GI caches.
Returns:
public virtual bool RED::ISoftRenderingContext::IsGlossyEffects | ( | ) const = 0 |
Returns:
public virtual bool RED::ISoftRenderingContext::IsRayDisplacement | ( | ) const = 0 |
Returns:
public virtual bool RED::ISoftRenderingContext::IsRayForcedTransparency | ( | ) const = 0 |
Returns:
public virtual bool RED::ISoftRenderingContext::IsVolumetricEffects | ( | ) const = 0 |
Do we have volumetric effects in the rendering of our scene?
Returns:
public virtual int RED::ISoftRenderingContext::ShowGISamples | ( | ) const = 0 |
Do we want to show the GI samples?
The returned value is defined by the RED::OPTIONS_RAY_GI_SHOW_SAMPLES option.
Returns: