| 170 | } |
| 171 | |
| 172 | void Skeleton::UnlinkFromBulletWorld() { |
| 173 | for (auto &physics_bone : physics_bones) { |
| 174 | if (physics_bone.bullet_object) { |
| 175 | bullet_world->UnlinkObject(physics_bone.bullet_object); |
| 176 | } |
| 177 | } |
| 178 | for (auto &joint : physics_joints) { |
| 179 | if (joint.bt_joint) { |
| 180 | bullet_world->UnlinkConstraint(joint.bt_joint); |
| 181 | } |
| 182 | if (joint.fixed_joint && joint.fixed_joint_enabled) { |
| 183 | bullet_world->UnlinkConstraint(joint.fixed_joint); |
| 184 | } |
| 185 | } |
| 186 | for (auto &null_constraint : null_constraints) { |
| 187 | bullet_world->UnlinkConstraint(null_constraint); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | void Skeleton::LinkToBulletWorld() { |
| 192 | int num = 0; |
no test coverage detected