![]() |
RenderMan
26.0
|
#include <RixIntegrator.h>
Inherits RixContext.
Public Types | |
enum | NearestHitFlags { k_None = 0, k_Primary = 0x01, k_IncludeMisses = 0x02, k_ConstrainToVolume = 0x04, k_ContinuationOpacity = 0x08, k_SkipVolumes = 0x10, k_Reserved1 = 0x20 } |
enum | MemCategory { k_IntegratorMem } |
Allocate() and New() are utility (fully inlined and templated) methods to assist with memory management tasks associated with the memory pool of the RixIntegratorContext . More... | |
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 |
This version of GetNearestHits() returns ray hits in the form of a list of RixShadingContext . More... | |
virtual void | GetNearestHits (int nRays, RtRayGeometry const *rays, RtRayGeometry::RayType rayType, int nearestHitFlags, RtUString const subset, RtUString const excludeSubset, RtHitSides hitSides, RtHitPoint *hits)=0 |
This version of GetNearestHits() returns ray hits in the form of a list of RtHitPoint . More... | |
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 |
GetTransmission() can be invoked by an integrator to compute the transmittance between two points in space. More... | |
virtual void | ReleaseShadingContexts (int numShadingCtxs, RixShadingContext const **shadingCtxs)=0 |
ReleaseShadingContexts() must be called to release the shading contexts created via GetNearestHits() . More... | |
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) |
virtual RixInterface * | GetRixInterface (RixInterfaceId id) const =0 |
Get the specified interface from this context. More... | |
Public Attributes | |
int | integratorCtxId |
int | numRays |
Unique identifier for integrator context. More... | |
int | numActiveRays |
Size of the primaryRays array. More... | |
RtRayGeometry * | primaryRays |
The primary camera rays. More... | |
RixRNG * | rngCtx |
A pointer to single RixRNG object, properly configured for numRays samples. More... | |
float * | time |
Shutter-normalized times associated with each ray. More... | |
Protected Member Functions | |
~RixIntegratorContext () override | |
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 |
|
inlineoverrideprotected |
|
pure virtual |
|
inline |
|
pure virtual |
Referenced by RixIntegrator::IntegrateRays().
|
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). |
Referenced by RixIntegrator::IntegrateRays().
|
pure virtual |
This version of GetNearestHits()
returns ray hits in the form of a list of RtHitPoint
.
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. |
References RtRayGeometry::k_rtCamera, RtRayGeometry::k_rtIndirect, and RtRayGeometry::k_rtLight.
|
inlinevirtual |
GetNearestHits()
returns ray hits in the form of a list of RtHitPoint
. 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. References RtRayGeometry::k_rtCamera, and RtRayGeometry::k_rtIndirect.
|
pure virtualinherited |
Get the specified interface from this context.
The generic interface that is returned must be cast to the appropriate type before use.
Referenced by RixIES::ReadIESProfile(), RixBXLookupLobeByName(), RixDebugBasis(), RixGetSceneColorSpace(), RixIsHoldout(), and RixIsMatte().
|
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. |
[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. |
|
pure virtual |
|
inline |
|
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 |
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.
Referenced by RixIntegrator::IntegrateRays().
int RixIntegratorContext::numRays |
Unique identifier for integrator context.
RtRayGeometry* RixIntegratorContext::primaryRays |
The primary camera rays.
Referenced by RixIntegrator::IntegrateRays().
RixRNG* RixIntegratorContext::rngCtx |
A pointer to single RixRNG object, properly configured for numRays
samples.
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).