RenderManAPI  24.0
RixVolumeAggregate Class Referenceabstract

#include <RixVolume.h>

Public Member Functions

virtual ~RixVolumeAggregate ()
 
virtual RixVolumeAggregateIteratorCreateIterator (int index)=0
 Creates a new iterator bound to the ray indicated by index. More...
 
virtual void ComputeDensity (RixVolumeAggregateIterator **iterators, float *densities)=0
 Given a set of iterators, computes the volume aggregate densities at each iterator's current distance. More...
 
virtual void ComputeEmission (RixVolumeAggregateIterator **iterators, RtColorRGB *emissions)=0
 Given a set of iterators, computes the volume aggregate emissions at each iterator's current distance. More...
 
virtual void CreateScatterContexts (RixVolumeAggregateIterator **iterators, int *numShadingContexts, RixShadingContext **shadingContexts)=0
 Given a set of iterators, creates a set of shading contexts that can be used to compute volumetric scattering at each iterator's current distance. More...
 
virtual void CreateScatterContexts (RixShadingContext const *parentContext, RixVolumeAggregateIterator **iterators, int *numShadingContexts, RixShadingContext **shadingContexts)=0
 Same as above, but allows for an explicit parent context to be specified. More...
 
virtual void ReleaseScatterContexts (int numShadingContexts, RixShadingContext **shadingContexts, RixBXLobeTraits const *exposeVol=NULL, int **memberships=NULL, int *numNewShadingContexts=NULL, RixShadingContext const **newShadingContexts=NULL)=0
 Releases shading contexts created by a call to CreateScatterContexts. More...
 
virtual void GenerateLightSamples (RixVolumeAggregateIterator **iterators, RixRNG *rng, RixLightingServices *lightingServices, float *maxDistances, RtPoint3 *positions, bool *sampleFailed)=0
 Asks the given lighting services to generate a set of light sampling locations given the current position of the iterator in the volume. More...
 
virtual void ComputeDensity (RixVolumeAggregateIterator **iterators, RtColorRGB *densities)=0
 Given a set of iterators, computes the volume aggregate densities at each iterator's current distance. More...
 
virtual bool SetProperty (VolumeAggregateProperty, void const *in)=0
 Sets various desired properties of the volume aggregate. More...
 
virtual RixVolumeIrradianceEstimateContextCreateIrradianceEstimateContext ()=0
 Create a query context for use by the add and service functions below. More...
 
virtual void AddToIrradianceQueries (RixVolumeAggregateIterator *iterator, int stepNum, RixVolumeIrradianceEstimateContext *queryContext)=0
 Take the points in space referenced by the iterators' current states and add them to the query context. More...
 
virtual void ServiceIrradianceQueries (RixVolumeIrradianceEstimateContext *queryContext, RixLightingServices *lightingServices, float *estimates, float *confidences)=0
 Return an estimate of the irridiance incident on the points accumulated in the query context. More...
 

Constructor & Destructor Documentation

◆ ~RixVolumeAggregate()

virtual RixVolumeAggregate::~RixVolumeAggregate ( )
inlinevirtual

Member Function Documentation

◆ AddToIrradianceQueries()

virtual void RixVolumeAggregate::AddToIrradianceQueries ( RixVolumeAggregateIterator iterator,
int  stepNum,
RixVolumeIrradianceEstimateContext queryContext 
)
pure virtual

Take the points in space referenced by the iterators' current states and add them to the query context.

This is used to batch up a large number of queries of several samples across several rays and several volumes, so that all queries can be evaluated efficiently

◆ ComputeDensity() [1/2]

virtual void RixVolumeAggregate::ComputeDensity ( RixVolumeAggregateIterator **  iterators,
float *  densities 
)
pure virtual

Given a set of iterators, computes the volume aggregate densities at each iterator's current distance.

It is expected that the number of iterators is equal to the number of rays used to create the volume aggregate object (from the call to RixVolumeServices::GetAggregate). Returns monochromatic density.

◆ ComputeDensity() [2/2]

virtual void RixVolumeAggregate::ComputeDensity ( RixVolumeAggregateIterator **  iterators,
RtColorRGB densities 
)
pure virtual

