123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- /*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
- #include <AZTestShared/Math/MathTestHelpers.h>
- #include <AzCore/Interface/Interface.h>
- #include <AzCore/Component/TickBus.h>
- #include <UnitTestHelper.h>
- #include <TriangleInputHelper.h>
- #include <NvCloth/IClothSystem.h>
- #include <NvCloth/ISolver.h>
- #include <NvCloth/ICloth.h>
- #include <NvCloth/IFabricCooker.h>
- #include <System/Cloth.h>
- #include <System/Solver.h>
- namespace UnitTest
- {
- TEST(NvClothSystem, ClothSystem_DefaultSolver_Exists)
- {
- NvCloth::ISolver* defaultSolver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(NvCloth::DefaultSolverName);
- EXPECT_TRUE(defaultSolver != nullptr);
- EXPECT_TRUE(defaultSolver->GetName() == NvCloth::DefaultSolverName);
- }
- TEST(NvClothSystem, ClothSystem_FindOrCreateSolverDefaultName_ReturnsDefaultSolver)
- {
- NvCloth::ISolver* defaultSolverFromGetter = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(NvCloth::DefaultSolverName);
- NvCloth::ISolver* defaultSolverFromFindOrCreateFunc = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(NvCloth::DefaultSolverName);
- EXPECT_EQ(defaultSolverFromGetter, defaultSolverFromFindOrCreateFunc);
- }
- TEST(NvClothSystem, ClothSystem_FindOrCreateSolverEmptyName_ReturnsNull)
- {
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver("");
- EXPECT_TRUE(solver == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_FindOrCreateSolver_ReturnsValidSolver)
- {
- const AZStd::string solverName = "Solver_FindOrCreateSolver";
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(solverName);
- EXPECT_TRUE(solver != nullptr);
- EXPECT_TRUE(solver->GetName() == solverName);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying solver to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- }
- TEST(NvClothSystem, ClothSystem_FindOrCreateSolverTwice_ReturnsSameSolver)
- {
- const AZStd::string solverName = "Solver_FindOrCreateSolverTwice";
- NvCloth::ISolver* solverA = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(solverName);
- NvCloth::ISolver* solverB = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(solverName);
- EXPECT_EQ(solverA, solverB);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying solver to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solverA);
- }
- TEST(NvClothSystem, ClothSystem_DestroySolverNullptr_DoesNotFail)
- {
- NvCloth::ISolver* solver = nullptr;
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- EXPECT_TRUE(solver == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_DestroySolver_SolverIsDestroyed)
- {
- const AZStd::string solverName = "Solver_DestroySolver";
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(solverName);
- EXPECT_TRUE(solver != nullptr);
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- EXPECT_TRUE(solver == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetSolverEmpyName_ReturnsNull)
- {
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver("");
- EXPECT_TRUE(solver == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetSolverUnknownName_ReturnsNull)
- {
- const AZStd::string solverName = "Solver_GetSolverUnknownName";
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(solverName);
- EXPECT_TRUE(solver == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetSolver_ReturnsSolver)
- {
- const AZStd::string solverName = "Solver_GetSolver";
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver(solverName);
- NvCloth::ISolver* solverFromGetter = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(solverName);
- EXPECT_TRUE(solver != nullptr);
- EXPECT_EQ(solver, solverFromGetter);
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- solverFromGetter = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(solverName);
- EXPECT_TRUE(solverFromGetter == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_CreateClothNoInitialParticles_ReturnsNull)
- {
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth({}, {});
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_CreateClothInvalidFabric_ReturnsNull)
- {
- const float width = 1.0f;
- const float height = 1.0f;
- const AZ::u32 segmentsX = 5;
- const AZ::u32 segmentsY = 5;
- const TriangleInput planeXY = CreatePlane(width, height, segmentsX, segmentsY);
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(planeXY.m_vertices, {});
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_CreateClothInitialParticlesMismatchFabricNumParticles_ReturnsNull)
- {
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- auto otherVertices = fabricCookedData.m_particles;
- otherVertices.resize(otherVertices.size() / 2);
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(
- otherVertices, // otherVertices has a different number of vertices than FabricCookedData
- fabricCookedData);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_CreateCloth_ReturnsValidCloth)
- {
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- EXPECT_TRUE(cloth != nullptr);
- EXPECT_TRUE(cloth->GetId().IsValid());
- EXPECT_THAT(cloth->GetInitialParticles(), ::testing::Pointwise(ContainerIsCloseTolerance(Tolerance), fabricCookedData.m_particles));
- EXPECT_EQ(cloth->GetInitialIndices(), fabricCookedData.m_indices);
- EXPECT_THAT(cloth->GetParticles(), ::testing::Pointwise(ContainerIsCloseTolerance(Tolerance), fabricCookedData.m_particles));
- EXPECT_NE(cloth->GetClothConfigurator(), nullptr);
- ExpectEq(cloth->GetFabricCookedData(), fabricCookedData);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_DestroyClothNullptr_DoesNotFail)
- {
- NvCloth::ICloth* cloth = nullptr;
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_DestroyCloth_ClothIsDestroyed)
- {
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- EXPECT_TRUE(cloth != nullptr);
- EXPECT_TRUE(cloth->GetId().IsValid());
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetClothInvalidId_ReturnsNull)
- {
- const NvCloth::ClothId clothId;
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->GetCloth(clothId);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetClothUnknownId_ReturnsNull)
- {
- const NvCloth::ClothId clothId(5);
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->GetCloth(clothId);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_GetCloth_ReturnsCloth)
- {
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- EXPECT_TRUE(cloth != nullptr);
- EXPECT_TRUE(cloth->GetId().IsValid());
- NvCloth::ICloth* clothFromGetter = AZ::Interface<NvCloth::IClothSystem>::Get()->GetCloth(cloth->GetId());
- EXPECT_TRUE(clothFromGetter != nullptr);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_AddClothNull_ReturnsFalse)
- {
- NvCloth::ICloth* cloth = nullptr;
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth);
- EXPECT_FALSE(clothAdded);
- }
- TEST(NvClothSystem, ClothSystem_AddClothToInvalidSolver_ReturnsFalse)
- {
- const AZStd::string solverName = "";
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth, solverName);
- EXPECT_FALSE(clothAdded);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_AddClothToNonExistentSolver_ReturnsFalse)
- {
- const AZStd::string solverName = "Solver_AddClothToNonExistentSolver";
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth, solverName);
- EXPECT_FALSE(clothAdded);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_AddClothToDefaultSolver_ReturnsTrue)
- {
- NvCloth::ISolver* defaultSolver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 0);
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth);
- EXPECT_TRUE(clothAdded);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver()->GetName() == NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 1);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_AddClothToSolver_ReturnsTrue)
- {
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver("Solver_AddClothToSolver");
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(solver)->GetNumCloths() == 0);
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth, solver->GetName());
- EXPECT_TRUE(clothAdded);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver()->GetName() == solver->GetName());
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(solver)->GetNumCloths() == 1);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth and solver to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- }
- TEST(NvClothSystem, ClothSystem_AddClothTwice_NothingHappensSecondTime)
- {
- NvCloth::ISolver* defaultSolver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 0);
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver() == nullptr);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth);
- EXPECT_TRUE(clothAdded);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver()->GetName() == NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 1);
- clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth);
- EXPECT_TRUE(clothAdded);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver()->GetName() == NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 1);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_RemoveClothNull_NothingHappens)
- {
- NvCloth::ICloth* cloth = nullptr;
- AZ::Interface<NvCloth::IClothSystem>::Get()->RemoveCloth(cloth);
- EXPECT_TRUE(cloth == nullptr);
- }
- TEST(NvClothSystem, ClothSystem_RemoveClothTwice_NothingHappensSecondTime)
- {
- NvCloth::ISolver* defaultSolver = AZ::Interface<NvCloth::IClothSystem>::Get()->GetSolver(NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 0);
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool clothAdded = AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth);
- EXPECT_TRUE(clothAdded);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver()->GetName() == NvCloth::DefaultSolverName);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 1);
- AZ::Interface<NvCloth::IClothSystem>::Get()->RemoveCloth(cloth);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver() == nullptr);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 0);
- AZ::Interface<NvCloth::IClothSystem>::Get()->RemoveCloth(cloth);
- EXPECT_TRUE(azrtti_cast<NvCloth::Cloth*>(cloth)->GetSolver() == nullptr);
- EXPECT_TRUE(azrtti_cast<NvCloth::Solver*>(defaultSolver)->GetNumCloths() == 0);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- }
- TEST(NvClothSystem, ClothSystem_Tick_SolverAndClothIsUpdated)
- {
- const float deltaTimeSim = 1.0f / 60.0f;
- NvCloth::ISolver* solver = AZ::Interface<NvCloth::IClothSystem>::Get()->FindOrCreateSolver("Solver_Tick");
- const NvCloth::FabricCookedData fabricCookedData = CreateTestFabricCookedData();
- NvCloth::ICloth* cloth = AZ::Interface<NvCloth::IClothSystem>::Get()->CreateCloth(fabricCookedData.m_particles, fabricCookedData);
- bool solverPreSimulationEventSignaled = false;
- NvCloth::ISolver::PreSimulationEvent::Handler solverPreSimulationEventHandler(
- [&solverPreSimulationEventSignaled](const AZStd::string&, float)
- {
- solverPreSimulationEventSignaled = true;
- });
- bool solverPostSimulationEventSignaled = false;
- NvCloth::ISolver::PostSimulationEvent::Handler solverPostSimulationEventHandler(
- [&solverPostSimulationEventSignaled](const AZStd::string&, float)
- {
- solverPostSimulationEventSignaled = true;
- });
- bool clothPreSimulationEventSignaled = false;
- NvCloth::ICloth::PreSimulationEvent::Handler clothPreSimulationEventHandler(
- [&clothPreSimulationEventSignaled](NvCloth::ClothId, float)
- {
- clothPreSimulationEventSignaled = true;
- });
- bool clothPostSimulationEventSignaled = false;
- NvCloth::ICloth::PostSimulationEvent::Handler clothPostSimulationEventHandler(
- [&clothPostSimulationEventSignaled](NvCloth::ClothId, float, const AZStd::vector<NvCloth::SimParticleFormat>&)
- {
- clothPostSimulationEventSignaled = true;
- });
- solver->ConnectPreSimulationEventHandler(solverPreSimulationEventHandler);
- solver->ConnectPostSimulationEventHandler(solverPostSimulationEventHandler);
- cloth->ConnectPreSimulationEventHandler(clothPreSimulationEventHandler);
- cloth->ConnectPostSimulationEventHandler(clothPostSimulationEventHandler);
- AZ::Interface<NvCloth::IClothSystem>::Get()->AddCloth(cloth, solver->GetName()); // It needs at least one cloth in the solver to simulate
- // Ticking Cloth System to update all its solvers
- AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick,
- deltaTimeSim,
- AZ::ScriptTimePoint(AZStd::chrono::steady_clock::now()));
- EXPECT_TRUE(solverPreSimulationEventSignaled);
- EXPECT_TRUE(solverPostSimulationEventSignaled);
- EXPECT_TRUE(clothPreSimulationEventSignaled);
- EXPECT_TRUE(clothPostSimulationEventSignaled);
- solverPreSimulationEventSignaled = false;
- solverPostSimulationEventSignaled = false;
- clothPreSimulationEventSignaled = false;
- clothPostSimulationEventSignaled = false;
- AZ::Interface<NvCloth::IClothSystem>::Get()->RemoveCloth(cloth); // Leave solver without have any cloths
- // Ticking Cloth System to update all its solvers
- AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick,
- deltaTimeSim,
- AZ::ScriptTimePoint(AZStd::chrono::steady_clock::now()));
- EXPECT_FALSE(solverPreSimulationEventSignaled);
- EXPECT_FALSE(solverPostSimulationEventSignaled);
- EXPECT_FALSE(clothPreSimulationEventSignaled);
- EXPECT_FALSE(clothPostSimulationEventSignaled);
- // NOTE: IClothSystem is persistent as it's part of the test environment.
- // Destroying cloth and solver to avoid leaving it in the environment.
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroyCloth(cloth);
- AZ::Interface<NvCloth::IClothSystem>::Get()->DestroySolver(solver);
- }
- } // namespace UnitTest
|