RixVolumeIntegrators can be obtained from the BxdfFactory at the hit point where a ray enters an interior region.
More...
|
| RixVolumeIntegrator (RixShadingContext const *sCtx, RixBxdfFactory *f, void *_instanceData) |
|
virtual | ~RixVolumeIntegrator () |
|
RixShadingContext const * | GetShadingCtx () const |
| Interfaces to obtain the shading context is slightly different for volume integrators compared with bxdfs. More...
|
|
RixShadingContext * | GetVolumeShadingCtx () const |
| Interfaces to obtain the shading context is slightly different for volume integrators compared with bxdfs. More...
|
|
RixBxdfFactory * | GetBxdfFactory () const |
|
void | SetBxdfFactory (RixBxdfFactory *factory) |
| This method should be used with caution. More...
|
|
void * | GetInstanceData () const |
|
void | SetInstanceData (void *data) |
| This method should be used with caution. More...
|
|
virtual void | SetParameters (void const *subclassParams) |
|
virtual void | Release () |
|
virtual RixSCDetail | GetProperty (VolumeProperty, void const **) const |
| Volumes can be queried for general material properties to facilitate integration tasks. More...
|
|
RixShadingContext * | BeginVolumeSampling () |
| BeginVolumeSampling can be called by a volume integrator to obtain a mutable shading context for the purposes of sampling its volume region. More...
|
|
RixShadingContext const * | EndVolumeSampling (RixBXLobeTraits const *exposeVol=NULL, int const *membership=NULL) |
|
virtual void | GetNearestHits (int numRays, RtRayGeometry const *rays, RixRNG *rng, RixBXLobeTraits const &lobesWanted, RixIntegratorContext &iCtx, RixLightingServices *lightingServices, IntegratorDelegate *lcb, int *numShadingCtxs, RixShadingContext const **shadingCtxs, RtUString const subset=US_NULL, RtUString const excludeSubset=US_NULL, bool isLightPath=false, RtHitSides hitSides=k_SidesBoth, bool isPrimary=false)=0 |
|
virtual void | GetTransmission (int numRays, RtRayGeometry const *rays, RixRNG *rng, RixIntegratorContext &iCtx, RtColorRGB *transmissions, RtColorRGB *emission, RtUString const subset=US_NULL, RtUString const excludeSubset=US_NULL) |
| We provide a default implementation of GetTransmission because some volume integrators may be opaque to transmission rays. More...
|
|
RixVolumeIntegrators can be obtained from the BxdfFactory at the hit point where a ray enters an interior region.
A VolumeIntegrator can be seen as a delegate for the real IntegratorCtx that implements special behavior behind the GetNearestHits and GetTransmission methods. The idea is that the integration complexity in a volume region can be hidden from the outside world by reducing more complex light-paths into a single measurement of energy thruput, transmission, coupled with potentially distinct shading contexts to capture light transfer into the volume region. VolumeIntegrators can either be built-in or compiled-in to a bxdf. In the former case, a reference to an instance of a VolumeIntegrator should be obtained from the RixShadingContext. To support pre-constructed builtin VolumeIntegrators we offer a generic method to pass instance parameters to the integrator. Typically builtin VolumeIntegrators define a struct comprised of the parameters it requires from the enclosing bxdf factory. The memory for (and evaluation of) the parameters is the responsibility of the enclosing bxdf. This extra dance is required to diminish the likelihood of disruption caused by the addition of new parameters by plugin/builtin volume integrators. In the direct-linked case clients can bypass the SetParameters convenience routines in favor of direct constructor.
BeginVolumeSampling can be called by a volume integrator to obtain a mutable shading context for the purposes of sampling its volume region.
The resulting shading context has the same size as its creator context. Two options for cleanup are offered. If the volume integrator wishes to expose/publicize a new shading context to the primary integrator, it should set exposeVol to a non-NULL RixBXLobeTraits pointer (which usually points to the same RixBXLobeTraits passed to the interior's GetNearestHits method). The optional membership array can be used to communicate the subset of points on the current shading context that should be conveyed to the new one. A non-zero value signals the membership request in a new context. If NULL, all points will be used to construct a new shading context. In this usage, the return result will be a distinct shading context appropriate for use by the primary integrator. If exposeVol is NULL, the the result is NULL and internal volume sampling state is released.
References RixShadingContext::BeginVolumeSampling(), and GetShadingCtx().
Interfaces to obtain the shading context is slightly different for volume integrators compared with bxdfs.
There are two contexts for shading contexts; one representing the volume "surface" (the interface for the volume) and one for the volume interior. The surface context can be obtained by using GetShadingCtx. The returned context can never be NULL. To obtain a shading context for volume interiors, use GetVolumeShadingCtx.
Referenced by BeginVolumeSampling(), and EndVolumeSampling().