SceneGraphUtilities.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. /*
  3. * Copyright (c) Contributors to the Open 3D Engine Project.
  4. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0 OR MIT
  7. *
  8. */
  9. #include <SceneAPI/SceneCore/Containers/SceneGraph.h>
  10. #include <SceneAPI/SceneCore/DataTypes/MatrixType.h>
  11. namespace AZ
  12. {
  13. namespace SceneAPI
  14. {
  15. namespace Containers
  16. {
  17. class Scene;
  18. }
  19. namespace Utilities
  20. {
  21. // Searches for any entries in the scene graph that are derived or match the given type.
  22. // If "checkVirtualTypes" is true, a matching entry is also checked if it's not a
  23. // virtual type.
  24. template<typename T>
  25. bool DoesSceneGraphContainDataLike(const Containers::Scene& scene, bool checkVirtualTypes);
  26. SCENE_CORE_API DataTypes::MatrixType BuildWorldTransform(const Containers::SceneGraph& graph, Containers::SceneGraph::NodeIndex nodeIndex);
  27. // Searches only the immediate children of nodeIndex for a child node that matches the specified type.
  28. // Returns the NodeIndex if it exists, or and invalid NodeIndex if it doesn't
  29. SCENE_CORE_API Containers::SceneGraph::NodeIndex GetImmediateChildOfType(
  30. const Containers::SceneGraph& graph, const Containers::SceneGraph::NodeIndex& nodeIndex, const AZ::TypeId& typeId);
  31. } // Utilities
  32. } // SceneAPI
  33. } // AZ
  34. #include <SceneAPI/SceneCore/Containers/Utilities/SceneGraphUtilities.inl>