MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DestroyCloth

Method DestroyCloth

Source/Engine/Physics/Actors/Cloth.cpp:634–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634void 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
654void Cloth::CalculateInvMasses(MeshAccessor& accessor, Array<float>& invMasses)
655{

Callers

nothing calls this directly

Calls 1

RemoveDeformerMethod · 0.80

Tested by

no test coverage detected