Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/143.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ PhysX联合反序列化问题_C++_Deserialization_Physx - Fatal编程技术网

C++ PhysX联合反序列化问题

C++ PhysX联合反序列化问题,c++,deserialization,physx,C++,Deserialization,Physx,我现在正在调查PhysX,我一直坚持序列化。当我尝试序列化关节时,反序列化失败,出现错误: code: 8 message: NpActorTemplate::resolvePointers: connector not found. file: ..\..\PhysX\src\NpActor.cpp line: 95 但是如果没有关节,它可以很好地工作并反序列化所有对象。是否需要任何其他操作来正确序列化关节?代码中有一个序列化部分: material1->collectForExpor

我现在正在调查PhysX,我一直坚持序列化。当我尝试序列化关节时,反序列化失败,出现错误:

code: 8
message: NpActorTemplate::resolvePointers: connector not found.
file: ..\..\PhysX\src\NpActor.cpp
line: 95
但是如果没有关节,它可以很好地工作并反序列化所有对象。是否需要任何其他操作来正确序列化关节?代码中有一个序列化部分:

material1->collectForExport(*collection);
material->collectForExport(*collection);
mesh->collectForExport(*collection);
for (__int8 i = 0; i < 4; ++i)
{
    actors[i]->collectForExport(*collection);
    aggregate->addActor(*actors[i]);
}
aggregate->collectForExport(*collection);

joints[0] = PxD6JointCreate(*physics, actors[0], PxTransform(PxVec3(2, -.5f, 0)), actors[1], PxTransform(PxVec3(0)));
PxD6JointDrive drive(1000, 100, PX_MAX_F32, true);
joints[0]->setMotion(PxD6Axis::eX, PxD6Motion::eFREE);
joints[0]->setMotion(PxD6Axis::eY, PxD6Motion::eFREE);
joints[0]->setMotion(PxD6Axis::eZ, PxD6Motion::eFREE);
joints[0]->setDrive(PxD6Drive::eX, drive);
joints[0]->setDrive(PxD6Drive::eY, drive);
joints[0]->setDrive(PxD6Drive::eZ, drive);
joints[0]->setDrivePosition(PxTransform(PxVec3(2, -.5f, 0)));
joints[0]->setDriveVelocity(PxVec3(0), PxVec3(0));
for (__int8 i = 0; i < 1; ++i)
{
    joints[i]->collectForExport(*collection);
}
_pxBuffer = _aligned_malloc(length, PX_SERIAL_FILE_ALIGN);
//filling the buffer here
_pxCollection = pxContext->GetPhysics()->createCollection();
_pxCollection->deserialize(_pxBuffer, 0, 0);