HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_PrimVolumeCache.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_PrimVolumeCache.h ( GU Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GU_PrimVolumeCache__
12 #define __GU_PrimVolumeCache__
13 
14 #include "GU_API.h"
15 
16 #include <string.h>
17 #include <UT/UT_Vector3.h>
18 #include <UT/UT_Vector4.h>
19 #include <UT/UT_Array.h>
20 #include <UT/UT_VoxelArray.h>
22 
23 #include <GEO/GEO_PrimVolume.h>
24 
25 #include "GU_Detail.h"
26 #include "GU_DetailHandle.h"
27 #include "GU_DisplayCache.h"
28 
29 class UT_Ramp;
30 class GEO_PrimVolume;
31 class GEO_PrimVDB;
32 
33 // TODO: When deleting GU_DisplayCache, DON'T delete
34 // GU_PrimVolumeCache. Move it to GT_PrimVolumeCache,
35 // along with any functions needed from the superclass.
36 // It's still used by GT_PrimVolume!!!
38 
40 typedef RE_OGLTexture RE_Texture;
41 #ifdef USE_VULKAN
42 class GR_EnvLight;
43 #endif
45 {
46 public:
48  : myOrg(0,0,0), myDir(0,0,0), myCd(0,0,0), myShadow(0.0),
49  myHasAttenuation(false), myIsAmbient(false), myIsInfinite(false),
50  myIsHeadlight(false), myIsEnvironment(false), myIsCone(false),
51  myEnvMap(nullptr)
52 #ifdef USE_VULKAN
53  , myEnvLight(nullptr)
54 #endif
55  {
56  for(int i = 0; i < 8; i++)
57  myAtten[i] = 1;
58  }
59 
60  bool operator==(const GU_PrimVolumeCacheLight &l) const
61  {
62  // ignore headlight to prevent updates on tumble
63  if (myIsHeadlight &&
64  myIsHeadlight == l.myIsHeadlight)
65  return true;
66 
67  // Ensure attenuation parameters are the same...
68  if(myHasAttenuation != l.myHasAttenuation || (myHasAttenuation &&
69  (myAttenuationCoeffs[0] != l.myAttenuationCoeffs[0]
70  || myAttenuationCoeffs[1] != l.myAttenuationCoeffs[1]
71  || myAttenuationCoeffs[2] != l.myAttenuationCoeffs[2])))
72  return false;
73  // Ensure cone light parameters are the same...
74  if(myIsCone != l.myIsCone || (myIsCone &&
75  (myConeAngle != l.myConeAngle
76  || myConeDelta != l.myConeDelta
77  || myConeRolloff != l.myConeRolloff)))
78  return false;
79 
80  return (myOrg == l.myOrg) &&
81  (myDir == l.myDir) &&
82  (myCd == l.myCd) &&
83  (myIsAmbient == l.myIsAmbient) &&
84  (myIsInfinite == l.myIsInfinite) &&
85  (myShadow == l.myShadow) &&
86  (myIsEnvironment == l.myIsEnvironment) &&
87  (!myIsEnvironment || (myEnvMap == l.myEnvMap &&
88  myOrientation == l.myOrientation
89 #ifdef USE_VULKAN
90  && myEnvLight == l.myEnvLight));
91 #else
92  ));
93 #endif
94  }
95 
96  void setOrg(const UT_Vector3 &org) { myOrg = org; }
97  void setDir(const UT_Vector3 &dir) { myDir = dir; }
98  void setCd(const UT_Vector3 &cd) { myCd = cd; }
99  void setShadowIntensity(float shadow) { myShadow = shadow; }
100  void setIsAmbient(bool isamb) { myIsAmbient = isamb; }
101  void setIsInfinite(bool isinf) { myIsInfinite = isinf; }
102  void setIsHeadlight(bool hl) { myIsHeadlight = hl; }
103  void setIsEnvironment(bool env) { myIsEnvironment = env; }
104  void setEnvironmentMap(const RE_Texture* env) { myEnvMap = env; }
105  void setOrientation(const UT_Matrix3& mat) { myOrientation = mat; }
106  void setIsCone(bool cone) { myIsCone = cone; }
107  void setConeAngle(float angle) { myConeAngle = angle; }
108  void setConeDelta(float delta) { myConeDelta = delta; }
109  void setConeRolloff(float rolloff) { myConeRolloff = rolloff; }
110 #ifdef USE_VULKAN
111  void setEnvironmentLight(GR_EnvLight* env) { myEnvLight = env; }
112 #endif
113 
114  const UT_Vector3 &getOrg() const { return myOrg; }
115  const UT_Vector3 &getDir() const { return myDir; }
116  const UT_Vector3 &getCd() const { return myCd; }
117  float getShadow() const { return myShadow; }
118  float getConeAngle() const { return myConeAngle; }
119  float getConeDelta() const { return myConeDelta; }
120  float getConeRolloff() const { return myConeRolloff; }
121  const RE_Texture* getEnvironmentMap() const { return myEnvMap; }
122  const UT_Matrix3 &getOrientation() const { return myOrientation; }
123 #ifdef USE_VULKAN
124  GR_EnvLight* getEnvironmentLight() const { return myEnvLight; }
125 #endif
126 
127  bool isAmbient() const { return myIsAmbient; }
128  bool isInfinite() const { return myIsInfinite; }
129  bool isHeadlight() const { return myIsHeadlight; }
130  bool isEnvironment() const { return myIsEnvironment; }
131  bool isCone() const { return myIsCone; }
132 
133  float getDistance(const UT_Vector3 &pos) const;
134  // Inv Brightness attenuation for the 8 corners: x, then y, then z; - then +
135  // interpolate, then invert.
136  void setCornerAttenuation(float a[8])
137  {
138  myHasAttenuation = true;
139  for(int i=0; i<8; i++)
140  myAtten[i] = a[i];
141  }
142  bool hasAttenuation() const { return myHasAttenuation; }
143  float getAttenuation(const UT_Vector3F &uvw) const;
144  const float* getCornerAttenuation() const { return myAtten; }
145 
146  float* getAttenuationCoeffArray() { return myAttenuationCoeffs; }
147  const float* getConstAttenuationCoeffArray() const { return myAttenuationCoeffs; }
148 
149 protected:
152  float myShadow;
154  float myAtten[8];
155  float myAttenuationCoeffs[3];
156  bool myIsAmbient, myIsInfinite, myIsHeadlight;
158  bool myIsCone;
159  float myConeAngle, myConeDelta, myConeRolloff;
160 
161  const RE_Texture* myEnvMap;
163 #ifdef USE_VULKAN
164  GR_EnvLight* myEnvLight;
165 #endif
166 };
167 
168 
170 class GU_PrimVolume;
171 
173 {
174 public:
175  SYS_DEPRECATED_HDK(13.0)
177  SYS_DEPRECATED_HDK(13.0)
178  virtual ~GU_PrimVolumeTexture() {}
179 
180  SYS_DEPRECATED_HDK(13.0)
181  virtual void refresh(const UT_VoxelArrayV4 *voxels) = 0;
182  SYS_DEPRECATED_HDK(13.0)
183  virtual int64 getMemoryUsage(bool inclusive) const = 0;
184 };
185 
187 {
188 public:
189  GU_PrimVolumeCacheRamp(UT_Ramp *ramp, bool periodic);
190  ~GU_PrimVolumeCacheRamp();
191 
192  void eval(float &rval, float val) const;
193  void eval(UT_Vector4 &rval, float val) const;
194 
195 protected:
198 };
199 
201 {
202 public:
203  GU_PrimVolumeCacheSampler(const GEO_Detail *gdp, const GEO_Primitive *vol);
205 
206  GU_PrimVolumeCacheRamp *buildRampFromAttribute(
207  const GEO_Detail *gdp,
208  const char *attribname) const;
209  int findCollationIndex(const GEO_Detail *gdp,
210  const GEO_Primitive *vol) const;
211  const GEO_Primitive *selectVolumeFromAttribute(
212  const GEO_Detail *gdp,
213  const char *attribname,
214  int collateidx) const;
215  void selectVolumesFromAttribute(
216  const GEO_Primitive *vol[3],
217  const GEO_Detail *gdp,
218  const char *attribname,
219  int collateidx) const;
220  void getRangeFromAttribute(
221  const GEO_Detail *gdp,
222  const char *attribname,
223  float &rmin, float &rscale) const;
224  float getFloatFromAttribute(
225  const GEO_Detail *gdp,
226  const char *attribname,
227  float def) const;
228 
229  float getDensity(int x, int y, int z) const;
230  UT_Vector4 getDiffuse(int x, int y, int z) const;
231 
232  void getDensityProbe(UT_VoxelProbeF &probe) const;
233  void getEmitProbe(UT_VoxelProbeF &probe) const;
234  void getEmitCdProbe(UT_VoxelProbeV4 &probe) const;
235  const UT_VoxelArrayF *getDensityArray() const;
236 
237  const GEO_Primitive *densityField() const { return myDensityField; }
238  void setDensityField(const GEO_Primitive *densityfield);
239 
240  void hardenFields(const UT_VoxelArray<UT_Vector4> &refvol,
241  const GEO_PrimVolumeXform &volxform,
242  bool isheightfield);
243 
244  UT_VoxelArrayReadHandleF hardenScalar(const UT_VoxelArrayV4 &refvol,
245  const GEO_PrimVolumeXform &volxform,
246  const GEO_Primitive *field,
248  float rmin, float rinvscale);
249  UT_VoxelArrayReadHandleV4 hardenVector(const UT_VoxelArrayV4 &refvol,
250  const GEO_PrimVolumeXform &volxform,
251  const GEO_Primitive *field,
253  float rmin, float rinvscale);
254  UT_VoxelArrayReadHandleV4 hardenVectorMulti(const UT_VoxelArrayV4 &refvol,
255  const GEO_PrimVolumeXform &volxform,
256  const GEO_Primitive *field[3],
258  float rmin, float rinvscale);
259  UT_VoxelArrayReadHandleV4 hardenVDBVector(const UT_VoxelArrayV4 &refvol,
260  const GEO_PrimVolumeXform &volxform,
261  const GEO_Primitive *field,
263  float rmin, float rinvscale);
264 
266  dst->numTiles() > 1,
267  doHardenAligned,
268  UT_VoxelArrayF *, dst,
269  const UT_VoxelArrayF *, src,
270  const GEO_PrimVolumeXform &, dst_xform,
271  const GEO_PrimVolumeXform &, src_xform,
272  GU_PrimVolumeCacheRamp *, ramp,
273  float, rmin,
274  float, rinvscale)
275  void doHardenAlignedPartial(UT_VoxelArrayF *dst,
277  const GEO_PrimVolumeXform &dst_xform,
278  const GEO_PrimVolumeXform &src_xform,
280  float rmin, float rinvscale,
281  const UT_JobInfo &info) const;
283  dst->numTiles() > 1,
284  doHardenUnaligned,
285  UT_VoxelArrayF *, dst,
286  const UT_VoxelArrayF *, src,
287  const GEO_PrimVolumeXform &, dst_xform,
288  const GEO_PrimVolumeXform &, src_xform,
289  GU_PrimVolumeCacheRamp *, ramp,
290  float, rmin,
291  float, rinvscale)
292  void doHardenUnalignedPartial(UT_VoxelArrayF *dst,
293  const UT_VoxelArrayF *src,
294  const GEO_PrimVolumeXform &dst_xform,
295  const GEO_PrimVolumeXform &src_xform,
297  float rmin, float rinvscale,
298  const UT_JobInfo &info) const;
300  dst->numTiles() > 1,
301  doHardenVectorAligned,
302  UT_VoxelArrayV4 *, dst,
303  const UT_VoxelArrayF *, src,
304  const GEO_PrimVolumeXform &, dst_xform,
305  const GEO_PrimVolumeXform &, src_xform,
306  GU_PrimVolumeCacheRamp *, ramp,
307  float, rmin,
308  float, rinvscale)
309  void doHardenVectorAlignedPartial(UT_VoxelArrayV4 *dst,
310  const UT_VoxelArrayF *src,
311  const GEO_PrimVolumeXform &dst_xform,
312  const GEO_PrimVolumeXform &src_xform,
314  float rmin, float rinvscale,
315  const UT_JobInfo &info) const;
317  dst->numTiles() > 1,
318  doHardenVectorUnaligned,
319  UT_VoxelArrayV4 *, dst,
320  const UT_VoxelArrayF *, src,
321  const GEO_PrimVolumeXform &, dst_xform,
322  const GEO_PrimVolumeXform &, src_xform,
323  GU_PrimVolumeCacheRamp *, ramp,
324  float, rmin,
325  float, rinvscale)
326  void doHardenVectorUnalignedPartial(UT_VoxelArrayV4 *dst,
327  const UT_VoxelArrayF *src,
328  const GEO_PrimVolumeXform &dst_xform,
329  const GEO_PrimVolumeXform &src_xform,
331  float rmin, float rinvscale,
332  const UT_JobInfo &info) const;
334  dst->numTiles() > 1,
335  doHardenVectorAxisAligned,
336  UT_VoxelArrayV4 *, dst,
337  const UT_VoxelArrayF *, src,
338  int, axis,
339  const GEO_PrimVolumeXform &, dst_xform,
340  const GEO_PrimVolumeXform &, src_xform,
341  GU_PrimVolumeCacheRamp *, ramp,
342  float, rmin,
343  float, rinvscale)
344  void doHardenVectorAxisAlignedPartial(UT_VoxelArrayV4 *dst,
346  int axis,
347  const GEO_PrimVolumeXform &dst_xform,
348  const GEO_PrimVolumeXform &src_xform,
350  float rmin, float rinvscale,
351  const UT_JobInfo &info) const;
353  dst->numTiles() > 1,
354  doHardenVectorAxisUnaligned,
355  UT_VoxelArrayV4 *, dst,
356  const UT_VoxelArrayF *, src,
357  int, axis,
358  const GEO_PrimVolumeXform &, dst_xform,
359  const GEO_PrimVolumeXform &, src_xform,
360  GU_PrimVolumeCacheRamp *, ramp,
361  float, rmin,
362  float, rinvscale)
363  void doHardenVectorAxisUnalignedPartial(UT_VoxelArrayV4 *dst,
364  const UT_VoxelArrayF *src,
365  int axis,
366  const GEO_PrimVolumeXform &dst_xform,
367  const GEO_PrimVolumeXform &src_xform,
369  float rmin, float rinvscale,
370  const UT_JobInfo &info) const;
371 
373  dst->numTiles() > 1,
374  doHardenVDB,
375  UT_VoxelArrayF *, dst,
376  const GEO_PrimVDB *, src,
377  const GEO_PrimVolumeXform &, xform,
378  GU_PrimVolumeCacheRamp *, ramp,
379  float, rmin,
380  float, rinvscale)
381  void doHardenVDBPartial(UT_VoxelArrayF *dst,
382  const GEO_PrimVDB *src,
383  const GEO_PrimVolumeXform &xform,
385  float rmin, float rinvscale,
386  const UT_JobInfo &info) const;
388  dst->numTiles() > 1,
389  doHardenVectorVDB,
390  UT_VoxelArrayV4 *, dst,
391  const GEO_PrimVDB *, src,
392  const GEO_PrimVolumeXform &, xform,
393  GU_PrimVolumeCacheRamp *, ramp,
394  float, rmin,
395  float, rinvscale)
396  void doHardenVectorVDBPartial(UT_VoxelArrayV4 *dst,
397  const GEO_PrimVDB *src,
398  const GEO_PrimVolumeXform &xform,
400  float rmin, float rinvscale,
401  const UT_JobInfo &info) const;
403  dst->numTiles() > 1,
404  doHardenVectorAxisVDB,
405  UT_VoxelArrayV4 *, dst,
406  const GEO_PrimVDB *, src,
407  int, axis,
408  const GEO_PrimVolumeXform &, xform,
409  GU_PrimVolumeCacheRamp *, ramp,
410  float, rmin,
411  float, rinvscale)
412  void doHardenVectorAxisVDBPartial(UT_VoxelArrayV4 *dst,
413  const GEO_PrimVDB *src,
414  int axis,
415  const GEO_PrimVolumeXform &xform,
417  float rmin, float rinvscale,
418  const UT_JobInfo &info) const;
420  dst->numTiles() > 1,
421  doHardenVectorVectorVDB,
422  UT_VoxelArrayV4 *, dst,
423  const GEO_PrimVDB *, src,
424  const GEO_PrimVolumeXform &, xform,
425  GU_PrimVolumeCacheRamp *, ramp,
426  float, rmin,
427  float, rinvscale)
428  void doHardenVectorVectorVDBPartial(UT_VoxelArrayV4 *dst,
429  const GEO_PrimVDB *src,
430  const GEO_PrimVolumeXform &xform,
432  float rmin, float rinvscale,
433  const UT_JobInfo &info) const;
434 
436  dst->numTiles() > 1,
437  applyAmbientLight,
438  UT_VoxelArrayV4 *, dst,
439  const UT_Vector4, cd)
440  void applyAmbientLightPartial(UT_VoxelArrayV4 *dst,
441  const UT_Vector4 &cd,
442  const UT_JobInfo &info) const;
443 
444  bool hasEmission() const;
445  float getEmissionScale() const { return myEmissionScale; }
446  float getShadowScale() const { return myShadowScale; }
447 
448 protected:
449  float myDensityMin, myDensityInvRange;
453 
454 
455  float myDiffuseMin, myDiffuseInvRange;
456  const GEO_Primitive *myDiffuseField[3];
458 
460  float myEmissionMin, myEmissionInvRange;
463 
464 
465  float myEmissionCdMin, myEmissionCdInvRange;
466  const GEO_Primitive *myEmissionCdField[3];
468 
473 };
474 
476 {
477 public:
479  ~GU_PrimVolumeCache() override;
480 
481  // Build the cache.
482  int refresh(const GEO_Primitive *parent_prim,
483  const GU_PrimVolumeCacheParms &parms);
484 
485  // Get the cached data.
486  UT_VoxelArrayV4 *getShadedVoxels(bool *reduced=nullptr) const
487  {
488  if(reduced)
489  *reduced = myVolumeReduced;
490  return myVoxels;
491  }
492  SYS_DEPRECATED_HDK(13.0)
493  GU_PrimVolumeTexture *getTexture() const { return myTexture; }
494  SYS_DEPRECATED_HDK(13.0)
495  void setTexture(GU_PrimVolumeTexture *tex)
496  { myTexture = tex; }
497 
498  GU_ConstDetailHandle getIsoSurface() const { return myIsoSurf; }
499 
500  UT_Vector3 getIsoCd() const { return myIsoCd; }
501 
502  /// The cached resolution
503  UT_Vector3I getRes() const { return myCacheRes; }
504 
506  { return myVolumeXform; }
507 
508  int64 getMemoryUsage(bool inclusive) const
509  {
510  int64 mem = inclusive ? sizeof(*this) : 0;
511  if (myVoxels)
512  mem += myVoxels->getMemoryUsage(true);
513  mem += myLightList.getMemoryUsage(true);
514  if (myTexture)
515  mem += myTexture->getMemoryUsage(true);
516  mem += myIsoSurf.getMemoryUsage(false);
517  return mem;
518  }
519 
520 protected:
521  void lightVoxelsFromLight(const GU_PrimVolumeCacheSampler &sampler,
522  const GU_PrimVolumeCacheLight &light,
523  const UT_Vector3 &cd,
524  float shadowdensity);
525 
526  void rainbowVoxels(const GU_PrimVolumeCacheSampler &sampler);
527 
528  THREADED_METHOD3(GU_PrimVolumeCache, myVoxels->numTiles() > 1,
529  computeAlphaVoxels,
531  float, lightdensity,
532  bool, premultiply)
533  void computeAlphaVoxelsPartial(
535  float lightdensity,
536  bool premultiply,
537  const UT_JobInfo &info);
538 
539  /// Maximum per-axis resolution to do the self shadowing calculations
540  /// at.
541  int getMaxRes(const GEO_Primitive *volume,
542  const GU_PrimVolumeCacheParms &parms,
543  int axis) const;
544 
545  /// Used to convert to and from our *cached* indices, not the
546  /// actual primitive indices that may be a different resolution
547  bool indexToPos(int x, int y, int z, UT_Vector3 &pos) const;
548  bool posToIndex(UT_Vector3 pos, int &x, int &y, int &z) const;
549 
552  SYS_DEPRECATED_HDK(13.0)
554  GU_DetailHandle myIsoSurf;
555  float myOldLOD;
556  UT_Vector3 myIsoCd;
557 
558  UT_Vector3I myCacheRes;
559  GEO_PrimVolumeXform myVolumeXform;
560  bool myVolumeReduced;
561 
562  // Ignore these
563  UT_Matrix4 myCacheXform;
564  UT_Matrix4 myCacheIXform;
565 
566  const UT_VoxelArrayV4 *myCacheVolume;
567 };
568 
570 {
571 public:
573  : myMaxResW(0), myMaxResH(0), myMaxResD(0)
574  , myMax2DRes(0)
575  , myDownscale(1.0)
576  , myIsoPoints(false)
577  , myPreMultiply(true)
578  , myCachedFlag(true)
579  {}
581 
583  { myLightList = lightlist; }
585  { return myLightList; }
586 
587  void setMaxResolution(int w, int h, int d)
588  { myMaxResW = w; myMaxResH = h; myMaxResD = d; }
589  void getMaxResolution(int &w, int &h, int &d) const
590  { w = myMaxResW; h = myMaxResH; d = myMaxResD; }
591 
593  { myDownscale = scale; }
595  { return myDownscale; }
596 
597  void setMax2DRes(int s)
598  { myMax2DRes = s; }
599  int getMax2DRes() const
600  { return myMax2DRes; }
601 
602  void setIsoPoints(bool iso_pts) { myIsoPoints = iso_pts; }
603  bool isIsoPoints() const { return myIsoPoints; }
604 
605  void setPreMultiply(bool premultiply) { myPreMultiply = premultiply; }
606  bool getPreMultiply() const { return myPreMultiply; }
607 
608  void setCached(bool b) const { myCachedFlag = b; }
609  bool isCached() const { return myCachedFlag; }
610 
611 private:
613  int myMaxResW;
614  int myMaxResH;
615  int myMaxResD;
616  int myMax2DRes;
617  fpreal myDownscale;
618  bool myIsoPoints;
619  bool myPreMultiply;
620  mutable bool myCachedFlag;
621 };
622 
624 
625 #endif
626 
#define THREADED_METHOD8_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7, PARMTYPE8, PARMNAME8)
const float * getConstAttenuationCoeffArray() const
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define THREADED_METHOD6_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6)
const UT_Array< GU_PrimVolumeCacheLight > & getLights() const
void setIsAmbient(bool isamb)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Definition: thread.h:623
const UT_Vector3 & getOrg() const
SIM_API const UT_StringHolder angle
void
Definition: png.h:1083
#define SYS_DEPRECATED_PUSH_DISABLE()
void setCd(const UT_Vector3 &cd)
const GEO_Primitive * myEmissionField
#define SYS_DEPRECATED_POP_DISABLE()
void getMaxResolution(int &w, int &h, int &d) const
const RE_Texture * myEnvMap
void setDir(const UT_Vector3 &dir)
void setDownscale(fpreal scale)
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
const RE_Texture * getEnvironmentMap() const
void setLights(UT_Array< GU_PrimVolumeCacheLight > &lightlist)
void setShadowIntensity(float shadow)
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
GLdouble s
Definition: glad.h:3009
void setOrientation(const UT_Matrix3 &mat)
void setPreMultiply(bool premultiply)
void setOrg(const UT_Vector3 &org)
GU_PrimVolumeCacheRamp * myEmissionCdRamp
GLint y
Definition: glcorearb.h:103
GLuint sampler
Definition: glcorearb.h:1656
void setEnvironmentMap(const RE_Texture *env)
GU_PrimVolumeCacheRamp * myEmissionRamp
const UT_Matrix3 & getOrientation() const
GU_ConstDetailHandle getIsoSurface() const
#define THREADED_METHOD3(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
UT_VoxelArrayReadHandleF myEmissionHandle
UT_VoxelArrayV4 * getShadedVoxels(bool *reduced=nullptr) const
GA_API const UT_StringHolder scale
UT_Vector4T< float > UT_Vector4
const UT_Vector3 & getCd() const
IMATH_NAMESPACE::V2f float
GU_PrimVolumeCacheRamp * myDensityRamp
#define THREADED_METHOD7_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7)
void setConeRolloff(float rolloff)
void setMaxResolution(int w, int h, int d)
void setConeDelta(float delta)
long long int64
Definition: SYS_Types.h:116
const float * getCornerAttenuation() const
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GU_API
Definition: GU_API.h:14
#define SYS_DEPRECATED_HDK(__V__)
void setIsInfinite(bool isinf)
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLint GLenum GLint x
Definition: glcorearb.h:409
#define THREADED_METHOD2_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
UT_Array< GU_PrimVolumeCacheLight > myLightList
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
GLenum GLenum dst
Definition: glcorearb.h:1793
UT_Vector3 getIsoCd() const
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
const GEO_Primitive * myDensityField
bool operator==(const GU_PrimVolumeCacheLight &l) const
void setIsoPoints(bool iso_pts)
GLuint GLfloat * val
Definition: glcorearb.h:1608
const GEO_Primitive * densityField() const
void setCornerAttenuation(float a[8])
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
UT_VoxelArrayV4 * myVoxels
UT_VoxelArrayReadHandleV4 myDiffuseHandle
GU_PrimVolumeCacheRamp * myDiffuseRamp
void setCached(bool b) const
UT_Vector3I getRes() const
The cached resolution.
UT_VoxelArrayReadHandleF myDensityHandle
UT_VoxelArrayReadHandleV4 myEmissionCdHandle
Environment light. Infinitely far away incoming rays from all directions.
GEO_PrimVolumeXform getSpaceTransform() const
int64 getMemoryUsage(bool inclusive) const
const UT_Vector3 & getDir() const
void setConeAngle(float angle)
GLenum src
Definition: glcorearb.h:1793