Houdini Engine 3.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Geometry Getters

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_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_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...
 

Detailed Description

Functions for reading Geometry (SOP) data

Function Documentation

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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]object_node_idThe object node id.
[out]geo_infoHAPI_GeoInfo return value.
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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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]face_counts_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::faceCount - 1.
[in]lengthMust 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[out]geo_infoHAPI_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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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. (should be a packed primitive)
[out]pointGroupCountNumber of point groups on the packed instance part. Will be set to -1 if the part is not a valid packed part.
[out]primitiveGroupCountNumber 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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]group_typeThe group type.
[in]group_nameThe 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_arrayArray 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]startStart offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType().
[in]lengthShould 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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. (should be a packed primitive)
[in]group_typeThe group type.
[in]group_nameThe 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_arrayArray 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]startStart offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType().
[in]lengthShould 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]group_typeThe group type.
[out]group_names_arrayThe 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.
Note
These string handles are only valid until the next call to HAPI_GetGroupNames().
Parameters
[in]group_countSanity 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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. (should be a packed primitive)
[in]group_typeThe group type.
[out]group_names_arrayThe array of names to be filled. Should be the size given by HAPI_GetGroupCountOnPackedInstancePart() with group_type and the HAPI_PartInfo of part_id.
Note
These string handles are only valid until the next call to HAPI_GetGroupNamesOnPackedInstancePart().
Parameters
[in]group_countSanity 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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe instancer part id.
[out]instanced_parts_arrayArray of HAPI_PartId's to instance.
[in]startShould be less than part_id's HAPI_PartInfo::instancedPartCount but more than or equal to 0.
[in]lengthShould 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().

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[in]part_idThe instancer part id.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transforms_arrayArray of HAPI_PartId's to instance.
[in]startShould be less than part_id's HAPI_PartInfo::instanceCount but more than or equal to 0.
[in]lengthShould be less than part_id's HAPI_PartInfo::instanceCount - start.
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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe SOP node id.
[in]part_idThe part id.
[out]part_infoHAPI_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.

Parameters
[in]sessionThe session of Houdini you are interacting with. See 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]vertex_list_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::vertexCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::vertexCount - start.