Scene.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 <AzCore/std/string/string.h>
  10. #include <SceneAPI/SceneCore/Containers/SceneGraph.h>
  11. #include <SceneAPI/SceneCore/Containers/SceneManifest.h>
  12. #include <SceneAPI/SceneCore/SceneCoreConfiguration.h>
  13. namespace AZ
  14. {
  15. namespace SceneAPI
  16. {
  17. namespace Containers
  18. {
  19. // Scenes are used to store the scene's graph the hierarchy and the manifest for meta data as well
  20. // as a history of the files used to construct both.
  21. class SCENE_CORE_API Scene
  22. {
  23. public:
  24. AZ_TYPE_INFO(Scene, "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}");
  25. explicit Scene(const AZStd::string& name);
  26. explicit Scene(AZStd::string&& name);
  27. void SetSource(const AZStd::string& filename, const Uuid& guid);
  28. void SetSource(AZStd::string&& filename, const Uuid& guid);
  29. const AZStd::string& GetSourceFilename() const;
  30. const Uuid& GetSourceGuid() const;
  31. void SetWatchFolder(const AZStd::string& watchFolder);
  32. const AZStd::string& GetWatchFolder() const;
  33. void SetManifestFilename(const AZStd::string& name);
  34. void SetManifestFilename(AZStd::string&& name);
  35. const AZStd::string& GetManifestFilename() const;
  36. SceneGraph& GetGraph();
  37. const SceneGraph& GetGraph() const;
  38. SceneManifest& GetManifest();
  39. const SceneManifest& GetManifest() const;
  40. const AZStd::string& GetName() const;
  41. enum class SceneOrientation {YUp, ZUp, XUp, NegYUp, NegZUp, NegXUp};
  42. void SetOriginalSceneOrientation(SceneOrientation orientation);
  43. SceneOrientation GetOriginalSceneOrientation() const;
  44. static void Reflect(ReflectContext* context);
  45. private:
  46. // Disabling export warnings for private methods, clients wont have access to them
  47. AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option")
  48. AZStd::string m_name;
  49. AZStd::string m_manifestFilename;
  50. AZStd::string m_sourceFilename;
  51. AZStd::string m_watchFolder;
  52. Uuid m_sourceGuid;
  53. SceneGraph m_graph;
  54. SceneManifest m_manifest;
  55. SceneOrientation m_originalOrientation = SceneOrientation::YUp;
  56. AZ_POP_DISABLE_WARNING
  57. };
  58. } // Containers
  59. } // SceneAPI
  60. } // AZ