|
|
@@ -395,6 +395,11 @@ create_actor(PhysxActorDesc &desc) {
|
|
|
nassertr(actorPtr, NULL);
|
|
|
|
|
|
actor->link(actorPtr);
|
|
|
+ actor->set_name(desc._desc.name);
|
|
|
+
|
|
|
+ for (unsigned int i=0; i < actor->get_num_shapes(); i++) {
|
|
|
+ actor->get_shape(i)->set_name(desc._desc.shapes[i]->name);
|
|
|
+ }
|
|
|
|
|
|
return actor;
|
|
|
}
|
|
|
@@ -759,6 +764,7 @@ create_joint(PhysxJointDesc &desc) {
|
|
|
nassertr(jointPtr, NULL);
|
|
|
|
|
|
joint->link(jointPtr);
|
|
|
+ joint->set_name(desc.ptr()->name);
|
|
|
|
|
|
return joint;
|
|
|
}
|
|
|
@@ -820,6 +826,11 @@ create_force_field(PhysxForceFieldDesc &desc) {
|
|
|
nassertr(fieldPtr, NULL);
|
|
|
|
|
|
field->link(fieldPtr);
|
|
|
+ field->set_name(desc._desc.name);
|
|
|
+
|
|
|
+ for (unsigned int i=0; i < field->get_num_shape_groups(); i++) {
|
|
|
+ field->get_shape_group(i)->set_name(desc._desc.shapeGroups[i]->getName());
|
|
|
+ }
|
|
|
|
|
|
return field;
|
|
|
}
|
|
|
@@ -873,6 +884,7 @@ create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc) {
|
|
|
nassertr(groupPtr, NULL);
|
|
|
|
|
|
group->link(groupPtr);
|
|
|
+ group->set_name(strdup(desc._desc.name));
|
|
|
|
|
|
return group;
|
|
|
}
|
|
|
@@ -928,14 +940,7 @@ create_cloth(PhysxClothDesc &desc) {
|
|
|
nassertr(clothPtr, NULL);
|
|
|
|
|
|
cloth->link(clothPtr);
|
|
|
-
|
|
|
- // TODO:
|
|
|
-
|
|
|
- // Allocate buffers in the cloth's geom node (PhysxMeshNode)
|
|
|
- //NxU32 numVertices = 0;
|
|
|
- //NxU32 numTriangles = 0;
|
|
|
- //desc.get_mesh_numbers(numVertices, numTriangles);
|
|
|
- //cloth->get_cloth_node()->allocate(numVertices, numTriangles, cloth);
|
|
|
+ cloth->set_name(desc._desc.name);
|
|
|
|
|
|
return cloth;
|
|
|
}
|