| 632 | } |
| 633 | |
| 634 | void Cloth::DestroyCloth() |
| 635 | { |
| 636 | #if WITH_CLOTH |
| 637 | _lastMinDstSqr = MAX_Real; |
| 638 | if (_meshDeformation) |
| 639 | { |
| 640 | Function<void(const MeshBase*, MeshDeformationData&)> deformer; |
| 641 | deformer.Bind<Cloth, &Cloth::RunClothDeformer>(this); |
| 642 | _meshDeformation->RemoveDeformer(_mesh.LODIndex, _mesh.MeshIndex, MeshBufferType::Vertex0, deformer); |
| 643 | _meshDeformation->RemoveDeformer(_mesh.LODIndex, _mesh.MeshIndex, MeshBufferType::Vertex1, deformer); |
| 644 | _meshDeformation = nullptr; |
| 645 | } |
| 646 | if (_cloth) |
| 647 | { |
| 648 | PhysicsBackend::DestroyCloth(_cloth); |
| 649 | _cloth = nullptr; |
| 650 | } |
| 651 | #endif |
| 652 | } |
| 653 | |
| 654 | void Cloth::CalculateInvMasses(MeshAccessor& accessor, Array<float>& invMasses) |
| 655 | { |
nothing calls this directly
no test coverage detected