Given a set of iterators, computes the volume aggregate densities at each iterator's current distance.

It is expected that the number of iterators is equal to the number of rays used to create the volume aggregate object (from the call to RixVolumeServices::GetAggregate). Returns polychromatic density.

◆ ComputeEmission()

virtual void RixVolumeAggregate::ComputeEmission ( RixVolumeAggregateIterator **  iterators,
RtColorRGB emissions 
)
pure virtual

Given a set of iterators, computes the volume aggregate emissions at each iterator's current distance.

It is expected that the number of iterators is equal to the number of rays used to create the volume aggregate object (from the call to RixVolumeServices::GetAggregate).

◆ CreateIrradianceEstimateContext()

virtual RixVolumeIrradianceEstimateContext* RixVolumeAggregate::CreateIrradianceEstimateContext ( )
pure virtual

Create a query context for use by the add and service functions below.

◆ CreateIterator()

virtual RixVolumeAggregateIterator* RixVolumeAggregate::CreateIterator ( int  index)
pure virtual

Creates a new iterator bound to the ray indicated by index.

Multiple iterators can be created that are bound to the same ray. All iterators created with this interface should be released by a call to delete.

◆ CreateScatterContexts() [1/2]

virtual void RixVolumeAggregate::CreateScatterContexts ( RixVolumeAggregateIterator **  iterators,
int *  numShadingContexts,
RixShadingContext **  shadingContexts 
)
pure virtual

Given a set of iterators, creates a set of shading contexts that can be used to compute volumetric scattering at each iterator's current distance.

It is expected that the number of iterators is equal to the number of rays used to create the volume aggregate object (from the call to RixVolumeServices::GetAggregate). These shading contexts are to be considered transient and are valid only for the duration of the RixVolumeAggregate object. Shading contexts that are created by this call must be released back to the system by a call to RixVolumeAggregate::ReleaseScatterContexts.

◆ CreateScatterContexts() [2/2]

virtual void RixVolumeAggregate::CreateScatterContexts ( RixShadingContext const *  parentContext,
RixVolumeAggregateIterator **  iterators,
int *  numShadingContexts,
RixShadingContext **  shadingContexts 
)
pure virtual

Same as above, but allows for an explicit parent context to be specified.

This situation is needed in order to correctly bind any volume interior integrators that may be used in conjunction with the volume aggregate.

◆ GenerateLightSamples()

virtual void RixVolumeAggregate::GenerateLightSamples ( RixVolumeAggregateIterator **  iterators,
RixRNG rng,
RixLightingServices lightingServices,
float *  maxDistances,
RtPoint3 positions,
bool *  sampleFailed 
)
pure virtual

Asks the given lighting services to generate a set of light sampling locations given the current position of the iterator in the volume.

If the lighting services fails to generate a sample, sampleFailed for the corresponding ray is set to true and the position is uninitialized. maxDistances, if non-null, is the maximum distance a light can be away from the ray segment and still considered a valid candidate.

◆ ReleaseScatterContexts()

virtual void RixVolumeAggregate::ReleaseScatterContexts ( int  numShadingContexts,
RixShadingContext **  shadingContexts,
RixBXLobeTraits const *  exposeVol = NULL,
int **  memberships = NULL,
int *  numNewShadingContexts = NULL,
RixShadingContext const **  newShadingContexts = NULL 
)
pure virtual

Releases shading contexts created by a call to CreateScatterContexts.

If the optional parameters exposeVol, memberships, numNewShadingContexts, and newShadingContexts are not set, the shading contexts are simply freed. Otherwise, a new set of shading contexts is created which can be retained past the lifetime of the RixVolumeAggregate object.

◆ ServiceIrradianceQueries()

virtual void RixVolumeAggregate::ServiceIrradianceQueries ( RixVolumeIrradianceEstimateContext queryContext,
RixLightingServices lightingServices,
float *  estimates,
float *  confidences 
)
pure virtual

Return an estimate of the irridiance incident on the points accumulated in the query context.

◆ SetProperty()

virtual bool RixVolumeAggregate::SetProperty ( VolumeAggregateProperty  ,
void const *  in 
)
pure virtual

Sets various desired properties of the volume aggregate.


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