EditorComponent.cpp 920 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  3. // LICENSE: Atomic Game Engine Editor and Tools EULA
  4. // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
  5. // license information: https://github.com/AtomicGameEngine/AtomicGameEngine
  6. //
  7. #include <Atomic/Core/Context.h>
  8. #include <Atomic/Graphics/Camera.h>
  9. #include <Atomic/Graphics/Viewport.h>
  10. #include <Atomic/Graphics/Texture2D.h>
  11. #include "../Editors/SceneEditor3D/SceneEditor3D.h"
  12. #include "EditorComponent.h"
  13. namespace AtomicEditor
  14. {
  15. EditorComponent::EditorComponent(Context *context) : Component(context)
  16. {
  17. }
  18. EditorComponent::~EditorComponent()
  19. {
  20. }
  21. void EditorComponent::RegisterObject(Context* context)
  22. {
  23. context->RegisterFactory<EditorComponent>();
  24. }
  25. SceneEditor3D* EditorComponent::GetSceneEditor()
  26. {
  27. if (!GetScene())
  28. return NULL;
  29. return SceneEditor3D::GetSceneEditor(GetScene());
  30. }
  31. }