/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #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. AZ::u32 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