HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Volumes

Functions

HAPI_DECL HAPI_GetVolumeInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_VolumeInfo *volume_info)
 Retrieve any meta-data about the volume primitive, including its transform, location, scale, taper, resolution. More...
 
HAPI_DECL HAPI_GetFirstVolumeTile (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
 Iterate through a volume based on 8x8x8 sections of the volume Start iterating through the value of the volume at part_id. More...
 
HAPI_DECL HAPI_GetNextVolumeTile (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
 Iterate through a volume based on 8x8x8 sections of the volume Continue iterating through the value of the volume at part_id. More...
 
HAPI_DECL HAPI_GetVolumeVoxelFloatData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, float *values_array, int value_count)
 Retrieve floating point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call. More...
 
HAPI_DECL HAPI_GetVolumeTileFloatData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, float fill_value, const HAPI_VolumeTileInfo *tile, float *values_array, int length)
 Retrieve floating point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value. More...
 
HAPI_DECL HAPI_GetVolumeVoxelIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, int *values_array, int value_count)
 Retrieve integer point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call. More...
 
HAPI_DECL HAPI_GetVolumeTileIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int fill_value, const HAPI_VolumeTileInfo *tile, int *values_array, int length)
 Retrieve integer point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value. More...
 
HAPI_DECL HAPI_GetHeightFieldData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, float *values_array, int start, int length)
 Get the height field data for a terrain volume as a flattened 2D array of float heights. Should call HAPI_GetVolumeInfo() first to make sure the volume info is initialized. More...
 
HAPI_DECL HAPI_SetVolumeInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const HAPI_VolumeInfo *volume_info)
 Set the volume info of a geo on a geo input. More...
 
HAPI_DECL HAPI_SetVolumeTileFloatData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const HAPI_VolumeTileInfo *tile, const float *values_array, int length)
 Set the values of a float tile: this is an 8x8x8 subsection of the volume. More...
 
HAPI_DECL HAPI_SetVolumeTileIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const HAPI_VolumeTileInfo *tile, const int *values_array, int length)
 Set the values of an int tile: this is an 8x8x8 subsection of the volume. More...
 
HAPI_DECL HAPI_SetVolumeVoxelFloatData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, const float *values_array, int value_count)
 Set the values of a float voxel in the volume. More...
 
HAPI_DECL HAPI_SetVolumeVoxelIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, const int *values_array, int value_count)
 Set the values of a integer voxel in the volume. More...
 
HAPI_DECL HAPI_GetVolumeBounds (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, float *x_min, float *y_min, float *z_min, float *x_max, float *y_max, float *z_max, float *x_center, float *y_center, float *z_center)
 Get the bounding values of a volume. More...
 
HAPI_DECL HAPI_SetHeightFieldData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const char *name, const float *values_array, int start, int length)
 Set the height field data for a terrain volume with the values from a flattened 2D array of float. HAPI_SetVolumeInfo() should be called first to make sure that the volume and its info are initialized. More...
 
HAPI_DECL HAPI_GetVolumeVisualInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_VolumeVisualInfo *visual_info)
 Retrieve the visualization meta-data of the volume. More...
 

Detailed Description

Functions for working with Volume data

Function Documentation

HAPI_DECL HAPI_GetFirstVolumeTile ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_VolumeTileInfo tile 
)

Iterate through a volume based on 8x8x8 sections of the volume Start iterating through the value of the volume at part_id.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]tileThe tile info referring to the first tile in the volume at part_id.
HAPI_DECL HAPI_GetHeightFieldData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
float values_array,
int  start,
int  length 
)

Get the height field data for a terrain volume as a flattened 2D array of float heights. Should call HAPI_GetVolumeInfo() first to make sure the volume info is initialized.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]values_arrayHeightfield flattened array. Should be at least the size of start + length.
[in]startThe start at least 0 and at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength )
  • length.
[in]lengthThe length should be at least 1 or at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength )
  • start.
HAPI_DECL HAPI_GetNextVolumeTile ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_VolumeTileInfo tile 
)

