HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HDK_Sample::ray_VolumeSphere Class Reference

Volume primitive used by RAY/RAY_DemoVolumeSphere.C. More...

+ Inheritance diagram for HDK_Sample::ray_VolumeSphere:

Public Member Functions

virtual float getNativeStepSize () const
 
virtual void getBoxes (UT_Array< UT_BoundingBox > &boxes, float radius, float dbound, float zerothreshold) const
 
virtual void getAttributeBinding (UT_StringArray &names, UT_IntArray &sizes) const
 
virtual void evaluate (const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data) const
 
virtual UT_Vector3 gradient (const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx) const
 
- 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 ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 

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_DetailgetVoxelIsosurface (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...
 

Detailed Description

Volume primitive used by RAY/RAY_DemoVolumeSphere.C.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 46 of file RAY_DemoVolumeSphere.C.

Member Function Documentation

void ray_VolumeSphere::evaluate ( const UT_Vector3 pos,
const UT_Filter filter,
float  radius,
float  time,
int  idx,
float *  data 
) const
virtual

Evaluate a volume attribute at a given position.

Parameters
posEvaluation position
filterFilter function
radiusFilter radius in voxels
timeEvaluation time (0-1)
idxAttribute index (based on getAttributeBinding())
dataStorage for evaluation data
See Also
UT_Filter

Implements VGEO_Volume.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 100 of file RAY_DemoVolumeSphere.C.

void ray_VolumeSphere::getAttributeBinding ( UT_StringArray names,
UT_IntArray sizes 
) const
virtual

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.

  • sizes: number of floats in each attribute

Implements VGEO_Volume.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 84 of file RAY_DemoVolumeSphere.C.

void ray_VolumeSphere::getBoxes ( UT_Array< UT_BoundingBox > &  boxes,
float  radius,
float  dbound,
float  zerothreshold 
) const
virtual

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.

Parameters
radiusFilter radius in voxels
dboundDisplacement bound in local space
zerothresholdThreshold value under which the volume is considered empty.

Implements VGEO_Volume.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 71 of file RAY_DemoVolumeSphere.C.

virtual float HDK_Sample::ray_VolumeSphere::getNativeStepSize ( ) const
inlinevirtual

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.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 49 of file RAY_DemoVolumeSphere.C.

UT_Vector3 ray_VolumeSphere::gradient ( const UT_Vector3 pos,
const UT_Filter filter,
float  radius,
float  time,
int  idx 
) const
virtual

Evaluate the gradient of a volume attribute at a given position.

Parameters
posEvaluation position
filterFilter function
radiusFilter radius in voxels
timeEvaluation time (0-1)
idxAttribute index (based on getAttributeBinding())
See Also
UT_Filter

Reimplemented from VGEO_Volume.

Examples:
RAY/RAY_DemoVolumeSphere.C.

Definition at line 117 of file RAY_DemoVolumeSphere.C.


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