RixLightFilterContext Class Reference

RixLightFilterContext Class Referenceabstract

#include <RixLightFilter.h>

Inheritance diagram for RixLightFilterContext:

Classes

class  Allocator
 

Public Member Functions

virtual bool IsEnabled (RtConstPointer instance, RtConstPointer *instanceData) const =0
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, RtInt const **var) const =0
 Retrieve built-in variables from the underlying shading context.
 
virtual void GetBuiltinVar (RixShadingContext::BuiltinVar, RtFloat 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 (char const *name, RtFloat fill, RtFloat const **var, RtFloat const **radius=NULL) const =0
 Retrieve primitive variables from the underlying shading context.
 
virtual RixSCDetail GetPrimVar (char const *name, RtFloat2 fill, RtFloat2 const **var, RtFloat const **radius=NULL) const =0
 
virtual RixSCDetail GetPrimVar (char const *name, RtFloat3 fill, RtFloat3 const **var, RtFloat const **radius=NULL) const =0
 
virtual RixSCDetail GetPrimVar (char const *name, RtConstString **var) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, char const *fromSpace, char const *toSpace, RtFloat3 *var, RtFloat *width=NULL) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, char const *fromSpace, char const *toSpace, RtFloat3 const *srcVar, RtFloat3 *dstVar, RtFloat const *srcWidth, RtFloat *dstWidth) const =0
 
virtual int Transform (RixShadingContext::TransformInterpretation interp, char const *fromSpace, char const *toSpace, RtInt numPts, RtInt const *shadingCtxIndex, RtFloat3 const *srcVar, RtFloat3 *dstVar, RtFloat const *srcWidth, RtFloat *dstWidth) const =0
 
virtual void * Allocate (size_t n, size_t size) const =0
 
template<class T >
T * New (size_t nObjs) const
 

Public Attributes

RtInt numPts
 

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.

Member Function Documentation

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

virtual bool RixLightFilterContext::IsEnabled ( RtConstPointer  instance,
RtConstPointer *  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.

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.

virtual int RixLightFilterContext::Transform ( RixShadingContext::TransformInterpretation  interp,
char const *  fromSpace,
char const *  toSpace,
RtFloat3 *  var,
RtFloat *  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.

virtual int RixLightFilterContext::Transform ( RixShadingContext::TransformInterpretation  interp,
char const *  fromSpace,
char const *  toSpace,
RtInt  numPts,
RtInt const *  shadingCtxIndex,
RtFloat3 const *  srcVar,
RtFloat3 *  dstVar,
RtFloat const *  srcWidth,
RtFloat *  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.


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