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

Functions

HAPI_DECL HAPI_CreateInputCurveNode (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_NodeId *node_id, const char *name)
 Helper for creating specifically creating a curve input geometry SOP. Inside the specified parent node, this will create a Null SOP that contains the the HAPI_ATTRIB_INPUT_CURVE_COORDS attribute. It will setup the node as a curve part with no points. In addition to creating the input node, it will also commit and cook the geometry. More...
 
HAPI_DECL HAPI_GetInputCurveInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_InputCurveInfo *info)
 Retrieve meta-data about the input curves, including the curve's type, order, and whether or not the curve is closed and reversed. More...
 
HAPI_DECL HAPI_SetInputCurveInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const HAPI_InputCurveInfo *info)
 Set meta-data for the input curves, including the curve type, order, reverse and closed properties. More...
 
HAPI_DECL HAPI_SetInputCurvePositions (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const float *positions_array, int start, int length)
 Sets the positions for input curves, doing checks for curve validity, and adjusting the curve settings accordingly. Will also cook the node. More...
 
HAPI_DECL HAPI_SetInputCurvePositionsRotationsScales (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const float *positions_array, int positions_start, int positions_length, const float *rotations_array, int rotations_start, int rotations_length, const float *scales_array, int scales_start, int scales_length)
 Sets the positions for input curves, doing checks for curve validity, and adjusting the curve settings accordingly. Will also cook the node. Additionally, adds rotation and scale attributes to the curve. More...
 

Detailed Description

Functions for working with curves

Function Documentation

HAPI_DECL HAPI_CreateInputCurveNode ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_NodeId node_id,
const char *  name 
)

Helper for creating specifically creating a curve input geometry SOP. Inside the specified parent node, this will create a Null SOP that contains the the HAPI_ATTRIB_INPUT_CURVE_COORDS attribute. It will setup the node as a curve part with no points. In addition to creating the input node, it will also commit and cook the geometry.

Note that when saving the Houdini scene using HAPI_SaveHIPFile() the nodes created with this method will be green and will start with the name "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]parent_node_idThe node id of the parent OBJ node or SOP subnetwork node in which the input node should be created, or -1 to create a new dummy parent OBJ node for this input node.
[out]node_idNewly created node's id. Use HAPI_GetNodeInfo() to get more information about the node.
[in]nameGive this input node a name for easy debugging. The node's parent OBJ node and the Null SOP node will both get this given name with "input_" prepended. You can also pass NULL in which case the name will be "input#" where # is some number.
HAPI_DECL HAPI_GetInputCurveInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_InputCurveInfo info 
)

Retrieve meta-data about the input curves, including the curve's type, order, and whether or not the curve is closed and reversed.

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]infoThe curve info represents the meta-data about the curves, including the type, order, and closed and reversed values.
HAPI_DECL HAPI_SetInputCurveInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const HAPI_InputCurveInfo info 
)

Set meta-data for the input curves, including the curve type, order, reverse and closed properties.

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_idCurrently unused. Input asset geos are assumed to have only one part.
[in]infoThe curve info represents the meta-data about the curves, including the type, order, and closed and reverse properties.
HAPI_DECL HAPI_SetInputCurvePositions ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const float positions_array,
int  start,
int  length 
)

Sets the positions for input curves, doing checks for curve validity, and adjusting the curve settings accordingly. Will also cook the node.

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_idCurrently unused. Input asset geos are assumed to have only one part.
[in]positions_arrayA float array representing the positions attribute. It will read the array assuming a tuple size of 3. Note that this function does not do any coordinate axes conversion.
[in]startThe index of the first position in positions_array.
[in]lengthThe size of the positions array.
HAPI_DECL HAPI_SetInputCurvePositionsRotationsScales ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const float positions_array,
int  positions_start,
int  positions_length,
const float rotations_array,
int  rotations_start,
int  rotations_length,
const float scales_array,
int  scales_start,
int  scales_length 
)

Sets the positions for input curves, doing checks for curve validity, and adjusting the curve settings accordingly. Will also cook the node. Additionally, adds rotation and scale attributes to the curve.

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_idCurrently unused. Input asset geos are assumed to have only one part.
[in]positions_arrayA float array representing the positions attribute. It will read the array assuming a tuple size of 3. Note that this function does not do any coordinate axes conversion.
[in]positions_arrayA float array representing the positions attribute. It will read the array assuming a tuple size of 3. Note that this function does not do any coordinate axes conversion.
[in]positions_startThe index of the first position in positions_array.
[in]positions_lengthThe size of the positions array.
[in]rotations_arrayA float array representing the rotation (rot) attribute. It will read the array assuming a tuple size of 4 representing quaternion values
[in]rotations_startThe index of the first rotation in rotations_array.
[in]rotations_lengthThe size of the rotations array.
[in]scales_arrayA float array representing the scale attribute. It will read the array assuming a tuple size of 3
[in]scales_startThe index of the first scale in scales_array.
[in]scales_lengthThe size of the scales array.