MeshAssetHelper.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <Atom/RPI.Reflect/Model/ModelLodAsset.h>
  10. #include <Utils/AssetHelper.h>
  11. namespace NvCloth
  12. {
  13. //! Helper class to obtain cloth information from a Mesh Asset.
  14. class MeshAssetHelper
  15. : public AssetHelper
  16. {
  17. public:
  18. AZ_RTTI(MeshAssetHelper, "{292066E4-DEB8-47C6-94CA-7BF1D75129F7}", AssetHelper);
  19. explicit MeshAssetHelper(AZ::EntityId entityId);
  20. // AssetHelper overrides ...
  21. void GatherClothMeshNodes(MeshNodeList& meshNodes) override;
  22. bool ObtainClothMeshNodeInfo(
  23. const AZStd::string& meshNode,
  24. MeshNodeInfo& meshNodeInfo,
  25. MeshClothInfo& meshClothInfo) override;
  26. private:
  27. bool CopyDataFromMeshes(
  28. const AZStd::vector<const AZ::RPI::ModelLodAsset::Mesh*>& meshes,
  29. MeshClothInfo& meshClothInfo);
  30. };
  31. } // namespace NvCloth