Gems/NvCloth/Code/Tests/Components/EditorClothComponentTest.cpp
TEST_F(NvClothEditorClothComponent, DISABLED_EditorClothComponent_OnMeshCreatedWithActorWithBackstop_ReturnsValidMeshNodesWithBackstopData)
    {
        auto editorEntity = CreateInactiveEditorEntity("ClothComponentEditorEntity");
        auto* editorClothComponent = editorEntity->CreateComponent<NvCloth::EditorClothComponent>();
        auto* editorActorComponent = editorEntity->CreateComponent<EMotionFX::Integration::EditorActorComponent>();
        editorEntity->Activate();

        {
            auto actor = AZStd::make_unique<ActorHelper>("actor_test");
            actor->AddJoint(JointRootName);
            auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
            actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs/*, MeshClothData*/));
            actor->FinishSetup();

            editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));
        }

        const auto& meshNodesWithBackstopData = editorClothComponent->GetMeshNodesWithBackstopData();

        EXPECT_EQ(meshNodesWithBackstopData.size(), 1);
        EXPECT_TRUE(meshNodesWithBackstopData.find(MeshNodeName) != meshNodesWithBackstopData.end());
    }
// [TODO LYN-1891]
// Revisit when Cloth Component Mesh works with Actors adapted to Atom models.
// Editor Cloth component now uses the new AZ::Render::MeshComponentNotificationBus::OnModelReady
// notification and this test does not setup a model yet.
[TODO LYN-1891]
Revisit when Cloth Component Mesh works with Actors adapted to Atom models.
[ TODO LYN - 1891 ] Revisit when Cloth Component Mesh works with Actors adapted to Atom models .
TEST_F(NvClothEditorClothComponent, DISABLED_EditorClothComponent_OnMeshCreatedWithActorWithBackstop_ReturnsValidMeshNodesWithBackstopData)
    {
        auto editorEntity = CreateInactiveEditorEntity("ClothComponentEditorEntity");
        auto* editorClothComponent = editorEntity->CreateComponent<NvCloth::EditorClothComponent>();
        auto* editorActorComponent = editorEntity->CreateComponent<EMotionFX::Integration::EditorActorComponent>();
        editorEntity->Activate();
        {
            auto actor = AZStd::make_unique<ActorHelper>("actor_test");
            actor->AddJoint(JointRootName);
            auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
            actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs));
            actor->FinishSetup();
            editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));
        }
        const auto& meshNodesWithBackstopData = editorClothComponent->GetMeshNodesWithBackstopData();
        EXPECT_EQ(meshNodesWithBackstopData.size(), 1);
        EXPECT_TRUE(meshNodesWithBackstopData.find(MeshNodeName) != meshNodesWithBackstopData.end());
    }
TEST_F ( NvClothEditorClothComponent , DISABLED_EditorClothComponent_OnMeshCreatedWithActorWithBackstop_ReturnsValidMeshNodesWithBackstopData ) { auto editorEntity = CreateInactiveEditorEntity ( " " ) ; auto * editorClothComponent = editorEntity -> CreateComponent < NvCloth :: EditorClothComponent > ( ) ; auto * editorActorComponent = editorEntity -> CreateComponent < EMotionFX :: Integration :: EditorActorComponent > ( ) ; editorEntity -> Activate ( ) ; { auto actor = AZStd :: make_unique < ActorHelper > ( " " ) ; actor -> AddJoint ( JointRootName ) ; auto meshNodeIndex = actor -> AddJoint ( MeshNodeName , AZ :: Transform :: CreateIdentity ( ) , JointRootName ) ; actor -> SetMesh ( LodLevel , meshNodeIndex , CreateEMotionFXMesh ( MeshVertices , MeshIndices , { } , MeshUVs ) ) ; actor -> FinishSetup ( ) ; editorActorComponent -> SetActorAsset ( CreateAssetFromActor ( AZStd :: move ( actor ) ) ) ; } const auto & meshNodesWithBackstopData = editorClothComponent -> GetMeshNodesWithBackstopData ( ) ; EXPECT_EQ ( meshNodesWithBackstopData . size ( ) , 1 ) ; EXPECT_TRUE ( meshNodesWithBackstopData . find ( MeshNodeName ) != meshNodesWithBackstopData . end ( ) ) ; }
[TODO LYN-1891]
Revisit when Cloth Component Mesh works with Actors adapted to Atom models.
[ TODO LYN - 1891 ] Revisit when Cloth Component Mesh works with Actors adapted to Atom models .
/*, MeshClothData*/