HDK
|
Volume primitive used by RAY/RAY_DemoVolumeSphere.C. More...
Public Member Functions | |
float | getNativeStepSize () const override |
void | getBoxes (UT_Array< UT_BoundingBox > &boxes, float radius, float dbound, float zerothreshold) const override |
void | getAttributeBinding (UT_StringArray &names, UT_IntArray &sizes) const override |
void | evaluate (const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data) const override |
UT_Vector3 | gradient (const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx) const override |
Public Member Functions inherited from VGEO_Volume | |
VGEO_Volume () | |
virtual | ~VGEO_Volume () |
virtual void | evaluateMulti (const UT_Vector3 *pos, const UT_Filter &filter, float radius, const float *time, int idx, float *data, int size, int stride) const |
virtual bool | evaluateInterval (const UT_BoundingBox &box, const UT_Filter &filter, float radius, float time, int idx, float *minval, float *maxval) const |
virtual void | intersectIsosurface (const VGEO_Ray &ray, const UT_Filter &filter, float radius, float time, int idx, float threshold, HitList &hits) const |
virtual void | intersectVolume (const VGEO_Ray &ray, HitList &hits) const |
virtual float | getGradientDelta () const |
Returns a local distance for use in default gradient calculations. More... | |
virtual int | getNormalAttribute () const |
virtual float | getVoxelSize () const |
Returns the voxel size in the same space as 'pos' in evaluate. More... | |
virtual bool | isSDF () const |
Returns true when the volume data should be interpreted as an SDF. More... | |
virtual GA_Offset | getGeoPrimitive () const |
virtual GA_Offset | getGeoVertex () const |
Public Member Functions inherited from UT_IntrusiveRefCounter< VGEO_Volume > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Additional Inherited Members | |
Static Public Member Functions inherited from VGEO_Volume | |
static void | addVoxelBoxes (const UT_VoxelArrayF &voxels, UT_Array< UT_BoundingBox > &boxes, float radius, float dbound, float zerothreshold) |
static GU_Detail * | getVoxelIsosurface (const UT_VoxelArrayF &voxels, float radius, float dbound, float zerothreshold) |
Utility method to create an isosurface from a voxel array. More... | |
Protected Member Functions inherited from UT_IntrusiveRefCounter< VGEO_Volume > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
Volume primitive used by RAY/RAY_DemoVolumeSphere.C.
Definition at line 46 of file RAY_DemoVolumeSphere.C.
|
overridevirtual |
Evaluate a volume attribute at a given position.
pos | Evaluation position |
filter | Filter function |
radius | Filter radius in voxels |
time | Evaluation time (0-1) |
idx | Attribute index (based on getAttributeBinding()) |
data | Storage for evaluation data |
Implements VGEO_Volume.
Definition at line 100 of file RAY_DemoVolumeSphere.C.
|
overridevirtual |
Return a list of attributes present in this volume. These attributes will be bound to surface shader variables when the volume is rendered. The "idx" passed into evaluation routines will be the array index returned by this operation.
Implements VGEO_Volume.
Definition at line 84 of file RAY_DemoVolumeSphere.C.
|
overridevirtual |
Return a set of bounding boxes that define the structure of the volumetric data. The boxes are used to accelerate ray intersection testing with the volume and to cull empty space for micropolygon rendering. They need not be an exact representation of the volume, though more accurate boxes will lead to more efficient renders. Specifically, the union of the boxes returned by this method should fully enclose the region of the volume to be rendered. If there is volumetric data outside all boxes, the render may contain artifacts.
Boxes should be defined locally, and need to incorporate the displacement bound.
radius | Filter radius in voxels |
dbound | Displacement bound in local space |
zerothreshold | Threshold value under which the volume is considered empty. |
Implements VGEO_Volume.
Definition at line 71 of file RAY_DemoVolumeSphere.C.
|
inlineoverridevirtual |
Return the object space step size to use when the volume quality is 1 and there is no object-level scale. For primitives based on voxel grids, this method is usually implemented by returning the voxel size.
Implements VGEO_Volume.
Definition at line 49 of file RAY_DemoVolumeSphere.C.
|
overridevirtual |
Evaluate the gradient of a volume attribute at a given position.
pos | Evaluation position |
filter | Filter function |
radius | Filter radius in voxels |
time | Evaluation time (0-1) |
idx | Attribute index (based on getAttributeBinding()) |
Reimplemented from VGEO_Volume.
Definition at line 117 of file RAY_DemoVolumeSphere.C.