RixVolumeServices Class Reference

RixVolumeServices Class Referenceabstract

#include <RixVolume.h>

Inheritance diagram for RixVolumeServices:

Public Member Functions

virtual void Begin (RixShadingContext const *sCtx)=0
 
virtual void End ()=0
 
virtual int GetDensityRanges (const RtPoint3 &pt0, const RtPoint3 &pt1, float length, float maxDensity, float **dist, float **minDensities, float **maxDensities, float *minTrans, float *maxTrans) const =0
 

Protected Attributes

RixShadingContext const * shadingCtx
 

Detailed Description

The RixVolumeServices interface allow the renderer to provide services that are useful for volume integration. Currently, these include services that bound the minimum and maximum density of a RiVolume.

Member Function Documentation

virtual int RixVolumeServices::GetDensityRanges ( const RtPoint3 &  pt0,
const RtPoint3 &  pt1,
float  length,
float  maxDensity,
float **  dist,
float **  minDensities,
float **  maxDensities,
float *  minTrans,
float *  maxTrans 
) const
pure virtual

When invoked on a shading context bound to RiVolume geometry, GetDensityRanges returns information about the minimum and maximum densities encountered on a straight line between two points in the volume. pt0 and pt1 are points in the RiVolume that must be in UVW space. length is the distance between the two points; this can be measured in any convenient space. maxDensity is a value that overrides the actual maximum density reported by the volume (the minimum of both will be used).

The return value is the number of ranges that divide the interval, implicitly starting at the first point. The output arrays are allocated by the shading context, and are all sized to the number of return ranges. dist contains the endpoint of each interval, relative to the input length. minDensities and maxDensities contain the minimum and maximum densities of each interval. minTrans and maxTrans contain lower and upper bounds on the transmissivity over the entire interval.


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