Update sceneDesc to non-pointer

This commit is contained in:
bloeys
2022-02-19 07:11:06 +04:00
parent fa291d4e4c
commit 1b0d545d82
3 changed files with 14 additions and 7 deletions

View File

@ -20,9 +20,16 @@ extern "C" {
/// </summary>
/// <param name="CPxTolerancesScale"></param>
/// <returns></returns>
CPxAPI CSTRUCT CPxSceneDesc* NewCPxSceneDesc(CSTRUCT CPxTolerancesScale);
CPxAPI CSTRUCT CPxSceneDesc NewCPxSceneDesc(CSTRUCT CPxTolerancesScale);
CPxAPI void CPxSceneDesc_set_gravity(CSTRUCT CPxSceneDesc*, CSTRUCT CPxVec3);
CPxAPI void CPxSceneDesc_set_cpuDispatcher(CSTRUCT CPxSceneDesc*, CSTRUCT CPxCpuDispatcher*);
//CPxSceneDesc_set_onContactCallback sets the contact callback handler of the given scene descriptor.
//The callback is sent an object of type 'CPxContactPairHeader*'. This object is only valid for the duration of the callback handler.
//Therefore, the callback handler MUST copy data it wishes to keep for longer than the lifetime of the callback handler, as the memory it was handed might be reused/freed.
//
//NOTE: This function assumes you are using the default physx-c callback handler. Do NOT use this function if you set 'sceneDesc->simulationEventCallback' with your own custom implementation.
CPxAPI void CPxSceneDesc_set_onContactCallback(CSTRUCT CPxSceneDesc*, CPxonContactCallback cb);
CPxAPI void FreeCPxSceneDesc(CSTRUCT CPxSceneDesc*);