3
0

WhiteBoxRenderMeshInterface.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <AzCore/Component/Component.h>
  10. namespace AZ
  11. {
  12. class Transform;
  13. }
  14. namespace WhiteBox
  15. {
  16. struct WhiteBoxMaterial;
  17. struct WhiteBoxRenderData;
  18. //! A generic interface for the White Box Component to communicate
  19. //! with regardless of the rendering backend.
  20. class RenderMeshInterface
  21. {
  22. public:
  23. AZ_RTTI(RenderMeshInterface, "{F3ADF2DC-6A40-4943-95BE-6C7E24605BE9}");
  24. virtual ~RenderMeshInterface() = 0;
  25. //! Take White Box render data and populate the render mesh from it.
  26. virtual void BuildMesh(
  27. const WhiteBoxRenderData& renderData, const AZ::Transform& worldFromLocal) = 0;
  28. //! Update the transform of the render mesh.
  29. virtual void UpdateTransform(const AZ::Transform& worldFromLocal) = 0;
  30. //! Update the material of the render mesh.
  31. virtual void UpdateMaterial(const WhiteBoxMaterial& material) = 0;
  32. // Return if the White Box mesh is visible or not.
  33. virtual bool IsVisible() const = 0;
  34. //! Set the White Box mesh visible (true) or invisible (false).
  35. virtual void SetVisiblity(bool visibility) = 0;
  36. };
  37. } // namespace WhiteBox