/* * 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 * */ #pragma once #include #include namespace UnitTest { using SkinInfluence = AZStd::tuple; using VertexSkinInfluences = AZStd::vector; //! Helper class to setup an actor. class ActorHelper : public EMotionFX::Actor { public: explicit ActorHelper(const char* name); //! Adds a node to the skeleton. size_t AddJoint( const AZStd::string& name, const AZ::Transform& localTransform = AZ::Transform::CreateIdentity(), const AZStd::string& parentName = ""); //! Adds a collider to the cloh configuration. void AddClothCollider(const Physics::CharacterColliderNodeConfiguration& colliderNode); //! Finishes to construct the actor. //! @note This function must be called last, before using Actor. void FinishSetup(); }; AZ::Data::Asset CreateAssetFromActor( AZStd::unique_ptr actor); Physics::CharacterColliderNodeConfiguration CreateSphereCollider( const AZStd::string& jointName, float radius, const AZ::Transform& offset = AZ::Transform::CreateIdentity()); Physics::CharacterColliderNodeConfiguration CreateCapsuleCollider( const AZStd::string& jointName, float height, float radius, const AZ::Transform& offset = AZ::Transform::CreateIdentity()); Physics::CharacterColliderNodeConfiguration CreateBoxCollider( const AZStd::string& jointName, const AZ::Vector3& dimensions, const AZ::Transform& offset = AZ::Transform::CreateIdentity()); EMotionFX::Mesh* CreateEMotionFXMesh( const AZStd::vector& vertices, const AZStd::vector& indices, const AZStd::vector& skinningInfo = {}, const AZStd::vector& uvs = {}); } // namespace UnitTest