VRAY_Volume Class Reference

#include <VRAY_Volume.h>

Inheritance diagram for VRAY_Volume:

HDK_Sample::vray_VolumeSphere

List of all members.

Public Member Functions

 VRAY_Volume ()
virtual ~VRAY_Volume ()
virtual GEO_PrimitivegetGeoPrimitive () const
virtual GEO_VertexgetGeoVertex () const
virtual void getXform (UT_Matrix4 &xform) const
virtual void getWeightedBoxes (UT_RefArray< UT_BoundingBox > &boxes, UT_FloatArray &weights, fpreal radius, fpreal dbound) const =0
virtual void getAttributeBinding (UT_StringArray &names, UT_IntArray &sizes) const =0
virtual void evaluate (const UT_Vector3 &pos, const UT_Filter &filter, fpreal radius, fpreal time, int idx, fpreal *data) const =0
virtual bool evaluateInterval (const UT_BoundingBox &box, const UT_Filter &filter, fpreal radius, fpreal time, int idx, fpreal *minval, fpreal *maxval) const
virtual UT_Vector3 gradient (const UT_Vector3 &pos, const UT_Filter &filter, fpreal radius, fpreal time, int idx) const
virtual fpreal getGradientDelta () const
 Returns a local distance for use in default gradient calculations.
virtual int getNormalAttribute () const
virtual fpreal getVoxelSize () const
 Returns the voxel size in the same space as 'pos' in evaluate.
void bumpRef (int dir)
VRAY_Octree * getTree () const
 Function used internally to get an octree.
void setTree (VRAY_Octree *tree)
VRAY_Octree * getDisplaceTree () const
void setDisplaceTree (VRAY_Octree *tree)
void fillBinding (VEX_LateBinding &bind) const
 Function used internally to create a late binding.

Static Protected Member Functions

static void addVoxelBoxes (UT_VoxelArrayF &voxels, UT_RefArray< UT_BoundingBox > &boxes, UT_FloatArray &weights, fpreal radius, fpreal dbound)


Detailed Description

Examples:

VRAY/VRAY_DemoVolumeSphere.C.

Definition at line 43 of file VRAY_Volume.h.


Constructor & Destructor Documentation

VRAY_Volume::VRAY_Volume (  ) 

virtual VRAY_Volume::~VRAY_Volume (  )  [virtual]


Member Function Documentation

static void VRAY_Volume::addVoxelBoxes ( UT_VoxelArrayF voxels,
UT_RefArray< UT_BoundingBox > &  boxes,
UT_FloatArray weights,
fpreal  radius,
fpreal  dbound 
) [static, protected]

Utility method to create bounding boxes for every nonzero voxel in the voxel array.

void VRAY_Volume::bumpRef ( int  dir  )  [inline]

Definition at line 122 of file VRAY_Volume.h.

virtual void VRAY_Volume::evaluate ( const UT_Vector3 pos,
const UT_Filter filter,
fpreal  radius,
fpreal  time,
int  idx,
fpreal data 
) const [pure virtual]

Evaluate a volume attribute at a given position.

  • radius: filter radius in voxels

Implemented in HDK_Sample::vray_VolumeSphere.

virtual bool VRAY_Volume::evaluateInterval ( const UT_BoundingBox box,
const UT_Filter filter,
fpreal  radius,
fpreal  time,
int  idx,
fpreal minval,
fpreal maxval 
) const [inline, virtual]

Evaluate the minimum and maximum values for an attribute within a given box. If this operation is not supported, the caller will assume that the interval is unbounded.

Definition at line 94 of file VRAY_Volume.h.

void VRAY_Volume::fillBinding ( VEX_LateBinding &  bind  )  const

Function used internally to create a late binding.

virtual void VRAY_Volume::getAttributeBinding ( UT_StringArray names,
UT_IntArray sizes 
) const [pure 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

Implemented in HDK_Sample::vray_VolumeSphere.

VRAY_Octree* VRAY_Volume::getDisplaceTree (  )  const [inline]

Definition at line 132 of file VRAY_Volume.h.

virtual GEO_Primitive* VRAY_Volume::getGeoPrimitive (  )  const [inline, virtual]

Return the geometric primitive or vertex associated with the volume. These can be used to fill in primitive and detail attributes associated with the volume.

Definition at line 51 of file VRAY_Volume.h.

virtual GEO_Vertex* VRAY_Volume::getGeoVertex (  )  const [inline, virtual]

Definition at line 52 of file VRAY_Volume.h.

virtual fpreal VRAY_Volume::getGradientDelta (  )  const [inline, virtual]

Returns a local distance for use in default gradient calculations.

Definition at line 112 of file VRAY_Volume.h.

virtual int VRAY_Volume::getNormalAttribute (  )  const [inline, virtual]

Returns the volume attribute index to be used for normal vector calculations.

Definition at line 116 of file VRAY_Volume.h.

VRAY_Octree* VRAY_Volume::getTree (  )  const [inline]

Function used internally to get an octree.

Definition at line 130 of file VRAY_Volume.h.

virtual fpreal VRAY_Volume::getVoxelSize (  )  const [inline, virtual]

Returns the voxel size in the same space as 'pos' in evaluate.

Definition at line 119 of file VRAY_Volume.h.

virtual void VRAY_Volume::getWeightedBoxes ( UT_RefArray< UT_BoundingBox > &  boxes,
UT_FloatArray weights,
fpreal  radius,
fpreal  dbound 
) const [pure virtual]

Return a set of bounding boxes that define the structure of the volumetric data. Each box has an associated weight, which represents the relative importance of that part of the volume (such as the density). The boxes are used to accelerate intersection testing with the volume and to perform adaptive sampling. They need not be an exact representation of the volume, though more accurate boxes will lead to more efficient renders.

Boxes should be defined locally, and need to incorporate the displacement bound.

  • radius: filter radius in voxels
  • dbound: displacement bound in local space

Implemented in HDK_Sample::vray_VolumeSphere.

Examples:
VRAY/VRAY_DemoVolumeSphere.C.

virtual void VRAY_Volume::getXform ( UT_Matrix4 xform  )  const [virtual]

Return a local transform on the volume. All volume evaluations will be performed within this transform space. Defaults to the identity transform.

virtual UT_Vector3 VRAY_Volume::gradient ( const UT_Vector3 pos,
const UT_Filter filter,
fpreal  radius,
fpreal  time,
int  idx 
) const [virtual]

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

  • radius: filter radius in voxels

Reimplemented in HDK_Sample::vray_VolumeSphere.

void VRAY_Volume::setDisplaceTree ( VRAY_Octree *  tree  )  [inline]

Definition at line 133 of file VRAY_Volume.h.

void VRAY_Volume::setTree ( VRAY_Octree *  tree  )  [inline]

Definition at line 131 of file VRAY_Volume.h.


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

Generated on Fri May 25 00:10:56 2012 for HDK by  doxygen 1.5.9