3
0

WhiteBoxMeshAtomData.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "PackedFloat2.h"
  10. #include <AzCore/Math/Aabb.h>
  11. #include <AzCore/Math/PackedVector3.h>
  12. #include <Rendering/WhiteBoxRenderData.h>
  13. namespace WhiteBox
  14. {
  15. //! Class to hold the white box mesh data in Atom device memory format.
  16. class WhiteBoxMeshAtomData
  17. {
  18. public:
  19. explicit WhiteBoxMeshAtomData(const WhiteBoxFaces& faceData);
  20. ~WhiteBoxMeshAtomData() = default;
  21. const uint32_t VertexCount() const;
  22. const AZStd::vector<uint32_t>& GetIndices() const;
  23. const AZStd::vector<AZ::PackedVector3f>& GetPositions() const;
  24. const AZStd::vector<AZ::PackedVector3f>& GetNormals() const;
  25. const AZStd::vector<AZ::Vector4>& GetTangents() const;
  26. const AZStd::vector<AZ::PackedVector3f>& GetBitangents() const;
  27. const AZStd::vector<PackedFloat2>& GetUVs() const;
  28. const AZStd::vector<AZ::Vector4>& GetColors() const;
  29. AZ::Aabb GetAabb() const;
  30. private:
  31. AZStd::vector<uint32_t> m_indices;
  32. AZStd::vector<AZ::PackedVector3f> m_positions;
  33. AZStd::vector<AZ::PackedVector3f> m_normals;
  34. AZStd::vector<AZ::Vector4> m_tangents;
  35. AZStd::vector<AZ::PackedVector3f> m_bitangents;
  36. AZStd::vector<PackedFloat2> m_uvs;
  37. AZStd::vector<AZ::Vector4> m_colors;
  38. AZ::Aabb m_aabb = AZ::Aabb::CreateNull();
  39. };
  40. } // namespace WhiteBox