HDK
|
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... | |
Functions for working with Volume data
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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | tile | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | values_array | Heightfield flattened array. Should be at least the size of start + length . |
[in] | start | The start at least 0 and at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength )
|
[in] | length | The length should be at least 1 or at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength )
|
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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | tile | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | x_min | The minimum x value of the volume's bounding box. Can be null if you do not want this value. |
[out] | y_min | The minimum y value of the volume's bounding box. Can be null if you do not want this value. |
[out] | z_min | The minimum z value of the volume's bounding box. Can be null if you do not want this value. |
[out] | x_max | The maximum x value of the volume's bounding box. Can be null if you do not want this value. |
[out] | y_max | The maximum y value of the volume's bounding box. Can be null if you do not want this value. |
[out] | z_max | The maximum z value of the volume's bounding box. Can be null if you do not want this value. |
[out] | x_center | The x value of the volume's bounding box center. Can be null if you do not want this value. |
[out] | y_center | The y value of the volume's bounding box center. Can be null if you do not want this value. |
[out] | z_center | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | volume_info | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | fill_value | Value 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] | tile | The tile to retrieve. |
[out] | values_array | The values of the tile. |
[in] | length | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | fill_value | Value 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] | tile | The tile to retrieve. |
[out] | values_array | The values of the tile. |
[in] | length | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[out] | visual_info | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | x_index | The x index/coordinate of the voxel. |
[in] | y_index | The y index/coordinate of the voxel. |
[in] | z_index | The z index/coordinate of the voxel. |
[out] | values_array | The values of the voxel. |
[in] | value_count | Should 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | x_index | The x index/coordinate of the voxel. |
[in] | y_index | The y index/coordinate of the voxel. |
[in] | z_index | The z index/coordinate of the voxel. |
[out] | values_array | The values of the voxel. |
[in] | value_count | Should 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | values_array | Heightfield flattened array. Should be at least the size of start + length . |
[in] | start | The start at least 0 and at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength ) - length . |
[in] | length | The length should be at least 1 or at most ( HAPI_VolumeInfo::xLength * HAPI_VolumeInfo::yLength ) - start . |
[in] | name | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | volume_info | All 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | tile | The tile that the volume will be input into. |
[in] | values_array | The values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize. |
[in] | length | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | tile | The tile that the volume will be input into. |
[in] | values_array | The values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize. |
[in] | length | The 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | x_index | The x index/coordinate of the voxel. |
[in] | y_index | The y index/coordinate of the voxel. |
[in] | z_index | The z index/coordinate of the voxel. |
[in] | values_array | The values of the voxel. |
[in] | value_count | Should 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.
[in] | session | The 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_id | The node id. |
[in] | part_id | The part id. |
[in] | x_index | The x index/coordinate of the voxel. |
[in] | y_index | The y index/coordinate of the voxel. |
[in] | z_index | The z index/coordinate of the voxel. |
[in] | values_array | The values of the voxel. |
[in] | value_count | Should be equal to the volume's HAPI_VolumeInfo::tupleSize. |