RenderManAPI  24.0
RixSampleFilterContext Class Referenceabstract

#include <RixSampleFilter.h>

Inherits RixContext.

Public Member Functions

virtual bool Read (RixChannelId id, int sample, RtColorRGB &value) const =0
 Read and write access to sample data. More...
 
virtual bool Read (RixChannelId id, int sample, float &value) const =0
 
virtual bool Read (RixChannelId id, int sample, int &value) const =0
 
virtual bool Write (RixChannelId id, int sample, RtColorRGB value)=0
 
virtual bool Write (RixChannelId id, int sample, float value)=0
 
virtual bool Write (RixChannelId id, int sample, int value)=0
 
virtual bool ReadRegion (RixChannelId id, int regionMinX, int regionMaxX, int regionMinY, int regionMaxY, RtColorRGB *values) const =0
 Read a completely arbitrary rectangular region of pixels into a user-provided buffer. More...
 
virtual bool ReadRegion (RixChannelId id, int regionMinX, int regionMaxX, int regionMinY, int regionMaxY, float *values) const =0
 
virtual int GetAttribute (int sample, RtUString const name, void *result, int resultLen, RixInterface::Type *resultType, int *resultCount) const =0
 Similar to RixRenderState::GetAttribute(), but looks up an attribute for a single ray sample. More...
 
virtual bool IsEnabled (void const *instance, void **instanceData) const =0
 Determine whether or not the given instance of a sample filter is active. More...
 
virtual RixInterfaceGetRixInterface (RixInterfaceId id) const =0
 Get the specified interface from this context. More...
 

Public Attributes

int numSamples
 
int numAllSamples
 With extras add by RixDisplayServices::AddSample() More...
 
RtPoint2 const * screen
 The screen samples represent samples in screen space with subpixel precision. More...
 
float const * shutter
 The shutter samples are time samples in the [0,1) range, with a density distribution according to the the shaped "shutteropening" parameter on the RiCamera line. More...
 
RtRayGeometry const * rays
 The camera rays that were traced. More...
 
int numGrps
 Shading groups. More...
 
RixShadingContext const ** shadeCtxs
 
float const * depths
 Extra samples added by the integrator (see numAllSamples above) may have their own depths along the ray. More...
 
int const * originals
 

Protected Member Functions

 RixSampleFilterContext ()
 
 ~RixSampleFilterContext () override
 

Constructor & Destructor Documentation

◆ RixSampleFilterContext()

RixSampleFilterContext::RixSampleFilterContext ( )
inlineprotected

◆ ~RixSampleFilterContext()

RixSampleFilterContext::~RixSampleFilterContext ( )
inlineoverrideprotected

Member Function Documentation

◆ GetAttribute()

virtual int RixSampleFilterContext::GetAttribute ( int  sample,
RtUString const  name,
void *  result,
int  resultLen,
RixInterface::Type resultType,
int *  resultCount 
) const
pure virtual

Similar to RixRenderState::GetAttribute(), but looks up an attribute for a single ray sample.

Additional return value of -2 indicates the ray was a miss.

◆ GetRixInterface()

virtual RixInterface* RixContext::GetRixInterface ( RixInterfaceId  id) const
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 PxrGeoAOV::disableIntegratorAOVs(), RixIES::ReadIESProfile(), RixBXLookupLobeByName(), RixDebugBasis(), RixGetSceneColorSpace(), RixIsHoldout(), and RixIsMatte().

◆ IsEnabled()

virtual bool RixSampleFilterContext::IsEnabled ( void const *  instance,
void **  instanceData 
) const
pure virtual

Determine whether or not the given instance of a sample filter is active.

If so, the corresponding instanceData pointer is returned.

◆ Read() [1/3]

virtual bool RixSampleFilterContext::Read ( RixChannelId  id,
int  sample,
RtColorRGB value 
) const
pure virtual

Read and write access to sample data.

Returns true on success. In multi-camera scenarios, some channel ids may be invalid depending on whether they are output for the current camera being filtered.

◆ Read() [2/3]

virtual bool RixSampleFilterContext::Read ( RixChannelId  id,
int  sample,
float &  value 
) const
pure virtual

◆ Read() [3/3]

virtual bool RixSampleFilterContext::Read ( RixChannelId  id,
int  sample,
int &  value 
) const
pure virtual

◆ ReadRegion() [1/2]

virtual bool RixSampleFilterContext::ReadRegion ( RixChannelId  id,
int  regionMinX,
int  regionMaxX,
int  regionMinY,
int  regionMaxY,
RtColorRGB values 
) const
pure virtual

Read a completely arbitrary rectangular region of pixels into a user-provided buffer.

The rectangle requested through this call may be outside of the area currently being filtered (though results will be more non-deterministic due to threading) and may even extended outside of the image. Zeroes will be returned where the region extends past the image boundaries.

◆ ReadRegion() [2/2]

virtual bool RixSampleFilterContext::ReadRegion ( RixChannelId  id,
int  regionMinX,
int  regionMaxX,
int  regionMinY,
int  regionMaxY,
float *  values 
) const
pure virtual

◆ Write() [1/3]

virtual bool RixSampleFilterContext::Write ( RixChannelId  id,
int  sample,
RtColorRGB  value 
)
pure virtual

◆ Write() [2/3]

virtual bool RixSampleFilterContext::Write ( RixChannelId  id,
int  sample,
float  value 
)
pure virtual

◆ Write() [3/3]

virtual bool RixSampleFilterContext::Write ( RixChannelId  id,
int  sample,
int  value 
)
pure virtual

Member Data Documentation

◆ depths

float const* RixSampleFilterContext::depths

Extra samples added by the integrator (see numAllSamples above) may have their own depths along the ray.

It can also be helpful to know the index of the original ray/sample to which it was added.

◆ numAllSamples

int RixSampleFilterContext::numAllSamples

With extras add by RixDisplayServices::AddSample()

◆ numGrps

int RixSampleFilterContext::numGrps

Shading groups.

Sample filters may use these to inquire about shading information at the end of the camera rays. May be null.

◆ numSamples

int RixSampleFilterContext::numSamples

◆ originals

int const* RixSampleFilterContext::originals

◆ rays

RtRayGeometry const* RixSampleFilterContext::rays

The camera rays that were traced.

Origin and direction are defined in terms of camera space with the camera centered at the origin and looking down the +Z axis. May be null.

◆ screen

RtPoint2 const* RixSampleFilterContext::screen

The screen samples represent samples in screen space with subpixel precision.

For typical wide screen images, these will be in the [-aspect,aspect)x[-1,1) rectangle. The exact range depends on the combination of RiFormat, RiFrameAspectRatio, RiScreenWindow, and RiCropWindow settings.

◆ shadeCtxs

RixShadingContext const** RixSampleFilterContext::shadeCtxs

◆ shutter

float const* RixSampleFilterContext::shutter

The shutter samples are time samples in the [0,1) range, with a density distribution according to the the shaped "shutteropening" parameter on the RiCamera line.

These are interpreted relative to shutter open at 0 and shutter close at 1. May be null.


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