| 1400 | } |
| 1401 | |
| 1402 | PxRigidDynamic* SampleVehicle::addDynamicObstacle |
| 1403 | (const PxTransform& transform, const PxF32 mass, const PxU32 numShapes, PxTransform* shapeTransforms, PxGeometry** shapeGeometries, PxMaterial** shapeMaterials) |
| 1404 | { |
| 1405 | PxFilterData simFilterData; |
| 1406 | simFilterData.word0=COLLISION_FLAG_OBSTACLE; |
| 1407 | simFilterData.word1=COLLISION_FLAG_OBSTACLE_AGAINST; |
| 1408 | PxFilterData qryFilterData; |
| 1409 | SampleVehicleSetupNonDrivableShapeQueryFilterData(&qryFilterData); |
| 1410 | |
| 1411 | PxRigidDynamic* actor = getPhysics().createRigidDynamic(transform); |
| 1412 | for(PxU32 i=0;i<numShapes;i++) |
| 1413 | { |
| 1414 | PxShape* shape = PxRigidActorExt::createExclusiveShape(*actor, *shapeGeometries[i], *shapeMaterials[i]); |
| 1415 | shape->setLocalPose(shapeTransforms[i]); |
| 1416 | shape->setSimulationFilterData(simFilterData); |
| 1417 | shape->setQueryFilterData(qryFilterData); |
| 1418 | } |
| 1419 | |
| 1420 | PxRigidBodyExt::setMassAndUpdateInertia(*actor,mass); |
| 1421 | getActiveScene().addActor(*actor); |
| 1422 | createRenderObjectsFromActor(actor); |
| 1423 | return actor; |
| 1424 | } |
| 1425 | |
| 1426 | PxRigidDynamic* SampleVehicle::addDynamicDrivableObstacle |
| 1427 | (const PxTransform& transform, const PxF32 mass, const PxU32 numShapes, PxTransform* shapeTransforms, PxGeometry** shapeGeometries, PxMaterial** shapeMaterials) |
nothing calls this directly
no test coverage detected