RenderMan API
23.0
|
#include <RixIntegrator.h>
Public Types | |
enum | NearestHitFlags { k_None = 0, k_Primary = 1, k_IncludeMisses = 2, k_ConstrainToVolume = 4, k_ContinuationOpacity = 8, k_SkipVolumes = 0x10 } |
enum | MemCategory { k_IntegratorMem } |
Public Member Functions | |
virtual RixDisplayServices * | GetDisplayServices (int version=1) const =0 |
virtual RixLightingServices * | GetLightingServices (int version=1) const =0 |
virtual RixVolumeServices * | GetVolumeServices (int version=1) const =0 |
virtual RixRefCntPtr< RixLPE > | GetRixLPE (int version=1) const =0 |
virtual RixIntegratorEnvironment const & | GetEnv (int version=1) const =0 |
virtual void | GetNearestHits (int nRays, RtRayGeometry const *rays, RixBXLobeTraits const &lobesWanted, RtRayGeometry::RayType rayType, int nearestHitFlags, RtUString const subset, RtUString const excludeSubset, RtHitSides hitSides, int *numShadingCtxs, RixShadingContext const **shadingCtxs)=0 |
virtual void | GetNearestHits (int nRays, RtRayGeometry const *rays, RtRayGeometry::RayType rayType, int nearestHitFlags, RtUString const subset, RtUString const excludeSubset, RtHitSides hitSides, RtHitPoint *hits)=0 |
virtual void | GetNearestHits (int nRays, RtRayGeometry const *rays, RixBXLobeTraits const &lobesWanted, bool wantsMisses, 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, bool isVolume=false, bool stochasticMode=true) |
virtual void | GetNearestHits (int nRays, RtRayGeometry const *rays, RtHitPoint *hits, RtUString const subset=US_NULL, RtUString const excludeSubset=US_NULL, RtHitSides hitSides=k_SidesBoth, bool isPrimary=false, bool isVolume=false, bool stochasticMode=true) |
virtual void | GetTransmission (int nRays, RtRayGeometry const *rays, RtColorRGB *transmissions, RtColorRGB *volumeEmissions, RtUString const subset=US_NULL, RtUString const excludeSubset=US_NULL)=0 |
virtual void | ReleaseShadingContexts (int numShadingCtxs, RixShadingContext const **shadingCtxs)=0 |
virtual void * | Allocate (size_t nObjs, size_t objSize, MemCategory)=0 |
template<class T > | |
T * | Allocate (size_t nObjs) |
template<class T > | |
T * | New (size_t nObjs) |
Public Member Functions inherited from RixContext | |
virtual RixInterface * | GetRixInterface (RixInterfaceId id) const =0 |
virtual | ~RixContext () |
Destructor is for internal use only. More... | |
Public Attributes | |
int | integratorCtxId |
int | numRays |
Unique identifier for integrator context. More... | |
int | numActiveRays |
RtRayGeometry * | primaryRays |
The primary camera rays. More... | |
RixRNG * | rngCtx |
A pointer to single RixRNG object, properly configured for numRays samples. More... | |
float * | time |
Protected Member Functions | |
virtual | ~RixIntegratorContext () |
Definition at line 594 of file RixIntegrator.h.
Allocate()
and New()
are utility (fully inlined and templated) methods to assist with memory management tasks associated with the memory pool of the RixIntegratorContext
. Use Allocate()
for raw allocations, New()
for allocations with default construction.
Usage: RtColorRGB *result = iCtx->Allocate<RtColorRGB>(100);
Enumerator | |
---|---|
k_IntegratorMem |
Definition at line 860 of file RixIntegrator.h.
Definition at line 617 of file RixIntegrator.h.
|
inlineprotectedvirtual |
Definition at line 880 of file RixIntegrator.h.
|
pure virtual |
|
inline |
Definition at line 867 of file RixIntegrator.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
This version of GetNearestHits()
returns ray hits in the form of a list of RixShadingContext
. These shading contexts represent a collection of points which have had their associated Bxdfs fully executed and set up for sample evaluation and generation. Since a Bxdf evaluation may trigger an upstream evaluation of all input patterns, this version of the call is considered to be very expensive as it invokes full shading.
[in] | nRays | Number of rays to trace. Cannot be larger than RixIntegratorContext::k_MaxRaysPerBatch. |
[in] | rays | The rays to trace. Array of size nRays . |
[in] | lobesWanted | The lobesWanted that will be given to RixBxdf::BeginScatter() when setting up the bxdf for the ray hits. |
[in] | rayType | The type of the ray that should be fired. Primarily used for visibility testing of the geometry. |
[in] | nearestHitFlags | |
[in] | subset | The method will only yield hits on objects whose group membership matches subset . |
[in] | excludeSubset | The method will ignore hits on objects whose group membership matches excludeSubset . |
[in] | hitSides | The method will only yields hits on the indicated side of objects. |
[out] | numShadingCtxs | Number of shading contexts effectively returned in shadingCtxs . |
[out] | shadingCtxs | A pointer to an array of size at least 'nRays' (since it is possible each ray hit will yield a unique shading context). |
|
pure virtual |
This version of GetNearestHits()
returns ray hits in the form of a list of RtHitGeometry
. No shading contexts are set up in this routine, and only information about the geometric locale is returned. This version of the call is preferred if no shading needs to be performed, such as in the case of an occlusion-only integrator.
[in] | nRays | Number of rays to trace. Cannot be larger than RixIntegratorContext::k_MaxRaysPerBatch. |
[in] | rays | The rays to trace. Array of size nRays . |
[in] | rayType | The type of the ray that should be fired. Primarily used for visibility testing of the geometry. |
[in] | nearestHitFlags | |
[in] | subset | The method will only yield hits on objects whose group membership matches subset . |
[in] | excludeSubset | The method will ignore hits on objects whose group membership matches excludeSubset . |
[in] | hitSides | The method will only yields hits on the indicated side of objects. |
[out] | hits | Resulting ray hits from tracing rays. |
|
inlinevirtual |
GetNearestHits()
returns ray hits in the form of a list of RixShadingContext
. These shading contexts represent a collection of points which have had their associated Bxdfs fully executed and set up for sample evaluation and generation. Since a Bxdf evaluation may trigger an upstream evaluation of all input patterns, this version of the call is considered to be very expensive as it invokes full shading.[in] | nRays | Number of rays to trace. Cannot be larger than RixIntegratorContext::k_MaxRaysPerBatch. |
[in] | rays | The rays to trace. Array of size nRays . |
[in] | lobesWanted | The lobesWanted that will be given to RixBxdf::BeginScatter() when setting up the bxdf for the ray hits. |
[in] | wantsMisses | Indicates if the caller wants the method to return 'empty' shading contexts for ray misses. |
[out] | numShadingCtxs | Number of shading contexts effectively returned in shadingCtxs . |
[out] | shadingCtxs | A pointer to an array of size at least 'nRays' (since it is possible each ray hit will yield a unique shading context). |
[in] | subset | The method will only yield hits on objects whose group membership matches subset . Optional. |
[in] | excludeSubset | The method will ignore hits on objects whose group membership matches excludeSubset . Optional. |
[in] | isLightPath | Indicates if the rays are associated with a light path. Optional. |
[in] | hitSides | The method will only yields hits on the indicated side of objects. Optional. |
[in] | isPrimary | Indicate if the ray should be considered as a primary ray or a continuation of one, uninterrupted from the camera or a light source |
[in] | isVolume | Indicates if the rays should not hit anything beyond the local volume. Optional |
[in] | stochasticMode | Optional. |
Definition at line 757 of file RixIntegrator.h.
|
inlinevirtual |
GetNearestHits()
returns ray hits in the form of a list of RtHitGeometry
. No shading contexts are set up in this routine, and only information about the geometric locale is returned. This version of the call is preferred if no shading needs to be performed, such as in the case of an occlusion-only integrator. Definition at line 791 of file RixIntegrator.h.
|
pure virtual |
|
pure virtual |
GetTransmission()
can be invoked by an integrator to compute the transmittance between two points in space. This is of use for bidirectional path tracing algorithms where the transmittance between vertex connections needs to be computed. It may also be used for computing shadow rays if the lighting services cannot be used for this purpose for some reason.
RixLightingServices
are able to deal with transmission rays associated with direct lighting samples (if required) so simple unidirectional path tracers may have no need for this call.
The isVolume
flag can be optionally set by a volume integrator to constrain the results to the bounds of a volume.
[in] | nRays | Number of rays to trace. Cannot be larger than RixIntegratorContext::k_MaxRaysPerBatch. |
[in] | rays | The rays to trace. Array of size nRays . |
[out] | transmissions | Transmission between each ray origin and corresponding hit point. |
[out] | volumeEmissions | Emission due to participating media between each ray origin and corresponding hit point. |
|
pure virtual |
|
inline |
Definition at line 873 of file RixIntegrator.h.
|
pure virtual |
ReleaseShadingContexts()
must be called to release the shading contexts created via GetNearestHits()
. Shading contexts should not be released until after rays that originate from them have been traced.
[in] | numShadingCtxs | Number of shading contexts. |
[in] | shadingCtxs | A pointer to an array of size 'numShadingCtxs'. |
int RixIntegratorContext::integratorCtxId |
Definition at line 597 of file RixIntegrator.h.
int RixIntegratorContext::numActiveRays |
Size of the primaryRays
array. May be less than numRays
if the integrator sets wantsEmptyIntegrate
and adaptive sampling is on. There will then be numRays
rays in primaryRays
, but only the first numActiveRays
are considered still relevant by the adaptive sampler.
Definition at line 602 of file RixIntegrator.h.
int RixIntegratorContext::numRays |
Unique identifier for integrator context.
Definition at line 598 of file RixIntegrator.h.
RtRayGeometry* RixIntegratorContext::primaryRays |
The primary camera rays.
Definition at line 604 of file RixIntegrator.h.
RixRNG* RixIntegratorContext::rngCtx |
A pointer to single RixRNG object, properly configured for numRays
samples.
Definition at line 606 of file RixIntegrator.h.
float* RixIntegratorContext::time |
Shutter-normalized times associated with each ray. Array of size numRays
. Values range from 0 (meaning shutter opening time) to 1 (meaning shutter closing time).
Definition at line 609 of file RixIntegrator.h.