SampleComponentConfig.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include <AzCore/Component/TransformBus.h>
  11. #include <AzFramework/Entity/EntityContext.h>
  12. #include <Atom/RPI.Public/WindowContext.h>
  13. namespace AtomSampleViewer
  14. {
  15. static constexpr const char DefaultPbrMaterialPath[] = "materials/defaultpbr.azmaterial";
  16. static constexpr const char BunnyModelFilePath[] = "objects/bunny.fbx.azmodel";
  17. static constexpr const char ShaderBallModelFilePath[] = "objects/shaderball_simple.fbx.azmodel";
  18. static constexpr const char CubeModelFilePath[] = "testdata/objects/cube/cube.fbx.azmodel";
  19. class SampleComponentConfig
  20. : public AZ::ComponentConfig
  21. {
  22. public:
  23. AZ_RTTI(SampleComponentConfig, "{FBC7F31B-1E43-4A0F-9280-D1B62D81E83B}", AZ::ComponentConfig);
  24. AZ_CLASS_ALLOCATOR(SampleComponentConfig, AZ::SystemAllocator, 0);
  25. static void Reflect(AZ::ReflectContext* context);
  26. SampleComponentConfig() {}
  27. explicit SampleComponentConfig(AZStd::shared_ptr<AZ::RPI::WindowContext> windowContext, AZ::EntityId cameraEntityId, AzFramework::EntityContextId entityContextId)
  28. : m_windowContext(AZStd::move(windowContext))
  29. , m_cameraEntityId(cameraEntityId)
  30. , m_entityContextId(entityContextId)
  31. {}
  32. bool IsValid() const;
  33. AZStd::shared_ptr<AZ::RPI::WindowContext> m_windowContext;
  34. AZ::EntityId m_cameraEntityId;
  35. AzFramework::EntityContextId m_entityContextId;
  36. };
  37. } // namespace AZ