Iterate through a volume based on 8x8x8 sections of the volume Continue iterating through the value of the volume at part_id.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]tileThe tile info referring to the next tile in the set of tiles associated with the volume at this part.
HAPI_DECL HAPI_GetVolumeBounds ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
float x_min,
float y_min,
float z_min,
float x_max,
float y_max,
float z_max,
float x_center,
float y_center,
float z_center 
)

Get the bounding values of a volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]x_minThe minimum x value of the volume's bounding box. Can be null if you do not want this value.
[out]y_minThe minimum y value of the volume's bounding box. Can be null if you do not want this value.
[out]z_minThe minimum z value of the volume's bounding box. Can be null if you do not want this value.
[out]x_maxThe maximum x value of the volume's bounding box. Can be null if you do not want this value.
[out]y_maxThe maximum y value of the volume's bounding box. Can be null if you do not want this value.
[out]z_maxThe maximum z value of the volume's bounding box. Can be null if you do not want this value.
[out]x_centerThe x value of the volume's bounding box center. Can be null if you do not want this value.
[out]y_centerThe y value of the volume's bounding box center. Can be null if you do not want this value.
[out]z_centerThe z value of the volume's bounding box center. Can be null if you do not want this value.
HAPI_DECL HAPI_GetVolumeInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_VolumeInfo volume_info 
)

Retrieve any meta-data about the volume primitive, including its transform, location, scale, taper, resolution.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]volume_infoThe meta-data associated with the volume on the part specified by the previous parameters.
HAPI_DECL HAPI_GetVolumeTileFloatData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
float  fill_value,
const HAPI_VolumeTileInfo tile,
float values_array,
int  length 
)

Retrieve floating point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]fill_valueValue that will be used to fill the values_array. This is useful so that you can see what values have actually been written to.
[in]tileThe tile to retrieve.
[out]values_arrayThe values of the tile.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_GetVolumeTileIntData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  fill_value,
const HAPI_VolumeTileInfo tile,
int values_array,
int  length 
)

Retrieve integer point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]fill_valueValue that will be used to fill the values_array. This is useful so that you can see what values have actually been written to.
[in]tileThe tile to retrieve.
[out]values_arrayThe values of the tile.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_GetVolumeVisualInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_VolumeVisualInfo visual_info 
)

Retrieve the visualization meta-data of the volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[out]visual_infoThe meta-data associated with the visualization settings of the part specified by the previous parameters.
HAPI_DECL HAPI_GetVolumeVoxelFloatData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
float values_array,
int  value_count 
)

Retrieve floating point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[out]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_GetVolumeVoxelIntData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
int values_array,
int  value_count 
)

Retrieve integer point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[out]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_SetHeightFieldData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const char *  name,
const float values_array,
int  start,
int  length 
)

Set the height field data for a terrain volume with the values from a flattened 2D array of float. HAPI_SetVolumeInfo() should be called first to make sure that the volume and its info are initialized.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]values_arrayHeightfield flattened array. Should be at least the size of start + length.
[in]startThe start at least 0 and at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength ) - length.
[in]lengthThe length should be at least 1 or at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength ) - start.
[in]nameThe name of the volume used for the heightfield. If set to "height" the values will be used for height information, if not, the data will used as a mask.
HAPI_DECL HAPI_SetVolumeInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const HAPI_VolumeInfo volume_info 
)

Set the volume info of a geo on a geo input.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]volume_infoAll volume information that can be specified per volume. This includes the position, orientation, scale, data format, tuple size, and taper. The tile size is always 8x8x8.
HAPI_DECL HAPI_SetVolumeTileFloatData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const HAPI_VolumeTileInfo tile,
const float values_array,
int  length 
)

Set the values of a float tile: this is an 8x8x8 subsection of the volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]tileThe tile that the volume will be input into.
[in]values_arrayThe values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_SetVolumeTileIntData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const HAPI_VolumeTileInfo tile,
const int values_array,
int  length 
)

Set the values of an int tile: this is an 8x8x8 subsection of the volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]tileThe tile that the volume will be input into.
[in]values_arrayThe values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_SetVolumeVoxelFloatData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
const float values_array,
int  value_count 
)

Set the values of a float voxel in the volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[in]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_SetVolumeVoxelIntData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
const int values_array,
int  value_count 
)

Set the values of a integer voxel in the volume.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[in]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.