RenderManAPI  24.0
RixIntegrator Class Referenceabstract

#include <RixIntegrator.h>

Public Member Functions

virtual void RenderBegin (RixContext &rCtx, RixIntegratorEnvironment &rixIntegratorEnv, RixParameterList const *rixParameterList)=0
 RenderBegin() and RenderEnd()` bound a rendering session. More...
 
virtual void RenderEnd (RixContext &ctx)=0
 
virtual void Synchronize (RixContext &rCtx, RixSCSyncMsg rixSCSyncMsg, RixParameterList const *rixParameterList)
 Synchronize() is used to occasionally deliver status information from the renderer. More...
 
virtual void IntegrateRays (RixBXLobeTraits const &lobesWanted, int *numShadingCtxs, RixShadingContext const **shadingCtxs, RixIntegratorContext &iCtx)
 IntegrateRays() is the primary entry point for this class. More...
 
virtual void Integrate (int numShadingCtxs, RixShadingContext const *shadingCtxs[], RixIntegratorContext &iCtx)=0
 Integrate() is a secondary entry point for this class. More...
 
virtual void GetTransmission (int nRays, RtRayGeometry const *rays, RtColorRGB *transmissions, RtColorRGB *volumeEmissions, RtUString const subset, RtUString const excludeSubset, RixIntegratorContext &iCtx)
 The GetTransmission() method will only be called if the integrator has set the wantsTransmission field to true in the RixIntegratorEnvironment object given to RenderBegin(). More...
 
virtual bool GetProperty (RixIntegratorContext &iCtx, const int *rayIds, int nRays, RayProperty rayProperty, void const *results)
 Allows for retrieving ray properties. More...
 
virtual bool SetProperty (RixIntegratorContext &iCtx, const int *rayIds, int nRays, RayProperty rayProperty, void const *values)
 Allows for retrieving ray properties. More...
 

Protected Member Functions

virtual ~RixIntegrator ()
 

Constructor & Destructor Documentation

◆ ~RixIntegrator()

virtual RixIntegrator::~RixIntegrator ( )
inlineprotectedvirtual

Member Function Documentation

◆ GetProperty()

virtual bool RixIntegrator::GetProperty ( RixIntegratorContext iCtx,
const int *  rayIds,
int  nRays,
RayProperty  rayProperty,
void const *  results 
)
inlinevirtual

Allows for retrieving ray properties.

The integrator is expected to fill in the appropriate values.

The caller of GetProperty() is responsible for allocating memory for the results. The results array needs to be of size nRays and of appropriate size for the type associated with the required property. Caller should check the return value as it indicates whether or not valid results are obtained.

Parameters
[in]iCtxThe RixIntegratorContext containing the primary rays to be processed.
[in]rayIdsRay ids. Array of size nRays.
[in]nRaysNumber of rays for which the property is queried.
[in]rayPropertyRay property being retrieved.
[out]resultsArray of size nRays in which to write the ray property values.

References PIXAR_ARGUSED.

◆ GetTransmission()

virtual void RixIntegrator::GetTransmission ( int  nRays,
RtRayGeometry const *  rays,
RtColorRGB transmissions,
RtColorRGB volumeEmissions,
RtUString const  subset,
RtUString const  excludeSubset,
RixIntegratorContext iCtx 
)
inlinevirtual

The GetTransmission() method will only be called if the integrator has set the wantsTransmission field to true in the RixIntegratorEnvironment object given to RenderBegin().

This method is called by the renderer for transmission rays that have not already been considered fully opaque, and allows the integrator to account for other sources of transmission that may not be otherwise known to the renderer. The default implementation does nothing.

Its parameters mirror the ones from RixIntegratorContext::GetTransmission(), with the following exception:

Parameters
[in,out]transmissionsContains the ray transmissions from sources already known to the renderer. Must return the ray transmissions from additional sources.

References PIXAR_ARGUSED.

◆ Integrate()

virtual void RixIntegrator::Integrate ( int  numShadingCtxs,
RixShadingContext const *  shadingCtxs[],
RixIntegratorContext iCtx 
)
pure virtual

Integrate() is a secondary entry point for this class.

The shading contexts passed to this routine are shading contexts resulting from tracing primary rays (usually by the default implementation of IntegrateRays(), but may potentially come via some other rendering technique). Integrators are required to splat the radiance (corresponding to each primary ray) to the screen by using the RixDisplayServices.

Parameters
[in]numShadingCtxsNumber of shading contexts.
[in]shadingCtxsA pointer to an array of size 'numShadingCtxs'.
[in]iCtxThe RixIntegratorContext containing the primary rays to be processed.

Referenced by IntegrateRays().

◆ IntegrateRays()

virtual void RixIntegrator::IntegrateRays ( RixBXLobeTraits const &  lobesWanted,
int *  numShadingCtxs,
RixShadingContext const **  shadingCtxs,
RixIntegratorContext iCtx 
)
inlinevirtual

IntegrateRays() is the primary entry point for this class.

This routine is expected to trace the list of primary rays delivered through the RixIntegratorContext. The default implementation simply calls GetNearestHits() to trace those primary rays, and passes the results to Integrate(), which is the secondary entry point for this class.

Parameters
[in]lobesWantedProvides a restriction on the lobes that should be considered when computing shading on the primary ray hits. Single value used for all primary rays.
[out]numShadingCtxsNumber of shading contexts effectively returned in shadingCtxs, resulting from tracing the primary rays. Generally, this will come directly from the call to GetNearestHits().
[out]shadingCtxsA pointer to an array of size at least 'iCtx.numRays' (since it is possible each ray hit will yield its own shading context).
[in]iCtxThe RixIntegratorContext containing the primary rays to be processed.

References RixShadingContext::GetBuiltinVar(), RixIntegratorContext::GetDisplayServices(), RixIntegratorContext::GetNearestHits(), Integrate(), RixShadingContext::integratorCtxIndex, RixIntegratorContext::k_Primary, RtRayGeometry::k_rtCamera, k_SidesFront, RixShadingContext::k_VLen, RixIntegratorContext::numActiveRays, RixShadingContext::numPts, RixIntegratorContext::primaryRays, US_NULL, and RixDisplayServices::WriteDistance().

◆ RenderBegin()

virtual void RixIntegrator::RenderBegin ( RixContext rCtx,
RixIntegratorEnvironment rixIntegratorEnv,
RixParameterList const *  rixParameterList 
)
pure virtual

RenderBegin() and RenderEnd()` bound a rendering session.

