3
0

WhiteBoxTextureUtil.h 771 B

123456789101112131415161718192021222324
  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/Math/Vector2.h>
  10. #include <AzCore/Math/Vector3.h>
  11. namespace WhiteBox
  12. {
  13. //! Returns the index of the largest element in the vector
  14. int FindLargestElement(const AZ::Vector3& vector);
  15. //! Creates UV coordinates from vertex positioning on closest basis vector p
  16. AZ::Vector2 CreatePlanarUVFromVertex(
  17. const AZ::Vector3& normal, const AZ::Vector3& position, const AZ::Vector2& offset = AZ::Vector2(0.5f, 0.5f),
  18. const AZ::Vector2& scale = AZ::Vector2(-1.0f, -1.0f));
  19. } // namespace WhiteBox