HDK
|
Functions | |
HAPI_DECL | HAPI_GetDisplayGeoInfo (const HAPI_Session *session, HAPI_NodeId object_node_id, HAPI_GeoInfo *geo_info) |
Get the display geo (SOP) node inside an Object node. If there there are multiple display SOP nodes, only the first one is returned. If the node is a display SOP itself, even if a network, it will return its own geo info. If the node is a SOP but not a network and not the display SOP, this function will fail. More... | |
HAPI_DECL | HAPI_GetOutputGeoCount (const HAPI_Session *session, HAPI_NodeId node_id, int *count) |
A helper method that gets the number of main geometry outputs inside an Object node or SOP node. If the node is an Object node, this method will return the cumulative number of geometry outputs for all geometry nodes that it contains. When searching for output geometry, this method will only consider subnetworks that have their display flag enabled. More... | |
HAPI_DECL | HAPI_GetOutputGeoInfos (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_GeoInfo *geo_infos_array, int count) |
Gets the geometry info structs (HAPI_GeoInfo) for a node's main geometry outputs. This method can only be called after HAPI_GetOutputGeoCount() has been called with the same node id. More... | |
HAPI_DECL | HAPI_GetGeoInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_GeoInfo *geo_info) |
Get the geometry info struct (HAPI_GeoInfo) on a SOP node. More... | |
HAPI_DECL | HAPI_GetPartInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_PartInfo *part_info) |
Get a particular part info struct. More... | |
HAPI_DECL | HAPI_GetEdgeCountOfEdgeGroup (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const char *group_name, int *edge_count) |
Gets the number of edges that belong to an edge group on a geometry part. More... | |
HAPI_DECL | HAPI_GetFaceCounts (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int *face_counts_array, int start, int length) |
Get the array of faces where the nth integer in the array is the number of vertices the nth face has. More... | |
HAPI_DECL | HAPI_GetVertexList (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int *vertex_list_array, int start, int length) |
Get array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with. More... | |
HAPI_DECL | HAPI_GetGroupNames (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_GroupType group_type, HAPI_StringHandle *group_names_array, int group_count) |
Get group names for an entire geo. Please note that this function is NOT per-part, but it is per-geo. The companion function HAPI_GetGroupMembership() IS per-part. Also keep in mind that the name string handles are only valid until the next time this function is called. More... | |
HAPI_DECL | HAPI_GetGroupMembership (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_GroupType group_type, const char *group_name, HAPI_Bool *membership_array_all_equal, int *membership_array, int start, int length) |
Get group membership. More... | |
HAPI_DECL | HAPI_GetGroupCountOnPackedInstancePart (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int *pointGroupCount, int *primitiveGroupCount) |
Get group counts for a specific packed instanced part. More... | |
HAPI_DECL | HAPI_GetGroupNamesOnPackedInstancePart (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_GroupType group_type, HAPI_StringHandle *group_names_array, int group_count) |
Get the group names for a packed instance part This functions allows you to get the group name for a specific packed primitive part. Keep in mind that the name string handles are only valid until the next time this function is called. More... | |
HAPI_DECL | HAPI_GetGroupMembershipOnPackedInstancePart (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_GroupType group_type, const char *group_name, HAPI_Bool *membership_array_all_equal, int *membership_array, int start, int length) |
Get group membership for a packed instance part This functions allows you to get the group membership for a specific packed primitive part. More... | |
HAPI_DECL | HAPI_GetInstancedPartIds (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_PartId *instanced_parts_array, int start, int length) |
Get the part ids that this instancer part is instancing. More... | |
HAPI_DECL | HAPI_GetInstancerPartTransforms (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length) |
Get the instancer part's list of transforms on which to instance the instanced parts you got from HAPI_GetInstancedPartIds(). More... | |
Functions for reading Geometry (SOP) data
HAPI_DECL HAPI_GetDisplayGeoInfo | ( | const HAPI_Session * | session, |
HAPI_NodeId | object_node_id, | ||
HAPI_GeoInfo * | geo_info | ||
) |
Get the display geo (SOP) node inside an Object node. If there there are multiple display SOP nodes, only the first one is returned. If the node is a display SOP itself, even if a network, it will return its own geo info. If the node is a SOP but not a network and not the display SOP, this function will fail.
The above implies that you can safely call this function on both OBJ and SOP asset nodes and get the same (equivalent) geometry display node back. SOP asset nodes will simply return themselves.
[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] | object_node_id | The object node id. |
[out] | geo_info | HAPI_GeoInfo return value. |
HAPI_DECL HAPI_GetEdgeCountOfEdgeGroup | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
const char * | group_name, | ||
int * | edge_count | ||
) |
Gets the number of edges that belong to an edge group on a geometry part.
[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 SOP node id. |
[in] | part_id | The part id. |
[in] | group_name | The name of the edge group. |
[out] | edge_count | The number of edges that belong to the group. |
HAPI_DECL HAPI_GetFaceCounts | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
int * | face_counts_array, | ||
int | start, | ||
int | length | ||
) |
Get the array of faces where the nth integer in the array is the number of vertices the nth face has.
[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] | face_counts_array | An integer array at least the size of length. |
[in] | start | First index of range. Must be at least 0 and at most HAPI_PartInfo::faceCount - 1. |
[in] | length | Must be at least 0 and at most HAPI_PartInfo::faceCount - start . |
HAPI_DECL HAPI_GetGeoInfo | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_GeoInfo * | geo_info | ||
) |
Get the geometry info struct (HAPI_GeoInfo) on a SOP node.
[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. |
[out] | geo_info | HAPI_GeoInfo return value. |
HAPI_DECL HAPI_GetGroupCountOnPackedInstancePart | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
int * | pointGroupCount, | ||
int * | primitiveGroupCount | ||
) |
Get group counts for a specific packed instanced part.
[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. (should be a packed primitive) |
[out] | pointGroupCount | Number of point groups on the packed instance part. Will be set to -1 if the part is not a valid packed part. |
[out] | primitiveGroupCount | Number of primitive groups on the instanced part. Will be set to -1 if the part is not a valid instancer |
HAPI_DECL HAPI_GetGroupMembership | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_GroupType | group_type, | ||
const char * | group_name, | ||
HAPI_Bool * | membership_array_all_equal, | ||
int * | membership_array, | ||
int | start, | ||
int | length | ||
) |
Get group membership.
[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] | group_type | The group type. |
[in] | group_name | The group name. |
[out] | membership_array_all_equal | (optional) Quick way to determine if all items are in the given group or all items our not in the group. If you do not need this information or you are getting edge group information, you can just pass NULL for this argument. |
[out] | membership_array | Array of ints that represent the membership of this group. When getting membership information for a point or primitive group, the size of the array should be the size given by HAPI_PartInfo_GetElementCountByGroupType() with group_type and the HAPI_PartInfo of part_id . When retrieving the edges belonging to an edge group, the membership array will be filled with point numbers that comprise the edges of the edge group. Each edge is specified by two points, which means that the size of the array should be the size given by HAPI_GetEdgeCountOfEdgeGroup() * 2. |
[in] | start | Start offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType() when it is a point or primitive group. When getting the membership information for an edge group, this argument must be less than the size returned by HAPI_GetEdgeCountOfEdgeGroup() * 2 - 1. |
[in] | length | Should be less than or equal to the size of membership_array . |
HAPI_DECL HAPI_GetGroupMembershipOnPackedInstancePart | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_GroupType | group_type, | ||
const char * | group_name, | ||
HAPI_Bool * | membership_array_all_equal, | ||
int * | membership_array, | ||
int | start, | ||
int | length | ||
) |
Get group membership for a packed instance part This functions allows you to get the group membership for a specific packed primitive part.
[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. (should be a packed primitive) |
[in] | group_type | The group type. |
[in] | group_name | The group name. |
[out] | membership_array_all_equal | (optional) Quick way to determine if all items are in the given group or all items our not in the group. You can just pass NULL here if not interested. |
[out] | membership_array | Array of ints that represent the membership of this group. Should be the size given by HAPI_PartInfo_GetElementCountByGroupType() with group_type and the HAPI_PartInfo of part_id . |
[in] | start | Start offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType(). |
[in] | length | Should be less than or equal to the size of membership_array . |
HAPI_DECL HAPI_GetGroupNames | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_GroupType | group_type, | ||
HAPI_StringHandle * | group_names_array, | ||
int | group_count | ||
) |
Get group names for an entire geo. Please note that this function is NOT per-part, but it is per-geo. The companion function HAPI_GetGroupMembership() IS per-part. Also keep in mind that the name string handles are only valid until the next time this function is called.
[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] | group_type | The group type. |
[out] | group_names_array | The array of names to be filled. Should be the size given by HAPI_GeoInfo_GetGroupCountByType() with group_type and the HAPI_GeoInfo of geo_id . |
[in] | group_count | Sanity check. Should be less than or equal to the size of group_names . |
HAPI_DECL HAPI_GetGroupNamesOnPackedInstancePart | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_GroupType | group_type, | ||
HAPI_StringHandle * | group_names_array, | ||
int | group_count | ||
) |
Get the group names for a packed instance part This functions allows you to get the group name for a specific packed primitive part. Keep in mind that the name string handles are only valid until the next time this function is called.
[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. (should be a packed primitive) |
[in] | group_type | The group type. |
[out] | group_names_array | The array of names to be filled. Should be the size given by HAPI_GetGroupCountOnPackedInstancePart() with group_type and the HAPI_PartInfo of part_id . |
[in] | group_count | Sanity check. Should be less than or equal to the size of group_names . |
HAPI_DECL HAPI_GetInstancedPartIds | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_PartId * | instanced_parts_array, | ||
int | start, | ||
int | length | ||
) |
Get the part ids that this instancer part is instancing.
[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 instancer part id. |
[out] | instanced_parts_array | Array of HAPI_PartId's to instance. |
[in] | start | Should be less than part_id's HAPI_PartInfo::instancedPartCount but more than or equal to 0. |
[in] | length | Should be less than part_id's HAPI_PartInfo::instancedPartCount - start . |
HAPI_DECL HAPI_GetInstancerPartTransforms | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_RSTOrder | rst_order, | ||
HAPI_Transform * | transforms_array, | ||
int | start, | ||
int | length | ||
) |
Get the instancer part's list of transforms on which to instance the instanced parts you got from HAPI_GetInstancedPartIds().
[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 instancer part id. |
[in] | rst_order | The order of application of translation, rotation and scale. |
[out] | transforms_array | Array of HAPI_PartId's to instance. |
[in] | start | Should be less than part_id's HAPI_PartInfo::instanceCount but more than or equal to 0. |
[in] | length | Should be less than part_id's HAPI_PartInfo::instanceCount - start . |
HAPI_DECL HAPI_GetOutputGeoCount | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
int * | count | ||
) |
A helper method that gets the number of main geometry outputs inside an Object node or SOP node. If the node is an Object node, this method will return the cumulative number of geometry outputs for all geometry nodes that it contains. When searching for output geometry, this method will only consider subnetworks that have their display flag enabled.
This method must be called before HAPI_GetOutputGeoInfos() is called.
[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 of the Object or SOP node to get the geometry output count of. |
[out] | count | The number of geometry (SOP) outputs. |
HAPI_DECL HAPI_GetOutputGeoInfos | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_GeoInfo * | geo_infos_array, | ||
int | count | ||
) |
Gets the geometry info structs (HAPI_GeoInfo) for a node's main geometry outputs. This method can only be called after HAPI_GetOutputGeoCount() has been called with the same node 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 of the Object or SOP node to get the output geometry info structs (HAPI_GeoInfo) for. |
[out] | geo_infos_array | Output array where the output geometry info structs will be stored. The size of the array must match the count argument returned by the HAPI_GetOutputGeoCount() method. |
[in] | count | Sanity check count. The count must be equal to the count returned by the HAPI_GetOutputGeoCount() method. |
HAPI_DECL HAPI_GetPartInfo | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
HAPI_PartInfo * | part_info | ||
) |
Get a particular part info struct.
[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 SOP node id. |
[in] | part_id | The part id. |
[out] | part_info | HAPI_PartInfo return value. |
HAPI_DECL HAPI_GetVertexList | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
HAPI_PartId | part_id, | ||
int * | vertex_list_array, | ||
int | start, | ||
int | length | ||
) |
Get array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with.
[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] | vertex_list_array | An integer array at least the size of length. |
[in] | start | First index of range. Must be at least 0 and at most HAPI_PartInfo::vertexCount - 1. |
[in] | length | Must be at least 0 and at most HAPI_PartInfo::vertexCount - start . |