TriangleInputHelper.h 785 B

1234567891011121314151617181920212223242526272829
  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 <NvCloth/Types.h>
  10. namespace UnitTest
  11. {
  12. //! Class to provide triangle input data for tests
  13. struct TriangleInput
  14. {
  15. AZStd::vector<NvCloth::SimParticleFormat> m_vertices;
  16. AZStd::vector<NvCloth::SimIndexType> m_indices;
  17. AZStd::vector<NvCloth::SimUVType> m_uvs;
  18. };
  19. //! Creates triangle data for a plane in XY axis with any dimensions and segments.
  20. TriangleInput CreatePlane(
  21. float width,
  22. float height,
  23. AZ::u32 segmentsX,
  24. AZ::u32 segmentsY);
  25. } // namespace UnitTest