RenderMan API  23.0
RixLightFilterContext Class Referenceabstract

#include <RixLightFilter.h>

Inheritance diagram for RixLightFilterContext:
RixContext

Classes

class  Allocator
 

Public Member Functions

virtual bool IsEnabled (RtConstPointer instance, RtPointer *instanceData) const =0
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, int const **var) const =0
 Retrieve built-in variables from the underlying shading context. More...
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, float const **var) const =0
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, RtFloat3 const **var) const =0
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, RixLPEState *const **var) const =0
 
virtual RixSCDetail GetPrimVar (RtUString const name, float fill, float const **var, float const **radius=NULL) const =0
 Retrieve primitive variables from the underlying shading context. More...
 
virtual RixSCDetail GetPrimVar (RtUString const name, RtFloat2 fill, RtFloat2 const **var, float const **radius=NULL) const =0
 
virtual RixSCDetail GetPrimVar (RtUString const name, RtFloat3 fill, RtFloat3 const **var, float const **radius=NULL) const =0
 
virtual RixSCDetail GetPrimVar (RtUString const name, RtUString const **var) const =0
 
virtual RixSCDetail GetPrimVar (RtUString const name, RtMatrix4x4 const &fill, RtMatrix4x4 const **var) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, RtUString const fromSpace, RtUString const toSpace, RtFloat3 *var, float *width=NULL) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, RtUString const fromSpace, RtUString const toSpace, RtFloat3 const *srcVar, RtFloat3 *dstVar, float const *srcWidth, float *dstWidth) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, RtUString const fromSpace, RtUString const toSpace, int numPts, int const *shadingCtxIndex, RtFloat3 const *srcVar, RtFloat3 *dstVar, float const *srcWidth, float *dstWidth) const =0
 
virtual void * Allocate (size_t n, size_t size) const =0
 
template<class T >
T * New (size_t nObjs) const
 
- Public Member Functions inherited from RixContext
virtual RixInterfaceGetRixInterface (RixInterfaceId id) const =0
 
virtual ~RixContext ()
 Destructor is for internal use only. More...
 

Public Attributes

int numPts
 

Protected Member Functions

virtual ~RixLightFilterContext ()
 

Detailed Description

The RixLightFilterContext provides limited access to data from the shading context associated with a light filter invocation. Pattern generation is not supported (EvalParam is not present). Primvars and built-in vars may be accessed and transformed. The shadingCtxIndex parameter to Filter() should be used to index into these arrays retrieved from the light filter context. A special form of the Transform() call (which takes the shadingCtxIndex) is provided that does this indexing automatically.

Definition at line 141 of file RixLightFilter.h.

Constructor & Destructor Documentation

◆ ~RixLightFilterContext()

virtual RixLightFilterContext::~RixLightFilterContext ( )
inlineprotectedvirtual

Definition at line 243 of file RixLightFilter.h.

Member Function Documentation

◆ Allocate()

virtual void* RixLightFilterContext::Allocate ( size_t  n,
size_t  size 
) const
pure virtual

Allocate: fast memory allocation support from a memory pool tailored to light modifier plugins. Memory allocated via this interface is managed (freed) by RixLightFilterContext according to the "bxdf" lifetime of the shading context of the pointd be lit. As with many custom memory allocation schemes, clients should

◆ GetBuiltinVar() [1/4]

virtual void RixLightFilterContext::GetBuiltinVar ( RixShadingContext::BuiltinVar  ,
int const **  var 
) const
pure virtual

Retrieve built-in variables from the underlying shading context.

◆ GetBuiltinVar() [2/4]

virtual void RixLightFilterContext::GetBuiltinVar ( RixShadingContext::BuiltinVar  ,
float const **  var 
) const
pure virtual

◆ GetBuiltinVar() [3/4]

virtual void RixLightFilterContext::GetBuiltinVar ( RixShadingContext::BuiltinVar  ,
RtFloat3 const **  var 
) const
pure virtual

◆ GetBuiltinVar() [4/4]

virtual void RixLightFilterContext::GetBuiltinVar ( RixShadingContext::BuiltinVar  ,
RixLPEState *const **  var 
) const
pure virtual

◆ GetPrimVar() [1/5]

virtual RixSCDetail RixLightFilterContext::GetPrimVar ( RtUString const  name,
float  fill,
float const **  var,
float const **  radius = NULL 
) const
pure virtual

Retrieve primitive variables from the underlying shading context.

◆ GetPrimVar() [2/5]

virtual RixSCDetail RixLightFilterContext::GetPrimVar ( RtUString const  name,
RtFloat2  fill,
RtFloat2 const **  var,
float const **  radius = NULL 
) const
pure virtual

◆ GetPrimVar() [3/5]

virtual RixSCDetail RixLightFilterContext::GetPrimVar ( RtUString const  name,
RtFloat3  fill,
RtFloat3 const **  var,
float const **  radius = NULL 
) const
pure virtual

◆ GetPrimVar() [4/5]

virtual RixSCDetail RixLightFilterContext::GetPrimVar ( RtUString const  name,
RtUString const **  var 
) const
pure virtual

◆ GetPrimVar() [5/5]

virtual RixSCDetail RixLightFilterContext::GetPrimVar ( RtUString const  name,
RtMatrix4x4 const &  fill,
RtMatrix4x4 const **  var 
) const
pure virtual

◆ IsEnabled()

virtual bool RixLightFilterContext::IsEnabled ( RtConstPointer  instance,
RtPointer instanceData 
) const
pure virtual

Determine whether or not the given instance of a light filter is active. If it is, the corresponding instanceData pointer is returned.

◆ New()

template<class T >
T* RixLightFilterContext::New ( size_t  nObjs) const
inline

New is a utility (fully inlined) non-virtual method to assist with tedious memory allocation tasks. Note that class-constructor methods may be run on array entries. This cost should be carefully considered for high performance requirements.

Definition at line 209 of file RixLightFilter.h.

◆ Transform() [1/3]

virtual int RixLightFilterContext::Transform ( RixShadingContext::TransformInterpretation  interp,
RtUString const  fromSpace,
RtUString const  toSpace,
RtFloat3 var,
float *  width = NULL 
) const
pure virtual

Transform an array of RtFloat3 (and optional width) the same size as the numPts in the RixLightFilterContext. The type of transformation is specified with TransformInterpretation. If the call is successful it will return 0.

◆ Transform() [2/3]

virtual int RixLightFilterContext::Transform ( RixShadingContext::TransformInterpretation  interp,
RtUString const  fromSpace,
RtUString const  toSpace,
RtFloat3 const *  srcVar,
RtFloat3 dstVar,
float const *  srcWidth,
float *  dstWidth 
) const
pure virtual

◆ Transform() [3/3]

virtual int RixLightFilterContext::Transform ( RixShadingContext::TransformInterpretation  interp,
RtUString const  fromSpace,
RtUString const  toSpace,
int  numPts,
int const *  shadingCtxIndex,
RtFloat3 const *  srcVar,
RtFloat3 dstVar,
float const *  srcWidth,
float *  dstWidth 
) const
pure virtual

Transform an array of RtFloat3 (and optional width) of size numPts, with a shadingCtxIndex array of that size. The type of transformation is specified with TransformInterpretation. The RtFloat3 in the from space are read from the numPts long srcVar array and are written to the dstVar array. Both pointers can point to the same location, so an in-place operation is allowed. If the call is successful it will return 0.

Member Data Documentation

◆ numPts

int RixLightFilterContext::numPts

Definition at line 144 of file RixLightFilter.h.


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