Houdini Engine 7.0
 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_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...
 

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

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.
[in]group_nameThe name of the edge group.
[out]edge_countThe 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.

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. If you do not need this information or you are getting edge group information, you can just pass NULL for this argument.
[out]membership_arrayArray 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]startStart 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]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_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.

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 of the Object or SOP node to get the geometry output count of.
[out]countThe 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.

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 of the Object or SOP node to get the output geometry info structs (HAPI_GeoInfo) for.
[out]geo_infos_arrayOutput 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]countSanity 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.

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.