|
HAPI_DECL | HAPI_ConvertTransform (const HAPI_Session *session, const HAPI_TransformEuler *transform_in, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out) |
| Converts the transform described by a HAPI_TransformEuler struct into a different transform and rotation order. More...
|
|
HAPI_DECL | HAPI_ConvertMatrixToQuat (const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_Transform *transform_out) |
| Converts a 4x4 matrix into its TRS form. More...
|
|
HAPI_DECL | HAPI_ConvertMatrixToEuler (const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out) |
| Converts a 4x4 matrix into its TRS form. More...
|
|
HAPI_DECL | HAPI_ConvertTransformQuatToMatrix (const HAPI_Session *session, const HAPI_Transform *transform, float *matrix) |
| Converts HAPI_Transform into a 4x4 transform matrix. More...
|
|
HAPI_DECL | HAPI_ConvertTransformEulerToMatrix (const HAPI_Session *session, const HAPI_TransformEuler *transform, float *matrix) |
| Converts HAPI_TransformEuler into a 4x4 transform matrix. More...
|
|
HAPI_DECL | HAPI_PythonThreadInterpreterLock (const HAPI_Session *session, HAPI_Bool locked) |
| Acquires or releases the Python interpreter lock. This is needed if HAPI is called from Python and HAPI is in threaded mode (see HAPI_Initialize()). More...
|
|
Utility math and other functions
Converts a 4x4 matrix into its TRS form.
- Parameters
-
[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] | matrix | A 4x4 matrix expressed in a 16 element float array. |
[in] | rst_order | The desired transform order of the output. |
[in] | rot_order | The desired rotation order of the output. |
[out] | transform_out | Used for the output. |
Converts a 4x4 matrix into its TRS form.
- Parameters
-
[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] | matrix | A 4x4 matrix expressed in a 16 element float array. |
[in] | rst_order | The desired transform order of the output. |
[out] | transform_out | Used for the output. |
Converts the transform described by a HAPI_TransformEuler struct into a different transform and rotation order.
- Parameters
-
[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] | transform_in | The transform to be converted. |
[in] | rst_order | The desired transform order of the output. |
[in] | rot_order | The desired rotation order of the output. |
[out] | transform_out | The converted transform. |
Converts HAPI_TransformEuler into a 4x4 transform matrix.
- Parameters
-
[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] | transform | The HAPI_TransformEuler you wish to convert. |
[out] | matrix | A 16 element float array that will contain the result. |
Converts HAPI_Transform into a 4x4 transform matrix.
- Parameters
-
[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] | transform | The HAPI_Transform you wish to convert. |
[out] | matrix | A 16 element float array that will contain the result. |
Acquires or releases the Python interpreter lock. This is needed if HAPI is called from Python and HAPI is in threaded mode (see HAPI_Initialize()).
The problem arises when async functions like HAPI_CreateNode() may start a cooking thread that may try to run Python code. That is, we would now have Python running on two different threads - something not allowed by Python by default.
We need to tell Python to explicitly "pause" the Python state on the client thread while we run Python in our cooking thread.
You must call this function first with locked == true before any async HAPI call. Then, after the async call finished, detected via calls to HAPI_GetStatus(), call this method again to release the lock with locked == false.
- Parameters
-
[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] | locked | True will acquire the interpreter lock to use it for the HAPI cooking thread. False will release the lock back to the client thread. |