They are called in the primary thread.

Parameters
[in]rCtxAllows the integrator to retrieve various RixInterfaces.
[in,out]rixIntegratorEnvAllows the integrator to introspect the rendering environment. Additionally, allows the integrator to communicate some requirements back to the renderer.
rixParameterListUser provided integrator parameters.

◆ RenderEnd()

virtual void RixIntegrator::RenderEnd ( RixContext ctx)
pure virtual

◆ SetProperty()

virtual bool RixIntegrator::SetProperty ( RixIntegratorContext iCtx,
const int *  rayIds,
int  nRays,
RayProperty  rayProperty,
void const *  values 
)
inlinevirtual

Allows for retrieving ray properties.

The integrator is expected to fill in the appropriate values.

The caller of SetProperty() is responsible for allocating memory for the results (which means it needs to be aware of the data type associated with the given property). Caller should check the return value as it indicates whether or not valid results are obtained.

The caller of GetProperty() is responsible for allocating memory for the results. The values array needs to be of size nRays and of appropriate size for the type associated with the required property. Caller should check the return value as it indicates whether or not the property has been properly set.

Parameters
[in]iCtxThe RixIntegratorContext containing the primary rays to be processed.
[in]rayIdsRay ids. Array of size nRays.
[in]nRaysNumber of rays for which the property is queried.
[in]rayPropertyRay property being retrieved.
[in]valuesArray of size nRays containing the ray property values.

References PIXAR_ARGUSED.

◆ Synchronize()

virtual void RixIntegrator::Synchronize ( RixContext rCtx,
RixSCSyncMsg  rixSCSyncMsg,
RixParameterList const *  rixParameterList 
)
inlinevirtual

Synchronize() is used to occasionally deliver status information from the renderer.

The contents of rixParameterList depend upon the rixSCSyncMessage value.

During rerendering, the parameter list may contain updated integrator parameter values. Increment messages may deliver details about the increment in the parameter list.

This method is optional and the default implementation ignores all events.

References PIXAR_ARGUSED.


The documentation for this class was generated from the following file: