11 #ifndef __GU_VolumeRasterize__
12 #define __GU_VolumeRasterize__
46 const char *
name()
const {
return myName; }
49 void alloc(
exint entries);
51 void *
data()
const {
return myData; }
52 float *
fdata()
const {
return (
float *) myData; }
53 int *
idata()
const {
return (
int *) myData; }
75 virtual exint numPrimitives()
const = 0;
77 virtual void getBBox(
exint prim,
112 void setDisplaceBounds(
fpreal relative,
fpreal absolute);
149 float myScaleAbs, myScaleRel;
178 const char *
name()
const {
return (
const char *) myName; }
183 {
return myIdxXform.toVoxelSpace(pos); }
185 {
return myIdxXform.fromVoxelSpace(index); }
188 {
return myIdxXform.toVoxelSpace(box); }
190 {
return myIdxXform.fromVoxelSpace(box); }
196 CompositeType myComp;
212 void bindOutput(
const char *
name,
217 void setRasterizer(
const char *vexscript,
222 const char *getVexErrors()
const;
223 const char *getVexWarnings()
const;
227 { myTime =
time; myFrame = frame; myTimeInc = timeinc; }
229 { mySamples =
samples; mySeed = seed; }
237 void rasterizeBlock(BlockData &
data);
260 const BlockData &, refblock,
262 void doRasterizePartial(
264 const BlockData &refblock,
273 mutable UT_String myVexErrors, myVexWarnings;
276 bool myTimeDependent;
GU_VolumeRasterizePrimList()
virtual bool canValidate(exint prim) const
void rasterize(const PointDataTreeOrGridT &points, TransferT &transfer, const FilterT &filter=NullFilter(), InterrupterT *interrupter=nullptr)
Perform potentially complex rasterization from a user defined transfer scheme.
virtual void fillBindings(const UT_ExintArray &primnum, UT_Array< GU_VolumeRasterizeBinding > &bindings) const =0
GT_API const UT_StringHolder time
UT_Vector4 * v4data() const
const char * name() const
virtual void getBBox(exint prim, UT_BoundingBox &bbox) const =0
virtual void proposeBindings(UT_Array< GU_VolumeRasterizeBinding > &bindings) const =0
Returns a list of bindings that we know how to write to.
GU_VolumeRasterizeBinding(const char *name, CVEX_Type type)
void setTime(fpreal time, fpreal frame, fpreal timeinc)
CompositeType comptype() const
void setSampling(int samples, float seed)
void setField(int i, int j, GU_PrimVolume *vol, GU_PrimVDB *vdb)
GEO_PrimVolumeXform getIndexSpaceTransform() const
void setOpCaller(UT_OpCaller *opcaller)
UT_Vector3 * v3data() const
#define THREADED_METHOD3(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
OIIO_API void premult(int nchannels, int width, int height, int depth, int chbegin, int chend, TypeDesc datatype, void *data, stride_t xstride, stride_t ystride, stride_t zstride, int alpha_channel=-1, int z_channel=-1)
virtual ~GU_VolumeRasterizePrimList()
virtual bool validateBBox(exint prim, const UT_BoundingBox &bbox) const
UT_Vector3 indexToPos(UT_Vector3 index) const
UT_Matrix4 * m4data() const
#define THREADED_METHOD2(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
GU_PrimVolume * vol(int i, int j) const
virtual void endThread(const UT_JobInfo &info, void *threaddata) const
void indexToPos(UT_BoundingBox &box) const
GLuint const GLchar * name
CVEX_Type
The CVEX_Type enum defines the VEX types available to CVEX.
ImageBuf OIIO_API unpremult(const ImageBuf &src, ROI roi={}, int nthreads=0)
virtual exint numPrimitives() const =0
virtual void initThread(const UT_JobInfo &info, void **threaddata) const
void posToIndex(UT_BoundingBox &box) const
void setPreMult(bool premult, bool unpremult)
const char * name() const
bool isTimeDependent() const
GEO_PrimVolumeXform getIndexSpaceTransform() const
Compute an instance transform given a set of attributes.
UT_Matrix3 * m3data() const
GU_PrimVDB * vdb(int i, int j) const
virtual ~GU_VolumeRasterizeBinding()
UT_Vector3 posToIndex(UT_Vector3 pos) const
GEO_PrimVolumeXform myIdxXform