diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c7031612..c4c16486 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,13 +4,13 @@ Gems/CsvSpawner @patrykantosz @w-czerski Gems/ExposeConsoleToRos @michalpelka @w-czerski -Gems/GeoJSONSpawner @patrykantosz @w-czerski -Gems/GeoJSONSpawnerROS2 @patrykantosz @w-czerski Gems/ImGuiProvider @norbertprokopiuk @zakmat Gems/ImGuizmo @michalpelka @norbertprokopiuk Gems/LevelModificationTools @arturkamieniecki @MateuszWasilewski Gems/Pointcloud @norbertprokopiuk @michalpelka Gems/RandomizeUtils @michalpelka @jhanca-robotecai +Gems/RobotecGeoJSONSpawner @patrykantosz @w-czerski +Gems/RobotecGeoJSONSpawnerROS2 @patrykantosz @w-czerski Gems/RobotecRecordingTools @jhanca-robotecai @MateuszWasilewski Gems/RobotecSpectatorCamera @jhanca-robotecai @patrykantosz Gems/RobotecSplineTools @jhanca-robotecai @michalpelka diff --git a/Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerTypeIds.h b/Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerTypeIds.h deleted file mode 100644 index f60629d8..00000000 --- a/Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerTypeIds.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#pragma once - -namespace GeoJSONSpawner -{ - // System Component TypeIds - inline constexpr const char* GeoJSONSpawnerSystemComponentTypeId = "{CD4EB5DE-E197-433A-B651-A0507E6A7138}"; - inline constexpr const char* GeoJSONSpawnerEditorSystemComponentTypeId = "{6894C22F-7C51-4C87-92E0-83D93F42252C}"; - - // Module derived classes TypeIds - inline constexpr const char* GeoJSONSpawnerModuleInterfaceTypeId = "{457EB65D-5DFC-4341-BDE3-79D054485C58}"; - inline constexpr const char* GeoJSONSpawnerModuleTypeId = "{E56013BF-CE3A-4AA5-81AD-698844BEA7C6}"; - // The Editor Module by default is mutually exclusive with the Client Module - // so they use the Same TypeId - inline constexpr const char* GeoJSONSpawnerEditorModuleTypeId = GeoJSONSpawnerModuleTypeId; - - // Editor Components TypeIds - inline constexpr const char* GeoJSONSpawnerEditorComponentTypeId = "{97d8cdeb-8a82-4bb0-adc3-c42a3eac21c7}"; - - // Configurations TypeIds - inline constexpr const char* GeoJSONSpawnableAssetConfigurationTypeId = "{cee254bb-edc8-45b1-b85a-aaf19ec3af83}"; - inline constexpr const char* GeoJSONSpawnableEntityInfoTypeId = "{170bb487-fbae-4394-8176-069045a3a316}"; - inline constexpr const char* FeatureObjectInfoTypeId = "{00f38302-9f4d-4bac-805b-72a29e42a704}"; - inline constexpr const char* GeoJSONSpawnerEditorTerrainSettingsConfigTypeId = "{9bb9e1c6-dd7c-435f-8fe1-bd5498c3e8f2}"; - - // Wrapper TypeIds - inline constexpr const char* GeoJSONSpawnerSpawnTicketMapWrapperTypeId = "{714316F3-190D-4189-B14B-B601BE22EEBC}"; - - // Components TypeIds - inline constexpr const char* GeoJSONSpawnerComponentTypeId = "{839ede69-92f1-45b0-a60e-035d0b84e1fd}"; - - // Interface TypeIds - inline constexpr const char* GeoJSONSpawnerRequestsTypeId = "{EE523E9E-CFDF-4590-BBDE-054848BBA790}"; - inline constexpr const char* GeoJSONSpawnerInterfaceTypeId = "{4770B38A-D018-4184-A672-3F9155B7BEE7}"; - inline constexpr const char* GeoJSONSpawnerNotificationBusHandlerTypeId = "{9D8C5E99-7151-4AA4-9B5F-2D8AE2F097F7}"; - - // Enums - inline constexpr const char* SpawnDespawnStatusTypeId = "{1E22A24E-8365-4CC7-8B99-CC0EF0B25B13}"; -} // namespace GeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Platform/Android/PAL_android.cmake b/Gems/GeoJSONSpawner/Code/Platform/Android/PAL_android.cmake deleted file mode 100644 index ebaa2fb5..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Android/PAL_android.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_private_files.cmake deleted file mode 100644 index 04a3d623..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Android -# i.e. ../Source/Android/GeoJSONSpawnerAndroid.cpp -# ../Source/Android/GeoJSONSpawnerAndroid.h -# ../Include/Android/GeoJSONSpawnerAndroid.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_shared_files.cmake deleted file mode 100644 index 04a3d623..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Android -# i.e. ../Source/Android/GeoJSONSpawnerAndroid.cpp -# ../Source/Android/GeoJSONSpawnerAndroid.h -# ../Include/Android/GeoJSONSpawnerAndroid.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake b/Gems/GeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake deleted file mode 100644 index ebaa2fb5..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_private_files.cmake deleted file mode 100644 index 1c972bda..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Linux -# i.e. ../Source/Linux/GeoJSONSpawnerLinux.cpp -# ../Source/Linux/GeoJSONSpawnerLinux.h -# ../Include/Linux/GeoJSONSpawnerLinux.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_shared_files.cmake deleted file mode 100644 index 1c972bda..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Linux -# i.e. ../Source/Linux/GeoJSONSpawnerLinux.cpp -# ../Source/Linux/GeoJSONSpawnerLinux.h -# ../Include/Linux/GeoJSONSpawnerLinux.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake b/Gems/GeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake deleted file mode 100644 index ebaa2fb5..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_private_files.cmake deleted file mode 100644 index 26eff1a6..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Mac -# i.e. ../Source/Mac/GeoJSONSpawnerMac.cpp -# ../Source/Mac/GeoJSONSpawnerMac.h -# ../Include/Mac/GeoJSONSpawnerMac.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_shared_files.cmake deleted file mode 100644 index 26eff1a6..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Mac -# i.e. ../Source/Mac/GeoJSONSpawnerMac.cpp -# ../Source/Mac/GeoJSONSpawnerMac.h -# ../Include/Mac/GeoJSONSpawnerMac.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake b/Gems/GeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake deleted file mode 100644 index ebaa2fb5..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_private_files.cmake deleted file mode 100644 index 25d17c5c..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Windows -# i.e. ../Source/Windows/GeoJSONSpawnerWindows.cpp -# ../Source/Windows/GeoJSONSpawnerWindows.h -# ../Include/Windows/GeoJSONSpawnerWindows.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_shared_files.cmake deleted file mode 100644 index 25d17c5c..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Windows -# i.e. ../Source/Windows/GeoJSONSpawnerWindows.cpp -# ../Source/Windows/GeoJSONSpawnerWindows.h -# ../Include/Windows/GeoJSONSpawnerWindows.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake b/Gems/GeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake deleted file mode 100644 index ebaa2fb5..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_private_files.cmake deleted file mode 100644 index 2ad54595..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for iOS -# i.e. ../Source/iOS/GeoJSONSpawneriOS.cpp -# ../Source/iOS/GeoJSONSpawneriOS.h -# ../Include/iOS/GeoJSONSpawneriOS.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_shared_files.cmake deleted file mode 100644 index 2ad54595..00000000 --- a/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for iOS -# i.e. ../Source/iOS/GeoJSONSpawneriOS.cpp -# ../Source/iOS/GeoJSONSpawneriOS.h -# ../Include/iOS/GeoJSONSpawneriOS.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerModule.cpp b/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerModule.cpp deleted file mode 100644 index 6576038c..00000000 --- a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerModule.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerSystemComponent.h" -#include -#include - -namespace GeoJSONSpawner -{ - class GeoJSONSpawnerModule : public GeoJSONSpawnerModuleInterface - { - public: - AZ_RTTI(GeoJSONSpawnerModule, GeoJSONSpawnerModuleTypeId, GeoJSONSpawnerModuleInterface); - AZ_CLASS_ALLOCATOR(GeoJSONSpawnerModule, AZ::SystemAllocator); - }; -} // namespace GeoJSONSpawner - -AZ_DECLARE_MODULE_CLASS(Gem_GeoJSONSpawner, GeoJSONSpawner::GeoJSONSpawnerModule) diff --git a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.cpp b/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.cpp deleted file mode 100644 index 7cbc3c01..00000000 --- a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerSystemComponent.h" - -#include - -#include - -namespace GeoJSONSpawner -{ - AZ_COMPONENT_IMPL(GeoJSONSpawnerSystemComponent, "GeoJSONSpawnerSystemComponent", GeoJSONSpawnerSystemComponentTypeId); - - void GeoJSONSpawnerSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - void GeoJSONSpawnerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("GeoJSONSpawnerService")); - } - - void GeoJSONSpawnerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("GeoJSONSpawnerService")); - } - - void GeoJSONSpawnerSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - } - - void GeoJSONSpawnerSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - } - - void GeoJSONSpawnerSystemComponent::Init() - { - } - - void GeoJSONSpawnerSystemComponent::Activate() - { - } - - void GeoJSONSpawnerSystemComponent::Deactivate() - { - } -} // namespace GeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.cpp b/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.cpp deleted file mode 100644 index c516eb5b..00000000 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerModuleInterface.h" - -#include "GeoJSONSpawner/GeoJSONSpawnerComponent.h" -#include "ROS2/ROS2Bus.h" - -#include - -#include - -#include - -namespace GeoJSONSpawner -{ - AZ_TYPE_INFO_WITH_NAME_IMPL(GeoJSONSpawnerModuleInterface, "GeoJSONSpawnerModuleInterface", GeoJSONSpawnerModuleInterfaceTypeId); - AZ_RTTI_NO_TYPE_INFO_IMPL(GeoJSONSpawnerModuleInterface, AZ::Module); - AZ_CLASS_ALLOCATOR_IMPL(GeoJSONSpawnerModuleInterface, AZ::SystemAllocator); - - GeoJSONSpawnerModuleInterface::GeoJSONSpawnerModuleInterface() - { - m_descriptors.insert( - m_descriptors.end(), { GeoJSONSpawnerSystemComponent::CreateDescriptor(), GeoJSONSpawnerComponent::CreateDescriptor() }); - } - - AZ::ComponentTypeList GeoJSONSpawnerModuleInterface::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } -} // namespace GeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorModule.cpp b/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorModule.cpp deleted file mode 100644 index 65d65785..00000000 --- a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorModule.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawner/GeoJSONSpawnerEditorComponent.h" -#include "GeoJSONSpawnerEditorSystemComponent.h" -#include -#include - -namespace GeoJSONSpawner -{ - class GeoJSONSpawnerEditorModule : public GeoJSONSpawnerModuleInterface - { - public: - AZ_RTTI(GeoJSONSpawnerEditorModule, GeoJSONSpawnerEditorModuleTypeId, GeoJSONSpawnerModuleInterface); - AZ_CLASS_ALLOCATOR(GeoJSONSpawnerEditorModule, AZ::SystemAllocator); - - GeoJSONSpawnerEditorModule() - { - m_descriptors.insert( - m_descriptors.end(), - { GeoJSONSpawnerEditorSystemComponent::CreateDescriptor(), GeoJSONSpawnerEditorComponent::CreateDescriptor() }); - } - - AZ::ComponentTypeList GetRequiredSystemComponents() const override - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } - }; -} // namespace GeoJSONSpawner - -AZ_DECLARE_MODULE_CLASS(Gem_GeoJSONSpawner, GeoJSONSpawner::GeoJSONSpawnerEditorModule) diff --git a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.cpp b/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.cpp deleted file mode 100644 index 6dd9cd19..00000000 --- a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerEditorSystemComponent.h" -#include - -#include - -namespace GeoJSONSpawner -{ - AZ_COMPONENT_IMPL( - GeoJSONSpawnerEditorSystemComponent, - "GeoJSONSpawnerEditorSystemComponent", - GeoJSONSpawnerEditorSystemComponentTypeId, - BaseSystemComponent); - - void GeoJSONSpawnerEditorSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - void GeoJSONSpawnerEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - BaseSystemComponent::GetProvidedServices(provided); - provided.push_back(AZ_CRC_CE("GeoJSONSpawnerEditorService")); - } - - void GeoJSONSpawnerEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - BaseSystemComponent::GetIncompatibleServices(incompatible); - incompatible.push_back(AZ_CRC_CE("GeoJSONSpawnerEditorService")); - } - - void GeoJSONSpawnerEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - BaseSystemComponent::GetRequiredServices(required); - } - - void GeoJSONSpawnerEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - BaseSystemComponent::GetDependentServices(dependent); - } - - void GeoJSONSpawnerEditorSystemComponent::Activate() - { - GeoJSONSpawnerSystemComponent::Activate(); - AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); - } - - void GeoJSONSpawnerEditorSystemComponent::Deactivate() - { - AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); - GeoJSONSpawnerSystemComponent::Deactivate(); - } - -} // namespace GeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_api_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_api_files.cmake deleted file mode 100644 index 5693806b..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_api_files.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -set(FILES - Include/GeoJSONSpawner/GeoJSONSpawnerBus.h - Include/GeoJSONSpawner/GeoJSONSpawnerTypeIds.h -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_private_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_private_files.cmake deleted file mode 100644 index ff40a9af..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_private_files.cmake +++ /dev/null @@ -1,7 +0,0 @@ - -set(FILES - Source/Tools/GeoJSONSpawnerEditorSystemComponent.cpp - Source/Tools/GeoJSONSpawnerEditorSystemComponent.h - Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp - Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.h -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_shared_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_shared_files.cmake deleted file mode 100644 index 2ad8cd75..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_shared_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Source/Tools/GeoJSONSpawnerEditorModule.cpp -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_tests_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_tests_files.cmake deleted file mode 100644 index 2245ff54..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_tests_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Tests/Tools/GeoJSONSpawnerEditorTest.cpp -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_private_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_private_files.cmake deleted file mode 100644 index da7429e8..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_private_files.cmake +++ /dev/null @@ -1,16 +0,0 @@ - -set(FILES - Source/GeoJSONSpawnerModuleInterface.cpp - Source/GeoJSONSpawnerModuleInterface.h - Source/Clients/GeoJSONSpawnerSystemComponent.cpp - Source/Clients/GeoJSONSpawnerSystemComponent.h - Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp - Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h - Source/GeoJSONSpawner/Schemas/GeoJSONSchema.h - Source/GeoJSONSpawner/GeoJSONSpawnerUtils.cpp - Source/GeoJSONSpawner/GeoJSONSpawnerUtils.h - Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp - Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h - Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.cpp - Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_shared_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_shared_files.cmake deleted file mode 100644 index f5e3fa30..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_shared_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Source/Clients/GeoJSONSpawnerModule.cpp -) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_tests_files.cmake b/Gems/GeoJSONSpawner/Code/geojsonspawner_tests_files.cmake deleted file mode 100644 index ac8cfab9..00000000 --- a/Gems/GeoJSONSpawner/Code/geojsonspawner_tests_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Tests/Clients/GeoJSONSpawnerTest.cpp -) diff --git a/Gems/GeoJSONSpawner/Registry/assetprocessor_settings.setreg b/Gems/GeoJSONSpawner/Registry/assetprocessor_settings.setreg deleted file mode 100644 index 9f6a8713..00000000 --- a/Gems/GeoJSONSpawner/Registry/assetprocessor_settings.setreg +++ /dev/null @@ -1,18 +0,0 @@ -{ - "Amazon": { - "AssetProcessor": { - "Settings": { - "ScanFolder GeoJSONSpawner/Assets": { - "watch": "@GEMROOT:GeoJSONSpawner@/Assets", - "recursive": 1, - "order": 101 - }, - "ScanFolder GeoJSONSpawner/Registry": { - "watch": "@GEMROOT:GeoJSONSpawner@/Registry", - "recursive": 1, - "order": 102 - } - } - } - } -} diff --git a/Gems/GeoJSONSpawnerROS2/Code/Include/GeoJSONSpawnerROS2/GeoJSONSpawnerROS2TypeIds.h b/Gems/GeoJSONSpawnerROS2/Code/Include/GeoJSONSpawnerROS2/GeoJSONSpawnerROS2TypeIds.h deleted file mode 100644 index 14743df4..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Include/GeoJSONSpawnerROS2/GeoJSONSpawnerROS2TypeIds.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#pragma once - -namespace GeoJSONSpawnerROS2 -{ - // System Component TypeIds - inline constexpr const char* GeoJSONSpawnerROS2SystemComponentTypeId = "{715CB9C6-1EFD-469D-B7DC-72D097E1FBE9}"; - inline constexpr const char* GeoJSONSpawnerROS2EditorSystemComponentTypeId = "{F56F94B4-D27B-4466-9794-3ECC2D35F5E9}"; - - // Module derived classes TypeIds - inline constexpr const char* GeoJSONSpawnerROS2ModuleInterfaceTypeId = "{F8EFEBC9-E997-4830-A035-AF7A201F42A9}"; - inline constexpr const char* GeoJSONSpawnerROS2ModuleTypeId = "{4F1BA299-BF1E-4810-B636-4896CC2842E8}"; - // The Editor Module by default is mutually exclusive with the Client Module - // so they use the Same TypeId - inline constexpr const char* GeoJSONSpawnerROS2EditorModuleTypeId = GeoJSONSpawnerROS2ModuleTypeId; - - // Editor Components TypeIds - inline constexpr const char* GeoJSONSpawnerROS2EditorComponentTypeId = "{e73adfb4-d45e-49de-a863-b20877300e99}"; - - // Configurations TypeIds - inline constexpr const char* GeoJSONSpawnerROS2ConfigurationTypeId = "{a023282f-5ec5-4af1-902d-74772f024339}"; - - // Components TypeIds - inline constexpr const char* GeoJSONSpawnerROS2TypeId = "{a302588e-10c5-443b-a9ec-5edc33c56ef2}"; - - // Interface TypeIds - inline constexpr const char* GeoJSONSpawnerROS2RequestsTypeId = "{636D9D5F-7EA7-47CA-902E-7DE5003A7FC7}"; -} // namespace GeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake deleted file mode 100644 index 67c2b757..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index 30ead5ca..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Android -# i.e. ../Source/Android/GeoJSONSpawnerROS2Android.cpp -# ../Source/Android/GeoJSONSpawnerROS2Android.h -# ../Include/Android/GeoJSONSpawnerROS2Android.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index 30ead5ca..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Android -# i.e. ../Source/Android/GeoJSONSpawnerROS2Android.cpp -# ../Source/Android/GeoJSONSpawnerROS2Android.h -# ../Include/Android/GeoJSONSpawnerROS2Android.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake deleted file mode 100644 index 67c2b757..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index 33e0cc52..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Linux -# i.e. ../Source/Linux/GeoJSONSpawnerROS2Linux.cpp -# ../Source/Linux/GeoJSONSpawnerROS2Linux.h -# ../Include/Linux/GeoJSONSpawnerROS2Linux.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index 33e0cc52..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Linux -# i.e. ../Source/Linux/GeoJSONSpawnerROS2Linux.cpp -# ../Source/Linux/GeoJSONSpawnerROS2Linux.h -# ../Include/Linux/GeoJSONSpawnerROS2Linux.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake deleted file mode 100644 index 67c2b757..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index 7c2021ab..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Mac -# i.e. ../Source/Mac/GeoJSONSpawnerROS2Mac.cpp -# ../Source/Mac/GeoJSONSpawnerROS2Mac.h -# ../Include/Mac/GeoJSONSpawnerROS2Mac.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index 7c2021ab..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Mac -# i.e. ../Source/Mac/GeoJSONSpawnerROS2Mac.cpp -# ../Source/Mac/GeoJSONSpawnerROS2Mac.h -# ../Include/Mac/GeoJSONSpawnerROS2Mac.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake deleted file mode 100644 index 67c2b757..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index bc175f36..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Windows -# i.e. ../Source/Windows/GeoJSONSpawnerROS2Windows.cpp -# ../Source/Windows/GeoJSONSpawnerROS2Windows.h -# ../Include/Windows/GeoJSONSpawnerROS2Windows.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index bc175f36..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for Windows -# i.e. ../Source/Windows/GeoJSONSpawnerROS2Windows.cpp -# ../Source/Windows/GeoJSONSpawnerROS2Windows.h -# ../Include/Windows/GeoJSONSpawnerROS2Windows.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake deleted file mode 100644 index 67c2b757..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED TRUE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) -set(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index 43d148e1..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for iOS -# i.e. ../Source/iOS/GeoJSONSpawnerROS2iOS.cpp -# ../Source/iOS/GeoJSONSpawnerROS2iOS.h -# ../Include/iOS/GeoJSONSpawnerROS2iOS.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index 43d148e1..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,8 +0,0 @@ - -# Platform specific files for iOS -# i.e. ../Source/iOS/GeoJSONSpawnerROS2iOS.cpp -# ../Source/iOS/GeoJSONSpawnerROS2iOS.h -# ../Include/iOS/GeoJSONSpawnerROS2iOS.h - -set(FILES -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2Module.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2Module.cpp deleted file mode 100644 index 6c3247ec..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2Module.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2SystemComponent.h" -#include -#include - -namespace GeoJSONSpawnerROS2 -{ - class GeoJSONSpawnerROS2Module : public GeoJSONSpawnerROS2ModuleInterface - { - public: - AZ_RTTI(GeoJSONSpawnerROS2Module, GeoJSONSpawnerROS2ModuleTypeId, GeoJSONSpawnerROS2ModuleInterface); - AZ_CLASS_ALLOCATOR(GeoJSONSpawnerROS2Module, AZ::SystemAllocator); - }; -} // namespace GeoJSONSpawnerROS2 - -AZ_DECLARE_MODULE_CLASS(Gem_GeoJSONSpawnerROS2, GeoJSONSpawnerROS2::GeoJSONSpawnerROS2Module) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.cpp deleted file mode 100644 index 4b57c424..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2SystemComponent.h" - -#include - -#include - -namespace GeoJSONSpawnerROS2 -{ - AZ_COMPONENT_IMPL(GeoJSONSpawnerROS2SystemComponent, "GeoJSONSpawnerROS2SystemComponent", GeoJSONSpawnerROS2SystemComponentTypeId); - - void GeoJSONSpawnerROS2SystemComponent::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - void GeoJSONSpawnerROS2SystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2Service")); - } - - void GeoJSONSpawnerROS2SystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2Service")); - } - - void GeoJSONSpawnerROS2SystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - } - - void GeoJSONSpawnerROS2SystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - } - - void GeoJSONSpawnerROS2SystemComponent::Init() - { - } - - void GeoJSONSpawnerROS2SystemComponent::Activate() - { - } - - void GeoJSONSpawnerROS2SystemComponent::Deactivate() - { - } - -} // namespace GeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.cpp deleted file mode 100644 index 1b07009f..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2ModuleInterface.h" -#include - -#include - -#include -#include - -namespace GeoJSONSpawnerROS2 -{ - AZ_TYPE_INFO_WITH_NAME_IMPL( - GeoJSONSpawnerROS2ModuleInterface, "GeoJSONSpawnerROS2ModuleInterface", GeoJSONSpawnerROS2ModuleInterfaceTypeId); - AZ_RTTI_NO_TYPE_INFO_IMPL(GeoJSONSpawnerROS2ModuleInterface, AZ::Module); - AZ_CLASS_ALLOCATOR_IMPL(GeoJSONSpawnerROS2ModuleInterface, AZ::SystemAllocator); - - GeoJSONSpawnerROS2ModuleInterface::GeoJSONSpawnerROS2ModuleInterface() - { - m_descriptors.insert( - m_descriptors.end(), { GeoJSONSpawnerROS2SystemComponent::CreateDescriptor(), GeoJSONSpawnerROS2::CreateDescriptor() }); - } - - AZ::ComponentTypeList GeoJSONSpawnerROS2ModuleInterface::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } -} // namespace GeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.cpp deleted file mode 100644 index 87d638f2..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2EditorComponent.h" - -#include - -namespace GeoJSONSpawnerROS2 -{ - void GeoJSONSpawnerROS2EditorComponent::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serialize = azrtti_cast(context)) - { - serialize->Class()->Version(0)->Field( - "Configuration", &GeoJSONSpawnerROS2EditorComponent::m_configuration); - - if (AZ::EditContext* editContext = serialize->GetEditContext()) - { - editContext - ->Class("GeoJSONSpawnerROS2EditorComponent", "GeoJSONSpawnerROS2EditorComponent") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "GeoJSONSpawnerROS2EditorComponent") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) - ->Attribute(AZ::Edit::Attributes::Category, "Spawners") - ->DataElement( - AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2EditorComponent::m_configuration, - "Configuration", - "Configuration of the spawner's ROS2 interface."); - } - } - } - - void GeoJSONSpawnerROS2EditorComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2")); - } - - void GeoJSONSpawnerROS2EditorComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2")); - } - - void GeoJSONSpawnerROS2EditorComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - required.push_back(AZ_CRC_CE("ROS2Frame")); - } - - void GeoJSONSpawnerROS2EditorComponent::BuildGameEntity(AZ::Entity* gameEntity) - { - gameEntity->CreateComponent(m_configuration); - } - -} // namespace GeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorModule.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorModule.cpp deleted file mode 100644 index 74a215d4..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorModule.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2EditorSystemComponent.h" -#include -#include -#include - -namespace GeoJSONSpawnerROS2 -{ - class GeoJSONSpawnerROS2EditorModule : public GeoJSONSpawnerROS2ModuleInterface - { - public: - AZ_RTTI(GeoJSONSpawnerROS2EditorModule, GeoJSONSpawnerROS2EditorModuleTypeId, GeoJSONSpawnerROS2ModuleInterface); - AZ_CLASS_ALLOCATOR(GeoJSONSpawnerROS2EditorModule, AZ::SystemAllocator); - - GeoJSONSpawnerROS2EditorModule() - { - m_descriptors.insert( - m_descriptors.end(), - { GeoJSONSpawnerROS2EditorSystemComponent::CreateDescriptor(), GeoJSONSpawnerROS2EditorComponent::CreateDescriptor() }); - } - - AZ::ComponentTypeList GetRequiredSystemComponents() const override - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } - }; -} // namespace GeoJSONSpawnerROS2 - -#if defined(O3DE_GEM_NAME) -AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), GeoJSONSpawnerROS2::GeoJSONSpawnerROS2EditorModule) -#else -AZ_DECLARE_MODULE_CLASS(Gem_GeoJSONSpawnerROS2_Editor, GeoJSONSpawnerROS2::GeoJSONSpawnerROS2EditorModule) -#endif diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.cpp b/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.cpp deleted file mode 100644 index 4537f1ab..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) Robotec AI - All Rights Reserved - * - * This source code is protected under international copyright law. All rights - * reserved and protected by the copyright holders. - * This file is confidential and only available to authorized individuals with the - * permission of the copyright holders. If you encounter this file and do not have - * permission, please contact the copyright holders and delete this file. - */ - -#include "GeoJSONSpawnerROS2EditorSystemComponent.h" -#include - -#include - -namespace GeoJSONSpawnerROS2 -{ - AZ_COMPONENT_IMPL( - GeoJSONSpawnerROS2EditorSystemComponent, - "GeoJSONSpawnerROS2EditorSystemComponent", - GeoJSONSpawnerROS2EditorSystemComponentTypeId, - BaseSystemComponent); - - void GeoJSONSpawnerROS2EditorSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - GeoJSONSpawnerROS2EditorSystemComponent::GeoJSONSpawnerROS2EditorSystemComponent() = default; - - GeoJSONSpawnerROS2EditorSystemComponent::~GeoJSONSpawnerROS2EditorSystemComponent() = default; - - void GeoJSONSpawnerROS2EditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - BaseSystemComponent::GetProvidedServices(provided); - provided.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2EditorService")); - } - - void GeoJSONSpawnerROS2EditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - BaseSystemComponent::GetIncompatibleServices(incompatible); - incompatible.push_back(AZ_CRC_CE("GeoJSONSpawnerROS2EditorService")); - } - - void GeoJSONSpawnerROS2EditorSystemComponent::GetRequiredServices( - [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - BaseSystemComponent::GetRequiredServices(required); - } - - void GeoJSONSpawnerROS2EditorSystemComponent::GetDependentServices( - [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - BaseSystemComponent::GetDependentServices(dependent); - } - - void GeoJSONSpawnerROS2EditorSystemComponent::Activate() - { - GeoJSONSpawnerROS2SystemComponent::Activate(); - AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); - } - - void GeoJSONSpawnerROS2EditorSystemComponent::Deactivate() - { - AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); - GeoJSONSpawnerROS2SystemComponent::Deactivate(); - } - -} // namespace GeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_api_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_api_files.cmake deleted file mode 100644 index d648981a..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_api_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Include/GeoJSONSpawnerROS2/GeoJSONSpawnerROS2TypeIds.h -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_private_files.cmake deleted file mode 100644 index 00e7ac87..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_private_files.cmake +++ /dev/null @@ -1,7 +0,0 @@ - -set(FILES - Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.cpp - Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.h - Source/ROS2/GeoJSONSpawnerROS2EditorComponent.cpp - Source/ROS2/GeoJSONSpawnerROS2EditorComponent.h -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_shared_files.cmake deleted file mode 100644 index 703bd386..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_shared_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Source/Tools/GeoJSONSpawnerROS2EditorModule.cpp -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_tests_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_tests_files.cmake deleted file mode 100644 index 1b5f417c..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_tests_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Tests/Tools/GeoJSONSpawnerROS2EditorTest.cpp -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_private_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_private_files.cmake deleted file mode 100644 index 1258e3a4..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_private_files.cmake +++ /dev/null @@ -1,9 +0,0 @@ - -set(FILES - Source/GeoJSONSpawnerROS2ModuleInterface.cpp - Source/GeoJSONSpawnerROS2ModuleInterface.h - Source/Clients/GeoJSONSpawnerROS2SystemComponent.cpp - Source/Clients/GeoJSONSpawnerROS2SystemComponent.h - Source/ROS2/GeoJSONSpawnerROS2.cpp - Source/ROS2/GeoJSONSpawnerROS2.h -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_shared_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_shared_files.cmake deleted file mode 100644 index 11f507aa..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_shared_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Source/Clients/GeoJSONSpawnerROS2Module.cpp -) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_tests_files.cmake b/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_tests_files.cmake deleted file mode 100644 index f25eff88..00000000 --- a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_tests_files.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -set(FILES - Tests/Clients/GeoJSONSpawnerROS2Test.cpp -) diff --git a/Gems/GeoJSONSpawner/CMakeLists.txt b/Gems/RobotecGeoJSONSpawner/CMakeLists.txt similarity index 87% rename from Gems/GeoJSONSpawner/CMakeLists.txt rename to Gems/RobotecGeoJSONSpawner/CMakeLists.txt index d108568b..e592d26a 100644 --- a/Gems/GeoJSONSpawner/CMakeLists.txt +++ b/Gems/RobotecGeoJSONSpawner/CMakeLists.txt @@ -1,9 +1,9 @@ # Query the gem name from the gem.json file if possible -# otherwise fallback to using GeoJSONSpawner +# otherwise fallback to using RobotecGeoJSONSpawner o3de_find_ancestor_gem_root(gem_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}") if (NOT gem_name) - set(gem_name "GeoJSONSpawner") + set(gem_name "RobotecGeoJSONSpawner") endif() # Fallback to using the current source CMakeLists.txt directory as the gem root path diff --git a/Gems/GeoJSONSpawner/Code/CMakeLists.txt b/Gems/RobotecGeoJSONSpawner/Code/CMakeLists.txt similarity index 88% rename from Gems/GeoJSONSpawner/Code/CMakeLists.txt rename to Gems/RobotecGeoJSONSpawner/Code/CMakeLists.txt index f4dca63a..c64fecaa 100644 --- a/Gems/GeoJSONSpawner/Code/CMakeLists.txt +++ b/Gems/RobotecGeoJSONSpawner/Code/CMakeLists.txt @@ -3,8 +3,8 @@ # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} # Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. -# i.e. It could here in our gem : Gems/GeoJSONSpawner/Code/Platform/ or -# //Gems/GeoJSONSpawner/Code +# i.e. It could here in our gem : Gems/RobotecGeoJSONSpawner/Code/Platform/ or +# //Gems/RobotecGeoJSONSpawner/Code o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}") # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the @@ -13,7 +13,7 @@ o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${ include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # Check to see if building the Gem Modules are supported for the current platform -if(NOT PAL_TRAIT_GEOJSONSPAWNER_SUPPORTED) +if(NOT PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED) return() endif() @@ -22,8 +22,8 @@ ly_add_target( NAME ${gem_name}.API INTERFACE NAMESPACE Gem FILES_CMAKE - geojsonspawner_api_files.cmake - ${pal_dir}/geojsonspawner_api_files.cmake + robotecgeojsonspawner_api_files.cmake + ${pal_dir}/robotecgeojsonspawner_api_files.cmake INCLUDE_DIRECTORIES INTERFACE Include @@ -39,8 +39,8 @@ ly_add_target( NAME ${gem_name}.Private.Object STATIC NAMESPACE Gem FILES_CMAKE - geojsonspawner_private_files.cmake - ${pal_dir}/geojsonspawner_private_files.cmake + robotecgeojsonspawner_private_files.cmake + ${pal_dir}/robotecgeojsonspawner_private_files.cmake TARGET_PROPERTIES O3DE_PRIVATE_TARGET TRUE INCLUDE_DIRECTORIES @@ -60,8 +60,8 @@ ly_add_target( NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawner_shared_files.cmake - ${pal_dir}/geojsonspawner_shared_files.cmake + robotecgeojsonspawner_shared_files.cmake + ${pal_dir}/robotecgeojsonspawner_shared_files.cmake INCLUDE_DIRECTORIES PUBLIC Include @@ -97,8 +97,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAME ${gem_name}.Editor.API INTERFACE NAMESPACE Gem FILES_CMAKE - geojsonspawner_editor_api_files.cmake - ${pal_dir}/geojsonspawner_editor_api_files.cmake + robotecgeojsonspawner_editor_api_files.cmake + ${pal_dir}/robotecgeojsonspawner_editor_api_files.cmake INCLUDE_DIRECTORIES INTERFACE Include @@ -114,7 +114,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAME ${gem_name}.Editor.Private.Object STATIC NAMESPACE Gem FILES_CMAKE - geojsonspawner_editor_private_files.cmake + robotecgeojsonspawner_editor_private_files.cmake TARGET_PROPERTIES O3DE_PRIVATE_TARGET TRUE INCLUDE_DIRECTORIES @@ -134,7 +134,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAMESPACE Gem AUTOMOC FILES_CMAKE - geojsonspawner_editor_shared_files.cmake + robotecgeojsonspawner_editor_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE Source @@ -171,13 +171,13 @@ endif() # See if globally, tests are supported if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests - if(PAL_TRAIT_GEOJSONSPAWNER_TEST_SUPPORTED) + if(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED) # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target ly_add_target( NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawner_tests_files.cmake + robotecgeojsonspawner_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE Tests @@ -199,14 +199,14 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) # If we are a host platform we want to add tools test like editor tests here if(PAL_TRAIT_BUILD_HOST_TOOLS) # We are a host platform, see if Editor tests are supported on this platform - if(PAL_TRAIT_GEOJSONSPAWNER_EDITOR_TEST_SUPPORTED) + if(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED) # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on # private ${gem_name}.Editor.Private.Object target ly_add_target( NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawner_editor_tests_files.cmake + robotecgeojsonspawner_editor_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE Tests diff --git a/Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerBus.h b/Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h similarity index 84% rename from Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerBus.h rename to Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h index dc754e29..394d1f6e 100644 --- a/Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerBus.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h @@ -10,9 +10,9 @@ #pragma once -#include "GeoJSONSpawner/GeoJSONSpawnerUtils.h" -#include "GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h" -#include "GeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h" +#include "RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h" +#include "RobotecGeoJSONSpawnerTypeIds.h" #include #include @@ -21,17 +21,17 @@ #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { using Result = AZ::Outcome; using GetIdsResult = AZ::Outcome; - //! Interface for the GeoJSONSpawner + //! Interface for the RobotecGeoJSONSpawner //! Used for spawning, despawning and modifying prefabs described in the GeoJSON file - class GeoJSONSpawnerRequests : public AZ::ComponentBus + class RobotecGeoJSONSpawnerRequests : public AZ::ComponentBus { public: - AZ_RTTI(GeoJSONSpawnerRequests, GeoJSONSpawnerRequestsTypeId); + AZ_RTTI(RobotecGeoJSONSpawnerRequests, RobotecGeoJSONSpawnerRequestsTypeId); using BusIdType = AZ::EntityId; using MutexType = AZStd::mutex; @@ -51,7 +51,7 @@ namespace GeoJSONSpawner //! If any of the given ID does not exist then modify action will be canceled virtual Result Modify(const AZStd::string& rawJsonString) = 0; - //! Delete all prefabs spawned with GeoJSONSpawner + //! Delete all prefabs spawned with RobotecGeoJSONSpawner virtual Result DeleteAll() = 0; //! Delete prefabs based on the information in provided GeoJSON @@ -63,19 +63,19 @@ namespace GeoJSONSpawner virtual GetIdsResult GetIds() const = 0; }; - using GeoJSONSpawnerRequestBus = AZ::EBus; + using RobotecGeoJSONSpawnerRequestBus = AZ::EBus; /** * @brief Interface for handling entity spawn events in GeoJSON Spawner. * - * GeoJSONSpawnerInterface is an Event Bus (EBus) interface that notifies multiple listeners + * RobotecGeoJSONSpawnerInterface is an Event Bus (EBus) interface that notifies multiple listeners * when entity spawning and despawning begins or finishes. */ - class GeoJSONSpawnerInterface : public AZ::EBusTraits + class RobotecGeoJSONSpawnerInterface : public AZ::EBusTraits { public: - AZ_RTTI(GeoJSONSpawnerInterface, GeoJSONSpawnerInterfaceTypeId); - virtual ~GeoJSONSpawnerInterface() = default; + AZ_RTTI(RobotecGeoJSONSpawnerInterface, RobotecGeoJSONSpawnerInterfaceTypeId); + virtual ~RobotecGeoJSONSpawnerInterface() = default; /** * @brief Called when entity spawning begins. @@ -135,16 +135,16 @@ namespace GeoJSONSpawner static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; }; // Create an EBus using the notification interface - using GeoJSONSpawnerNotificationBus = AZ::EBus; + using RobotecGeoJSONSpawnerNotificationBus = AZ::EBus; - class GeoJSONSpawnerNotificationBusHandler - : public GeoJSONSpawnerNotificationBus::Handler + class RobotecGeoJSONSpawnerNotificationBusHandler + : public RobotecGeoJSONSpawnerNotificationBus::Handler , public AZ::BehaviorEBusHandler { public: AZ_EBUS_BEHAVIOR_BINDER( - GeoJSONSpawnerNotificationBusHandler, - GeoJSONSpawnerNotificationBusHandlerTypeId, + RobotecGeoJSONSpawnerNotificationBusHandler, + RobotecGeoJSONSpawnerNotificationBusHandlerTypeId, AZ::SystemAllocator, OnEntitiesSpawnBegin, OnEntitiesSpawnFinished, @@ -185,4 +185,4 @@ namespace GeoJSONSpawner Call(FN_OnEntityDespawn, despawnedEntityTicket); } }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h b/Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h new file mode 100644 index 00000000..1125feb6 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h @@ -0,0 +1,48 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#pragma once + +namespace RobotecGeoJSONSpawner +{ + // System Component TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerSystemComponentTypeId = "{CD4EB5DE-E197-433A-B651-A0507E6A7138}"; + inline constexpr const char* RobotecGeoJSONSpawnerEditorSystemComponentTypeId = "{6894C22F-7C51-4C87-92E0-83D93F42252C}"; + + // Module derived classes TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerModuleInterfaceTypeId = "{457EB65D-5DFC-4341-BDE3-79D054485C58}"; + inline constexpr const char* RobotecGeoJSONSpawnerModuleTypeId = "{E56013BF-CE3A-4AA5-81AD-698844BEA7C6}"; + // The Editor Module by default is mutually exclusive with the Client Module + // so they use the Same TypeId + inline constexpr const char* RobotecGeoJSONSpawnerEditorModuleTypeId = RobotecGeoJSONSpawnerModuleTypeId; + + // Editor Components TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerEditorComponentTypeId = "{97d8cdeb-8a82-4bb0-adc3-c42a3eac21c7}"; + + // Configurations TypeIds + inline constexpr const char* GeoJSONSpawnableAssetConfigurationTypeId = "{cee254bb-edc8-45b1-b85a-aaf19ec3af83}"; + inline constexpr const char* GeoJSONSpawnableEntityInfoTypeId = "{170bb487-fbae-4394-8176-069045a3a316}"; + inline constexpr const char* FeatureObjectInfoTypeId = "{00f38302-9f4d-4bac-805b-72a29e42a704}"; + inline constexpr const char* RobotecGeoJSONSpawnerEditorTerrainSettingsConfigTypeId = "{9bb9e1c6-dd7c-435f-8fe1-bd5498c3e8f2}"; + + // Wrapper TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerSpawnTicketMapWrapperTypeId = "{714316F3-190D-4189-B14B-B601BE22EEBC}"; + + // Components TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerComponentTypeId = "{839ede69-92f1-45b0-a60e-035d0b84e1fd}"; + + // Interface TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerRequestsTypeId = "{EE523E9E-CFDF-4590-BBDE-054848BBA790}"; + inline constexpr const char* RobotecGeoJSONSpawnerInterfaceTypeId = "{4770B38A-D018-4184-A672-3F9155B7BEE7}"; + inline constexpr const char* RobotecGeoJSONSpawnerNotificationBusHandlerTypeId = "{9D8C5E99-7151-4AA4-9B5F-2D8AE2F097F7}"; + + // Enums + inline constexpr const char* SpawnDespawnStatusTypeId = "{1E22A24E-8365-4CC7-8B99-CC0EF0B25B13}"; +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/PAL_android.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/PAL_android.cmake new file mode 100644 index 00000000..ec03f70b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/PAL_android.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Android/geojsonspawner_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..ee1286d9 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Android +# i.e. ../Source/Android/RobotecGeoJSONSpawnerAndroid.cpp +# ../Source/Android/RobotecGeoJSONSpawnerAndroid.h +# ../Include/Android/RobotecGeoJSONSpawnerAndroid.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..ee1286d9 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Android/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Android +# i.e. ../Source/Android/RobotecGeoJSONSpawnerAndroid.cpp +# ../Source/Android/RobotecGeoJSONSpawnerAndroid.h +# ../Include/Android/RobotecGeoJSONSpawnerAndroid.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake new file mode 100644 index 00000000..ec03f70b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/PAL_linux.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_api_files.cmake diff --git a/Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Linux/geojsonspawner_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..8fecb0c4 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Linux +# i.e. ../Source/Linux/RobotecGeoJSONSpawnerLinux.cpp +# ../Source/Linux/RobotecGeoJSONSpawnerLinux.h +# ../Include/Linux/RobotecGeoJSONSpawnerLinux.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..8fecb0c4 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Linux/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Linux +# i.e. ../Source/Linux/RobotecGeoJSONSpawnerLinux.cpp +# ../Source/Linux/RobotecGeoJSONSpawnerLinux.h +# ../Include/Linux/RobotecGeoJSONSpawnerLinux.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake new file mode 100644 index 00000000..ec03f70b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/PAL_mac.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_api_files.cmake diff --git a/Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Mac/geojsonspawner_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..87290e4c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Mac +# i.e. ../Source/Mac/RobotecGeoJSONSpawnerMac.cpp +# ../Source/Mac/RobotecGeoJSONSpawnerMac.h +# ../Include/Mac/RobotecGeoJSONSpawnerMac.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..87290e4c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Mac/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Mac +# i.e. ../Source/Mac/RobotecGeoJSONSpawnerMac.cpp +# ../Source/Mac/RobotecGeoJSONSpawnerMac.h +# ../Include/Mac/RobotecGeoJSONSpawnerMac.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake new file mode 100644 index 00000000..ec03f70b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/PAL_windows.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_api_files.cmake diff --git a/Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/Windows/geojsonspawner_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..5458c43d --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Windows +# i.e. ../Source/Windows/RobotecGeoJSONSpawnerWindows.cpp +# ../Source/Windows/RobotecGeoJSONSpawnerWindows.h +# ../Include/Windows/RobotecGeoJSONSpawnerWindows.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..5458c43d --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/Windows/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Windows +# i.e. ../Source/Windows/RobotecGeoJSONSpawnerWindows.cpp +# ../Source/Windows/RobotecGeoJSONSpawnerWindows.h +# ../Include/Windows/RobotecGeoJSONSpawnerWindows.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake new file mode 100644 index 00000000..ec03f70b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/PAL_ios.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNER_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/Platform/iOS/geojsonspawner_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..3af7f757 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for iOS +# i.e. ../Source/iOS/RobotecGeoJSONSpawneriOS.cpp +# ../Source/iOS/RobotecGeoJSONSpawneriOS.h +# ../Include/iOS/RobotecGeoJSONSpawneriOS.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..3af7f757 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Platform/iOS/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for iOS +# i.e. ../Source/iOS/RobotecGeoJSONSpawneriOS.cpp +# ../Source/iOS/RobotecGeoJSONSpawneriOS.h +# ../Include/iOS/RobotecGeoJSONSpawneriOS.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerModule.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerModule.cpp new file mode 100644 index 00000000..4745728c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerModule.cpp @@ -0,0 +1,25 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerSystemComponent.h" +#include +#include + +namespace RobotecGeoJSONSpawner +{ + class RobotecGeoJSONSpawnerModule : public RobotecGeoJSONSpawnerModuleInterface + { + public: + AZ_RTTI(RobotecGeoJSONSpawnerModule, RobotecGeoJSONSpawnerModuleTypeId, RobotecGeoJSONSpawnerModuleInterface); + AZ_CLASS_ALLOCATOR(RobotecGeoJSONSpawnerModule, AZ::SystemAllocator); + }; +} // namespace RobotecGeoJSONSpawner + +AZ_DECLARE_MODULE_CLASS(Gem_RobotecGeoJSONSpawner, RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerModule) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.cpp new file mode 100644 index 00000000..c5f30e5d --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.cpp @@ -0,0 +1,60 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerSystemComponent.h" + +#include + +#include + +namespace RobotecGeoJSONSpawner +{ + AZ_COMPONENT_IMPL( + RobotecGeoJSONSpawnerSystemComponent, "RobotecGeoJSONSpawnerSystemComponent", RobotecGeoJSONSpawnerSystemComponentTypeId); + + void RobotecGeoJSONSpawnerSystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(0); + } + } + + void RobotecGeoJSONSpawnerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerService")); + } + + void RobotecGeoJSONSpawnerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerService")); + } + + void RobotecGeoJSONSpawnerSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) + { + } + + void RobotecGeoJSONSpawnerSystemComponent::GetDependentServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + } + + void RobotecGeoJSONSpawnerSystemComponent::Init() + { + } + + void RobotecGeoJSONSpawnerSystemComponent::Activate() + { + } + + void RobotecGeoJSONSpawnerSystemComponent::Deactivate() + { + } +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.h b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.h similarity index 80% rename from Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.h index 5a8172cf..7549b728 100644 --- a/Gems/GeoJSONSpawner/Code/Source/Clients/GeoJSONSpawnerSystemComponent.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Clients/RobotecGeoJSONSpawnerSystemComponent.h @@ -12,12 +12,12 @@ #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - class GeoJSONSpawnerSystemComponent : public AZ::Component + class RobotecGeoJSONSpawnerSystemComponent : public AZ::Component { public: - AZ_COMPONENT_DECL(GeoJSONSpawnerSystemComponent); + AZ_COMPONENT_DECL(RobotecGeoJSONSpawnerSystemComponent); static void Reflect(AZ::ReflectContext* context); @@ -26,8 +26,8 @@ namespace GeoJSONSpawner static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); - GeoJSONSpawnerSystemComponent() = default; - ~GeoJSONSpawnerSystemComponent() = default; + RobotecGeoJSONSpawnerSystemComponent() = default; + ~RobotecGeoJSONSpawnerSystemComponent() = default; protected: //////////////////////////////////////////////////////////////////////// @@ -38,4 +38,4 @@ namespace GeoJSONSpawner //////////////////////////////////////////////////////////////////////// }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.cpp similarity index 75% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.cpp index 18e5148d..f9c57b08 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.cpp +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.cpp @@ -8,57 +8,62 @@ * permission, please contact the copyright holders and delete this file. */ -#include "GeoJSONSpawnerEditorTerrainSettingsConfig.h" -#include "GeoJSONSpawner/GeoJSONSpawnerUtils.h" +#include "RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h" #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - void GeoJSONSpawnerEditorTerrainSettingsConfig::Reflect(AZ::ReflectContext* context) + void RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::Reflect(AZ::ReflectContext* context) { auto* serializeContext = azrtti_cast(context); if (serializeContext) { - serializeContext->Class() + serializeContext->Class() ->Version(0) - ->Field("SpawnOnComponentActivated", &GeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnComponentActivated) - ->Field("SpawnOnTerrainUpdate", &GeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnTerrainUpdate) - ->Field("TerrainDataChangedMask", &GeoJSONSpawnerEditorTerrainSettingsConfig::m_terrainMasksToIgnore); + ->Field("SpawnOnComponentActivated", &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnComponentActivated) + ->Field("SpawnOnTerrainUpdate", &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnTerrainUpdate) + ->Field("TerrainDataChangedMask", &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_terrainMasksToIgnore); } auto* editContext = serializeContext->GetEditContext(); if (editContext) { editContext - ->Class( - "GeoJSONSpawnerEditorTerrainSettingsConfig", "GeoJSONSpawnerEditorTerrainSettingsConfig") + ->Class( + "RobotecGeoJSONSpawnerEditorTerrainSettingsConfig", "RobotecGeoJSONSpawnerEditorTerrainSettingsConfig") ->ClassElement(AZ::Edit::ClassElements::EditorData, "In Editor Spawn Settings") ->Attribute(AZ::Edit::Attributes::Category, "In Editor Spawn Settings") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnComponentActivated, + &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnComponentActivated, "Spawn On Editor Activate", "Spawns entities when editor component is being activated.") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &GeoJSONSpawnerEditorTerrainSettingsConfig::RefreshUI) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::RefreshUI) ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnTerrainUpdate, + &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_spawnOnTerrainUpdate, "Spawn On Terrain Update", "Should respawn entities on any Terrain config and transform change.") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &GeoJSONSpawnerEditorTerrainSettingsConfig::SpawnOnTerrainUpdateTriggered) - ->Attribute(AZ::Edit::Attributes::Visibility, &GeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain) + ->Attribute( + AZ::Edit::Attributes::ChangeNotify, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::SpawnOnTerrainUpdateTriggered) + ->Attribute( + AZ::Edit::Attributes::Visibility, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain) ->DataElement( AZ::Edit::UIHandlers::ComboBox, - &GeoJSONSpawnerEditorTerrainSettingsConfig::m_terrainMasksToIgnore, + &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::m_terrainMasksToIgnore, "Terrain Flags To Ignore", "Flags to ignore on the terrain update data performed.") - ->Attribute(AZ::Edit::Attributes::ReadOnly, &GeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateDisabled) - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &GeoJSONSpawnerEditorTerrainSettingsConfig::OnTerrainFlagsChanged) - ->Attribute(AZ::Edit::Attributes::Visibility, &GeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain) ->Attribute( - AZ::Edit::Attributes::ComboBoxEditable, &GeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateEnabled) + AZ::Edit::Attributes::ReadOnly, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateDisabled) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::OnTerrainFlagsChanged) + ->Attribute( + AZ::Edit::Attributes::Visibility, &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain) + ->Attribute( + AZ::Edit::Attributes::ComboBoxEditable, + &RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateEnabled) ->Attribute( AZ::Edit::Attributes::EnumValues, AZStd::vector>{ @@ -122,17 +127,17 @@ namespace GeoJSONSpawner } } - AZ::u32 GeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain() const + AZ::u32 RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::SetPropertyVisibilityByTerrain() const { return GeoJSONUtils::IsTerrainAvailable() ? AZ::Edit::PropertyVisibility::Show : AZ::Edit::PropertyVisibility::Hide; } - AZ::Crc32 GeoJSONSpawnerEditorTerrainSettingsConfig::SpawnOnTerrainUpdateTriggered() + AZ::Crc32 RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::SpawnOnTerrainUpdateTriggered() { return RefreshUI(); } - AZ::Crc32 GeoJSONSpawnerEditorTerrainSettingsConfig::OnTerrainFlagsChanged() + AZ::Crc32 RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::OnTerrainFlagsChanged() { if (m_terrainMasksToIgnore == AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask::All) { @@ -142,18 +147,18 @@ namespace GeoJSONSpawner return RefreshUI(); } - AZ::Crc32 GeoJSONSpawnerEditorTerrainSettingsConfig::RefreshUI() + AZ::Crc32 RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::RefreshUI() { return AZ::Edit::PropertyRefreshLevels::AttributesAndValues; } - bool GeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateDisabled() const + bool RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateDisabled() const { return !m_spawnOnTerrainUpdate; } - bool GeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateEnabled() const + bool RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::IsSpawnOnTerrainUpdateEnabled() const { return m_spawnOnTerrainUpdate; } -} // namespace GeoJSONSpawner \ No newline at end of file +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h similarity index 81% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h index ec9dbc91..686aa65f 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h @@ -10,20 +10,20 @@ #pragma once -#include "GeoJSONSpawner/GeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h" #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { //! Terrain Settings Configuration for Editor Component. //! This config lets user decide what behaviour should be applied when the Terrain is applicable in current Level. - class GeoJSONSpawnerEditorTerrainSettingsConfig + class RobotecGeoJSONSpawnerEditorTerrainSettingsConfig { public: - AZ_RTTI(GeoJSONSpawnerEditorTerrainSettingsConfig, GeoJSONSpawnerEditorTerrainSettingsConfigTypeId) + AZ_RTTI(RobotecGeoJSONSpawnerEditorTerrainSettingsConfig, RobotecGeoJSONSpawnerEditorTerrainSettingsConfigTypeId) - GeoJSONSpawnerEditorTerrainSettingsConfig() = default; - virtual ~GeoJSONSpawnerEditorTerrainSettingsConfig() = default; + RobotecGeoJSONSpawnerEditorTerrainSettingsConfig() = default; + virtual ~RobotecGeoJSONSpawnerEditorTerrainSettingsConfig() = default; static void Reflect(AZ::ReflectContext* context); @@ -56,4 +56,4 @@ namespace GeoJSONSpawner [[nodiscard]] bool IsSpawnOnTerrainUpdateEnabled() const; }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.cpp similarity index 77% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.cpp index 4f06cf57..a01a110a 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.cpp @@ -8,7 +8,7 @@ * permission, please contact the copyright holders and delete this file. */ -#include "GeoJSONSpawnerComponent.h" +#include "RobotecGeoJSONSpawnerComponent.h" #include "Wrappers/SpawnTicketMapWrapper.h" @@ -18,9 +18,9 @@ #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - GeoJSONSpawnerComponent::GeoJSONSpawnerComponent( + RobotecGeoJSONSpawnerComponent::RobotecGeoJSONSpawnerComponent( const AZStd::unordered_map& spawnableAssetConfigurations, const AZ::IO::Path& geoJsonFilePath, AZ::u64 defaultSeed) @@ -30,7 +30,7 @@ namespace GeoJSONSpawner { } - void GeoJSONSpawnerComponent::Activate() + void RobotecGeoJSONSpawnerComponent::Activate() { if (GeoJSONUtils::IsTerrainAvailable()) { @@ -41,10 +41,10 @@ namespace GeoJSONSpawner OnTerrainDataCreateEnd(); } - GeoJSONSpawnerRequestBus::Handler::BusConnect(GetEntityId()); + RobotecGeoJSONSpawnerRequestBus::Handler::BusConnect(GetEntityId()); } - void GeoJSONSpawnerComponent::Deactivate() + void RobotecGeoJSONSpawnerComponent::Deactivate() { if (AZ::TickBus::Handler::BusIsConnected()) { @@ -52,10 +52,10 @@ namespace GeoJSONSpawner } OnTerrainDataDestroyBegin(); - GeoJSONSpawnerRequestBus::Handler::BusDisconnect(); + RobotecGeoJSONSpawnerRequestBus::Handler::BusDisconnect(); } - void GeoJSONSpawnerComponent::Reflect(AZ::ReflectContext* context) + void RobotecGeoJSONSpawnerComponent::Reflect(AZ::ReflectContext* context) { GeoJSONUtils::GeoJSONSpawnableAssetConfiguration::Reflect(context); GeoJSONUtils::GeoJSONSpawnableEntityInfo::Reflect(context); @@ -72,11 +72,11 @@ namespace GeoJSONSpawner ->Value("Warning", GeoJSONUtils::SpawnDespawnStatus::Warning) ->Value("Invalid", GeoJSONUtils::SpawnDespawnStatus::Invalid); - serializeContext->Class() + serializeContext->Class() ->Version(0) - ->Field("SpawnableAssetConfigurations", &GeoJSONSpawnerComponent::m_spawnableAssetConfigurations) - ->Field("GeoJsonFilePath", &GeoJSONSpawnerComponent::m_geoJsonFilePath) - ->Field("DefaultSeed", &GeoJSONSpawnerComponent::m_defaultSeed); + ->Field("SpawnableAssetConfigurations", &RobotecGeoJSONSpawnerComponent::m_spawnableAssetConfigurations) + ->Field("GeoJsonFilePath", &RobotecGeoJSONSpawnerComponent::m_geoJsonFilePath) + ->Field("DefaultSeed", &RobotecGeoJSONSpawnerComponent::m_defaultSeed); } if (auto behaviorContext = azrtti_cast(context)) @@ -87,12 +87,12 @@ namespace GeoJSONSpawner behaviorContext->EnumProperty(GeoJSONUtils::SpawnDespawnStatus::Warning)>("SpawnStatus_Warning"); behaviorContext->EnumProperty(GeoJSONUtils::SpawnDespawnStatus::Invalid)>("SpawnStatus_Invalid"); - behaviorContext->EBus("GeoJSONSpawnerNotificationBus") - ->Handler(); + behaviorContext->EBus("RobotecGeoJSONSpawnerNotificationBus") + ->Handler(); } } - void GeoJSONSpawnerComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) + void RobotecGeoJSONSpawnerComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) { if (m_spawnerState == SpawnerState::Idle && m_spawnerStateQueue.empty()) { @@ -104,9 +104,9 @@ namespace GeoJSONSpawner { if (m_ticketsToDespawn == 0) { - // Call GeoJSONSpawner EBus notification - Despawn Finished - GeoJSONSpawnerNotificationBus::Broadcast( - &GeoJSONSpawnerInterface::OnEntitiesDespawnFinished, m_copyDespawnTickets, m_despawnStatus); + // Call RobotecGeoJSONSpawner EBus notification - Despawn Finished + RobotecGeoJSONSpawnerNotificationBus::Broadcast( + &RobotecGeoJSONSpawnerInterface::OnEntitiesDespawnFinished, m_copyDespawnTickets, m_despawnStatus); m_spawnerState = SpawnerState::Idle; } } @@ -120,9 +120,9 @@ namespace GeoJSONSpawner } if (m_ticketsToSpawn == 0) { - // Call GeoJSONSpawner EBus notification - Spawn Finished - GeoJSONSpawnerNotificationBus::Broadcast( - &GeoJSONSpawnerInterface::OnEntitiesSpawnFinished, m_copySpawnTickets, m_spawnStatus); + // Call RobotecGeoJSONSpawner EBus notification - Spawn Finished + RobotecGeoJSONSpawnerNotificationBus::Broadcast( + &RobotecGeoJSONSpawnerInterface::OnEntitiesSpawnFinished, m_copySpawnTickets, m_spawnStatus); m_spawnerState = SpawnerState::Idle; } } @@ -134,17 +134,17 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerComponent::SpawnEntities() + void RobotecGeoJSONSpawnerComponent::SpawnEntities() { m_spawnableTickets.clear(); const auto featureObjectInfo = GeoJSONUtils::ParseJSONFromFile(m_geoJsonFilePath.c_str()); SpawnEntities(featureObjectInfo); } - void GeoJSONSpawnerComponent::SpawnEntities(const AZStd::vector& featureObjectsToSpawn) + void RobotecGeoJSONSpawnerComponent::SpawnEntities(const AZStd::vector& featureObjectsToSpawn) { - // Call GeoJSONSpawner EBus notification - Begin - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntitiesSpawnBegin); + // Call RobotecGeoJSONSpawner EBus notification - Begin + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntitiesSpawnBegin); ResetSpawnDespawnStatus(m_spawnStatus, m_copySpawnTickets); m_spawnableEntityInfo = @@ -173,10 +173,10 @@ namespace GeoJSONSpawner m_copySpawnTickets.SetMap(m_spawnableTickets); } - void GeoJSONSpawnerComponent::SpawnCachedEntities(const AZStd::vector& cachedObjectsToSpawn) + void RobotecGeoJSONSpawnerComponent::SpawnCachedEntities(const AZStd::vector& cachedObjectsToSpawn) { - // Call GeoJSONSpawner EBus notification - Begin - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntitiesSpawnBegin); + // Call RobotecGeoJSONSpawner EBus notification - Begin + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntitiesSpawnBegin); ResetSpawnDespawnStatus(m_spawnStatus, m_copySpawnTickets); auto entityInfos = GeoJSONUtils::GetSpawnableEntitiesFromFeatureObjectVector(cachedObjectsToSpawn, m_spawnableAssetConfigurations); @@ -205,7 +205,7 @@ namespace GeoJSONSpawner m_copySpawnTickets.SetMap(m_spawnableTickets); } - Result GeoJSONSpawnerComponent::SpawnWithRawString(const AZStd::string& rawJsonString) + Result RobotecGeoJSONSpawnerComponent::SpawnWithRawString(const AZStd::string& rawJsonString) { if (m_spawnerState != SpawnerState::Idle || !m_spawnerStateQueue.empty()) { @@ -233,7 +233,7 @@ namespace GeoJSONSpawner return AZ::Success(); } - Result GeoJSONSpawnerComponent::SpawnWithAssetPath(const AZ::IO::Path& assetPath) + Result RobotecGeoJSONSpawnerComponent::SpawnWithAssetPath(const AZ::IO::Path& assetPath) { if (m_spawnerState != SpawnerState::Idle || !m_spawnerStateQueue.empty()) { @@ -259,7 +259,7 @@ namespace GeoJSONSpawner return AZ::Success(); } - Result GeoJSONSpawnerComponent::Modify(const AZStd::string& rawJsonString) + Result RobotecGeoJSONSpawnerComponent::Modify(const AZStd::string& rawJsonString) { if (m_spawnerState != SpawnerState::Idle || !m_spawnerStateQueue.empty()) { @@ -286,7 +286,7 @@ namespace GeoJSONSpawner return AZ::Success(); } - Result GeoJSONSpawnerComponent::DeleteById(const AZStd::unordered_set& idsToDelete) + Result RobotecGeoJSONSpawnerComponent::DeleteById(const AZStd::unordered_set& idsToDelete) { if (m_spawnerState != SpawnerState::Idle || !m_spawnerStateQueue.empty()) { @@ -299,7 +299,7 @@ namespace GeoJSONSpawner return AZ::Success(); } - Result GeoJSONSpawnerComponent::DeleteAll() + Result RobotecGeoJSONSpawnerComponent::DeleteAll() { if (m_spawnerState != SpawnerState::Idle || !m_spawnerStateQueue.empty()) { @@ -312,7 +312,7 @@ namespace GeoJSONSpawner return AZ::Success(); } - GetIdsResult GeoJSONSpawnerComponent::GetIds() const + GetIdsResult RobotecGeoJSONSpawnerComponent::GetIds() const { AZStd::string result{ "" }; for (const auto& pair : m_spawnableTickets) @@ -326,7 +326,7 @@ namespace GeoJSONSpawner return AZ::Success(result); } - void GeoJSONSpawnerComponent::OnTerrainDataCreateEnd() + void RobotecGeoJSONSpawnerComponent::OnTerrainDataCreateEnd() { if (m_terrainCreatedOnlyOnce) { @@ -343,13 +343,13 @@ namespace GeoJSONSpawner m_terrainCreatedOnlyOnce = true; } - void GeoJSONSpawnerComponent::OnTerrainDataDestroyBegin() + void RobotecGeoJSONSpawnerComponent::OnTerrainDataDestroyBegin() { m_terrainCreatedOnlyOnce = false; AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); } - void GeoJSONSpawnerComponent::FillGroupIdToTicketIdMap() + void RobotecGeoJSONSpawnerComponent::FillGroupIdToTicketIdMap() { // m_spawnableTicketsIds.clear(); for (const auto& pair : m_spawnableTickets) @@ -363,7 +363,7 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerComponent::FillGroupIdToTicketIdMap(const AZStd::unordered_set& groupIds) + void RobotecGeoJSONSpawnerComponent::FillGroupIdToTicketIdMap(const AZStd::unordered_set& groupIds) { m_spawnableTicketsIds.clear(); for (const auto id : groupIds) @@ -381,7 +381,7 @@ namespace GeoJSONSpawner } } - unsigned int GeoJSONSpawnerComponent::CountTicketsToSpawn( + unsigned int RobotecGeoJSONSpawnerComponent::CountTicketsToSpawn( const AZStd::unordered_map>& ticketsToSpawn) const { unsigned int count = 0; @@ -392,7 +392,7 @@ namespace GeoJSONSpawner return count; } - void GeoJSONSpawnerComponent::Despawn(AzFramework::EntitySpawnTicket& ticketToDespawn) + void RobotecGeoJSONSpawnerComponent::Despawn(AzFramework::EntitySpawnTicket& ticketToDespawn) { if (!ticketToDespawn.IsValid()) { @@ -420,10 +420,10 @@ namespace GeoJSONSpawner }); } - void GeoJSONSpawnerComponent::DespawnAllEntities() + void RobotecGeoJSONSpawnerComponent::DespawnAllEntities() { - // Call GeoJSONSpawner EBus notification - Despawn Begin - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntitiesDespawnBegin); + // Call RobotecGeoJSONSpawner EBus notification - Despawn Begin + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntitiesDespawnBegin); ResetSpawnDespawnStatus(m_despawnStatus, m_copyDespawnTickets); // Copy Spawn Tickets for notification bus @@ -446,10 +446,10 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerComponent::DespawnEntitiesById(const GeoJSONUtils::Ids& ids) + void RobotecGeoJSONSpawnerComponent::DespawnEntitiesById(const GeoJSONUtils::Ids& ids) { - // Call GeoJSONSpawner EBus notification - Despawn Begin - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntitiesDespawnBegin); + // Call RobotecGeoJSONSpawner EBus notification - Despawn Begin + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntitiesDespawnBegin); ResetSpawnDespawnStatus(m_despawnStatus, m_copyDespawnTickets); FillGroupIdToTicketIdMap(ids); @@ -460,7 +460,10 @@ namespace GeoJSONSpawner if (it == m_spawnableTickets.end()) { AZ_Error( - "GeoJSONSpawnerComponent", false, "Cannot delete entities. Entities group with ID: %d does not exist.", idToDespawn); + "RobotecGeoJSONSpawnerComponent", + false, + "Cannot delete entities. Entities group with ID: %d does not exist.", + idToDespawn); m_despawnStatus |= GeoJSONUtils::SpawnDespawnStatus::Warning; continue; @@ -482,11 +485,11 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerComponent::ResetSpawnDespawnStatus( + void RobotecGeoJSONSpawnerComponent::ResetSpawnDespawnStatus( GeoJSONUtils::SpawnDespawnStatus& status, GeoJSONWrappers::SpawnTicketMapWrapper& mapCopy) { status = m_spawnableTickets.empty() ? GeoJSONUtils::SpawnDespawnStatus::Fail : GeoJSONUtils::SpawnDespawnStatus::Success; mapCopy.Clear(); } -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.h similarity index 87% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.h index 49c09de2..bb3c30b8 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.h @@ -10,9 +10,9 @@ #pragma once -#include "GeoJSONSpawner/GeoJSONSpawnerBus.h" -#include "GeoJSONSpawner/GeoJSONSpawnerTypeIds.h" -#include "GeoJSONSpawnerUtils.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawnerUtils.h" #include #include @@ -20,7 +20,7 @@ #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { enum class SpawnerState { @@ -30,21 +30,21 @@ namespace GeoJSONSpawner }; //! Game component that spawns entities from a GeoJSON. //! This component is used to spawn various spawnables, on the first tick. - class GeoJSONSpawnerComponent + class RobotecGeoJSONSpawnerComponent : public AZ::Component - , public GeoJSONSpawnerRequestBus::Handler + , public RobotecGeoJSONSpawnerRequestBus::Handler , public AZ::TickBus::Handler , protected AzFramework::Terrain::TerrainDataNotificationBus::Handler { public: - AZ_COMPONENT(GeoJSONSpawnerComponent, GeoJSONSpawnerComponentTypeId); + AZ_COMPONENT(RobotecGeoJSONSpawnerComponent, RobotecGeoJSONSpawnerComponentTypeId); - GeoJSONSpawnerComponent() = default; - explicit GeoJSONSpawnerComponent( + RobotecGeoJSONSpawnerComponent() = default; + explicit RobotecGeoJSONSpawnerComponent( const AZStd::unordered_map& spawnableAssetConfigurations, const AZ::IO::Path& geoJsonFilePath, AZ::u64 defaultSeed); - ~GeoJSONSpawnerComponent() = default; + ~RobotecGeoJSONSpawnerComponent() = default; static void Reflect(AZ::ReflectContext* context); @@ -52,7 +52,7 @@ namespace GeoJSONSpawner void Activate() override; void Deactivate() override; - // GeoJSONSpawnerRequestBus::Handler overrides... + // RobotecGeoJSONSpawnerRequestBus::Handler overrides... Result SpawnWithRawString(const AZStd::string& rawJsonString) override; Result SpawnWithAssetPath(const AZ::IO::Path& assetPath) override; Result Modify(const AZStd::string& rawJsonString) override; @@ -109,4 +109,4 @@ namespace GeoJSONSpawner GeoJSONUtils::SpawnDespawnStatus m_despawnStatus{ GeoJSONUtils::SpawnDespawnStatus::Success }; GeoJSONWrappers::SpawnTicketMapWrapper m_copyDespawnTickets; }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.cpp similarity index 76% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.cpp index 709b403c..7e759103 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.cpp @@ -8,9 +8,9 @@ * permission, please contact the copyright holders and delete this file. */ -#include "GeoJSONSpawnerEditorComponent.h" -#include "EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h" -#include "GeoJSONSpawnerComponent.h" +#include "RobotecGeoJSONSpawnerEditorComponent.h" +#include "EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h" +#include "RobotecGeoJSONSpawnerComponent.h" #include #include @@ -19,64 +19,65 @@ #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - void GeoJSONSpawnerEditorComponent::Reflect(AZ::ReflectContext* context) + void RobotecGeoJSONSpawnerEditorComponent::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { - GeoJSONSpawnerEditorTerrainSettingsConfig::Reflect(context); + RobotecGeoJSONSpawnerEditorTerrainSettingsConfig::Reflect(context); - serializeContext->Class() + serializeContext->Class() ->Version(0) - ->Field("GeoJSONAssetId", &GeoJSONSpawnerEditorComponent::m_geoJsonAssetId) - ->Field("Configuration", &GeoJSONSpawnerEditorComponent::m_spawnableAssetConfigurations) - ->Field("DefaultSeed", &GeoJSONSpawnerEditorComponent::m_defaultSeed) - ->Field("ShowLabels", &GeoJSONSpawnerEditorComponent::m_showLabels) - ->Field("ConfigTerrainSettings", &GeoJSONSpawnerEditorComponent::m_terrainSettingsConfig); + ->Field("GeoJSONAssetId", &RobotecGeoJSONSpawnerEditorComponent::m_geoJsonAssetId) + ->Field("Configuration", &RobotecGeoJSONSpawnerEditorComponent::m_spawnableAssetConfigurations) + ->Field("DefaultSeed", &RobotecGeoJSONSpawnerEditorComponent::m_defaultSeed) + ->Field("ShowLabels", &RobotecGeoJSONSpawnerEditorComponent::m_showLabels) + ->Field("ConfigTerrainSettings", &RobotecGeoJSONSpawnerEditorComponent::m_terrainSettingsConfig); if (AZ::EditContext* editContext = serializeContext->GetEditContext()) { - editContext->Class("GeoJSONSpawnerEditorComponent", "Gem Spawner Editor Component") + editContext + ->Class("RobotecGeoJSONSpawnerEditorComponent", "Gem Spawner Editor Component") ->ClassElement(AZ::Edit::ClassElements::EditorData, "GeoJSON Spawner Editor Component") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute(AZ::Edit::Attributes::Category, "Spawners") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorComponent::m_geoJsonAssetId, + &RobotecGeoJSONSpawnerEditorComponent::m_geoJsonAssetId, "GeoJSON Asset Id", "ID of the asset containing GeoJSON that will be spawned.") ->UIElement(AZ::Edit::UIHandlers::Button, "Reload GeoJSON", "Reload GeoJSON") ->Attribute(AZ::Edit::Attributes::NameLabelOverride, "") ->Attribute(AZ::Edit::Attributes::ButtonText, "Spawn") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &GeoJSONSpawnerEditorComponent::OnSpawnButton) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RobotecGeoJSONSpawnerEditorComponent::OnSpawnButton) ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorComponent::m_spawnableAssetConfigurations, + &RobotecGeoJSONSpawnerEditorComponent::m_spawnableAssetConfigurations, "Spawnable Asset Configurations", "Spawnable Asset Configurations.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorComponent::m_defaultSeed, + &RobotecGeoJSONSpawnerEditorComponent::m_defaultSeed, "Default seed", "Default seed used for randomization.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorComponent::m_showLabels, + &RobotecGeoJSONSpawnerEditorComponent::m_showLabels, "Show labels in Editor", "Show labels in Editor.") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &GeoJSONSpawnerEditorComponent::OnShowLabelsChanged) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RobotecGeoJSONSpawnerEditorComponent::OnShowLabelsChanged) ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerEditorComponent::m_terrainSettingsConfig, + &RobotecGeoJSONSpawnerEditorComponent::m_terrainSettingsConfig, "Spawn Behaviour Settings", "Settings to configure spawn behaviour in editor."); } } } - void GeoJSONSpawnerEditorComponent::Activate() + void RobotecGeoJSONSpawnerEditorComponent::Activate() { AzToolsFramework::Components::EditorComponentBase::Activate(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); @@ -101,7 +102,7 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerEditorComponent::Deactivate() + void RobotecGeoJSONSpawnerEditorComponent::Deactivate() { m_spawnedTicketsGroups.clear(); m_terrainSettingsConfig.m_flagSpawnEntitiesOnStartOnce = false; @@ -111,11 +112,11 @@ namespace GeoJSONSpawner AzToolsFramework::Components::EditorComponentBase::Deactivate(); } - void GeoJSONSpawnerEditorComponent::SpawnEntities() + void RobotecGeoJSONSpawnerEditorComponent::SpawnEntities() { if (!m_geoJsonAssetId.IsValid()) { - AZ_Error("GeoJSONSpawnerEditorComponent", false, "JSON asset is not set."); + AZ_Error("RobotecGeoJSONSpawnerEditorComponent", false, "JSON asset is not set."); return; } @@ -133,13 +134,13 @@ namespace GeoJSONSpawner if (!ok) { - AZ_Error("GeoJSONSpawnerEditorComponent", false, "Cannot find asset source."); + AZ_Error("RobotecGeoJSONSpawnerEditorComponent", false, "Cannot find asset source."); return; } const AZ::IO::Path sourcePath = AZ::IO::Path(watchFolder) / AZ::IO::Path(sourceAssetInfo.m_relativePath); - AZ_Printf("GeoJSONSpawnerEditorComponent", "Source of GeoJSON file path: %s", sourcePath.c_str()); + AZ_Printf("RobotecGeoJSONSpawnerEditorComponent", "Source of GeoJSON file path: %s", sourcePath.c_str()); auto spawnableAssetConfigurationsMap = GeoJSONUtils::GetSpawnableAssetFromVector(m_spawnableAssetConfigurations); const auto featureObjectInfo = GeoJSONUtils::ParseJSONFromFile(sourcePath.c_str()); @@ -158,12 +159,12 @@ namespace GeoJSONSpawner m_spawnedTicketsGroups = GeoJSONUtils::SpawnEntities(ticketsToSpawn); } - void GeoJSONSpawnerEditorComponent::OnSpawnButton() + void RobotecGeoJSONSpawnerEditorComponent::OnSpawnButton() { SpawnEntities(); } - void GeoJSONSpawnerEditorComponent::OnShowLabelsChanged() + void RobotecGeoJSONSpawnerEditorComponent::OnShowLabelsChanged() { if (m_showLabels) { @@ -175,7 +176,7 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerEditorComponent::BuildGameEntity(AZ::Entity* gameEntity) + void RobotecGeoJSONSpawnerEditorComponent::BuildGameEntity(AZ::Entity* gameEntity) { AZ::Data::AssetInfo sourceAssetInfo; bool isSourceFound{ false }; @@ -190,24 +191,24 @@ namespace GeoJSONSpawner if (!isSourceFound) { - AZ_Error("GeoJSONSpawnerEditorComponent", false, "Cannot find asset source."); + AZ_Error("RobotecGeoJSONSpawnerEditorComponent", false, "Cannot find asset source."); return; } const AZ::IO::Path sourcePath = AZ::IO::Path(watchFolder) / AZ::IO::Path(sourceAssetInfo.m_relativePath); - AZ_Printf("GeoJSONSpawnerEditorComponent", "Source of GeoJSON file path: %s", sourcePath.c_str()); + AZ_Printf("RobotecGeoJSONSpawnerEditorComponent", "Source of GeoJSON file path: %s", sourcePath.c_str()); auto spawnableAssetConfigurationsMap = GeoJSONUtils::GetSpawnableAssetFromVector(m_spawnableAssetConfigurations); const auto featureObjectInfo = GeoJSONUtils::ParseJSONFromFile(sourcePath.c_str()); auto spawnableEntitiesInfo = GeoJSONUtils::GetSpawnableEntitiesFromFeatureObjectVector(featureObjectInfo, spawnableAssetConfigurationsMap); - gameEntity->CreateComponent( + gameEntity->CreateComponent( spawnableAssetConfigurationsMap, sourceAssetInfo.m_relativePath.c_str(), m_defaultSeed); m_spawnedTicketsGroups.clear(); } - void GeoJSONSpawnerEditorComponent::OnTerrainDataChanged( + void RobotecGeoJSONSpawnerEditorComponent::OnTerrainDataChanged( [[maybe_unused]] const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) { // Ignore on update with selected flags @@ -228,7 +229,7 @@ namespace GeoJSONSpawner } } - void GeoJSONSpawnerEditorComponent::DisplayViewport( + void RobotecGeoJSONSpawnerEditorComponent::DisplayViewport( [[maybe_unused]] const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) { AZ::Transform transform = GetEntity()->GetTransform()->GetWorldTM(); @@ -256,4 +257,4 @@ namespace GeoJSONSpawner debugDisplay.SetState(stateBefore); } -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.h similarity index 73% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.h index 58df08fb..1d527d2c 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.h @@ -10,32 +10,32 @@ #pragma once -#include "EditorConfigurations/GeoJSONSpawnerEditorTerrainSettingsConfig.h" -#include "GeoJSONSpawner/GeoJSONSpawnerTypeIds.h" -#include "GeoJSONSpawnerUtils.h" +#include "EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawnerUtils.h" #include #include #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - //! Editor component for the GeoJSONSpawner component. + //! Editor component for the RobotecGeoJSONSpawner component. //! This component is used to spawn using GeoJSON in the editor. //! It loads a GeoJSON file that contains WGS84 coordinates to spawn entities. //! It also allows the user to set configuration parameters for the GeoJSON to spawn (@see - //! GeoJSONSpawnerUtils::GeoJSONSpawnableAssetConfiguration). - class GeoJSONSpawnerEditorComponent + //! RobotecGeoJSONSpawnerUtils::GeoJSONSpawnableAssetConfiguration). + class RobotecGeoJSONSpawnerEditorComponent : public AzToolsFramework::Components::EditorComponentBase , protected AzFramework::ViewportDebugDisplayEventBus::Handler , protected AzFramework::Terrain::TerrainDataNotificationBus::Handler { public: - AZ_EDITOR_COMPONENT(GeoJSONSpawnerEditorComponent, GeoJSONSpawnerEditorComponentTypeId); + AZ_EDITOR_COMPONENT(RobotecGeoJSONSpawnerEditorComponent, RobotecGeoJSONSpawnerEditorComponentTypeId); - GeoJSONSpawnerEditorComponent() = default; - ~GeoJSONSpawnerEditorComponent() override = default; + RobotecGeoJSONSpawnerEditorComponent() = default; + ~RobotecGeoJSONSpawnerEditorComponent() override = default; static void Reflect(AZ::ReflectContext* context); @@ -64,7 +64,8 @@ namespace GeoJSONSpawner AZStd::vector m_spawnableEntityInfo; AZStd::unordered_map> m_spawnedTicketsGroups; - GeoJSONSpawnerEditorTerrainSettingsConfig m_terrainSettingsConfig; //!< Terrain Editor Settings Configuration for GeoJSONSpawner + RobotecGeoJSONSpawnerEditorTerrainSettingsConfig + m_terrainSettingsConfig; //!< Terrain Editor Settings Configuration for RobotecGeoJSONSpawner }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.cpp similarity index 91% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.cpp index 9116fc1d..e5c8b936 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.cpp +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.cpp @@ -8,9 +8,9 @@ * permission, please contact the copyright holders and delete this file. */ -#include "GeoJSONSpawnerUtils.h" -#include "GeoJSONSpawner/GeoJSONSpawnerBus.h" -#include "Schemas/GeoJSONSchema.h" +#include "RobotecGeoJSONSpawnerUtils.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h" +#include "Schemas/RobotecGeoJSONSchema.h" #include #include @@ -26,7 +26,7 @@ #include #include -namespace GeoJSONSpawner::GeoJSONUtils +namespace RobotecGeoJSONSpawner::GeoJSONUtils { void FeatureObjectInfo::Reflect(AZ::ReflectContext* context) { @@ -68,8 +68,9 @@ namespace GeoJSONSpawner::GeoJSONUtils if (AZ::EditContext* editContext = serializeContext->GetEditContext()) { - editContext->Class("GeoJSONSpawnerConfiguration", "GeoJSON Spawner Configuration") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "GeoJSONSpawnerConfiguration") + editContext + ->Class("RobotecGeoJSONSpawnerConfiguration", "GeoJSON Spawner Configuration") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "RobotecGeoJSONSpawnerConfiguration") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute(AZ::Edit::Attributes::Category, "Spawners") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) @@ -185,7 +186,7 @@ namespace GeoJSONSpawner::GeoJSONUtils { if (!spawnableAssetConfigurations.contains(entityToSpawn.m_name)) { - AZ_Error("GeoJSONSpawnerUtils", false, "Spawnable with name [%s] not found.", entityToSpawn.m_name.c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "Spawnable with name [%s] not found.", entityToSpawn.m_name.c_str()); continue; } @@ -275,8 +276,8 @@ namespace GeoJSONSpawner::GeoJSONUtils spawner->SpawnAllEntities(ticketToSpawn.first, ticketToSpawn.second); groupIdToTicketsMap.at(groupIdToSpawn.first).emplace_back(AZStd::move(ticketToSpawn.first)); - // Call GeoJSONSpawner EBus notification - Spawn - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntitySpawn, ticketToSpawn.first); + // Call RobotecGeoJSONSpawner EBus notification - Spawn + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntitySpawn, ticketToSpawn.first); } } @@ -294,8 +295,8 @@ namespace GeoJSONSpawner::GeoJSONUtils }; spawner->DespawnAllEntities(ticket, optionalArgs); - // Call GeoJSONSpawner EBus notification - Despawn - GeoJSONSpawnerNotificationBus::Broadcast(&GeoJSONSpawnerInterface::OnEntityDespawn, ticket); + // Call RobotecGeoJSONSpawner EBus notification - Despawn + RobotecGeoJSONSpawnerNotificationBus::Broadcast(&RobotecGeoJSONSpawnerInterface::OnEntityDespawn, ticket); } AZStd::unordered_map GetSpawnableAssetFromVector( @@ -316,7 +317,7 @@ namespace GeoJSONSpawner::GeoJSONUtils { if (!Georeferencing::GeoreferenceRequestsBus::HasHandlers()) { - AZ_Error("GeoJSONSpawnerUtils", false, "Cannot convert WGS84 coordinates - Level is not geographically positioned."); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "Cannot convert WGS84 coordinates - Level is not geographically positioned."); return {}; } @@ -325,7 +326,7 @@ namespace GeoJSONSpawner::GeoJSONUtils { if (!spawnableAssetConfigurations.contains(featureObjectInfo.m_name)) { - AZ_Error("GeoJSONSpawnerUtils", false, "Spawnable with name [%s] not found.", featureObjectInfo.m_name.c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "Spawnable with name [%s] not found.", featureObjectInfo.m_name.c_str()); continue; } const auto& spawnableAssetConfig = spawnableAssetConfigurations.at(featureObjectInfo.m_name); @@ -359,7 +360,7 @@ namespace GeoJSONSpawner::GeoJSONUtils rapidjson::Document schemaDocument; if (schemaDocument.Parse(GeoJSONSchema).HasParseError()) { - AZ_Error("GeoJSONSpawner", false, "Unable to parse schema."); + AZ_Error("RobotecGeoJSONSpawner", false, "Unable to parse schema."); return false; } @@ -371,7 +372,11 @@ namespace GeoJSONSpawner::GeoJSONUtils rapidjson::StringBuffer buffer; validator.GetInvalidSchemaPointer().StringifyUriFragment(buffer); AZ_Error( - "GeoJSONSpawner", false, "Invalid code: %s. Invalid key: %s.", buffer.GetString(), validator.GetInvalidSchemaKeyword()); + "RobotecGeoJSONSpawner", + false, + "Invalid code: %s. Invalid key: %s.", + buffer.GetString(), + validator.GetInvalidSchemaKeyword()); return false; } @@ -445,7 +450,7 @@ namespace GeoJSONSpawner::GeoJSONUtils } else if (geometryType == GeometryType::Unknown) { - AZ_Error("GeoJSONSpawner", false, "Unknown geometry type."); + AZ_Error("RobotecGeoJSONSpawner", false, "Unknown geometry type."); } return spawnableCoordinates; @@ -456,7 +461,7 @@ namespace GeoJSONSpawner::GeoJSONUtils AZStd::unordered_set ids; if (!ValidateGeoJSON(geoJsonDocument)) { - AZ_Error("GeoJSONSpawner", false, "Failed to validate JSON string."); + AZ_Error("RobotecGeoJSONSpawner", false, "Failed to validate JSON string."); return ids; } @@ -476,7 +481,7 @@ namespace GeoJSONSpawner::GeoJSONUtils if (!loadResult.IsSuccess()) { - AZ_Error("GeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); return {}; } @@ -489,7 +494,7 @@ namespace GeoJSONSpawner::GeoJSONUtils if (!ValidateGeoJSON(geoJsonDocument)) { - AZ_Error("GeoJSONSpawner", false, "Failed to validate JSON string."); + AZ_Error("RobotecGeoJSONSpawner", false, "Failed to validate JSON string."); return spawnableInfoContainer; } @@ -514,7 +519,7 @@ namespace GeoJSONSpawner::GeoJSONUtils AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); if (!fileIO || !fileIO->Exists(filePath.c_str())) { - AZ_Error("GeoJSONSpawnerUtils", false, "Cannot find file %s", filePath.c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "Cannot find file %s", filePath.c_str()); return {}; } @@ -522,7 +527,7 @@ namespace GeoJSONSpawner::GeoJSONUtils if (!loadResult.IsSuccess()) { - AZ_Error("GeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); return {}; } @@ -535,7 +540,7 @@ namespace GeoJSONSpawner::GeoJSONUtils if (!loadResult.IsSuccess()) { - AZ_Error("GeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); + AZ_Error("RobotecGeoJSONSpawnerUtils", false, "%s", loadResult.GetError().c_str()); return {}; } @@ -581,4 +586,4 @@ namespace GeoJSONSpawner::GeoJSONUtils return AzFramework::Terrain::TerrainDataRequestBus::HasHandlers(); } -} // namespace GeoJSONSpawner::GeoJSONUtils +} // namespace RobotecGeoJSONSpawner::GeoJSONUtils diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h similarity index 96% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h index a1abca05..7ffcdc38 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h @@ -10,14 +10,14 @@ #pragma once -#include "GeoJSONSpawner/GeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h" #include #include #include #include -namespace GeoJSONSpawner::GeoJSONUtils +namespace RobotecGeoJSONSpawner::GeoJSONUtils { using Coordinates = AZStd::vector>; using SpawnableCoordinatesMap = AZStd::unordered_map; @@ -181,7 +181,7 @@ namespace GeoJSONSpawner::GeoJSONUtils [[nodiscard]] bool IsTerrainAvailable(); /** - * @brief Flags representing the status of GeoJSONSpawner operations Spawn and Despawn. + * @brief Flags representing the status of RobotecGeoJSONSpawner operations Spawn and Despawn. * * Provides various status indicators for entity spawning / despawning. * These flags help to track or filter mentioned operations. @@ -195,8 +195,8 @@ namespace GeoJSONSpawner::GeoJSONUtils Invalid = 1 << 3, ///< Something went wrong while spawning / despawning. }; - AZ_TYPE_INFO_SPECIALIZE(GeoJSONSpawner::GeoJSONUtils::SpawnDespawnStatus, SpawnDespawnStatusTypeId); + AZ_TYPE_INFO_SPECIALIZE(RobotecGeoJSONSpawner::GeoJSONUtils::SpawnDespawnStatus, SpawnDespawnStatusTypeId); AZ_DEFINE_ENUM_BITWISE_OPERATORS(SpawnDespawnStatus); AZ_DEFINE_ENUM_RELATIONAL_OPERATORS(SpawnDespawnStatus); -} // namespace GeoJSONSpawner::GeoJSONUtils +} // namespace RobotecGeoJSONSpawner::GeoJSONUtils diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Schemas/GeoJSONSchema.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Schemas/RobotecGeoJSONSchema.h similarity index 98% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Schemas/GeoJSONSchema.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Schemas/RobotecGeoJSONSchema.h index 31412670..ac902213 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Schemas/GeoJSONSchema.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Schemas/RobotecGeoJSONSchema.h @@ -1,6 +1,6 @@ #pragma once -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { inline constexpr const char* GeoJSONSchema = R"({ "$schema": "http://json-schema.org/draft-07/schema#", @@ -136,4 +136,4 @@ namespace GeoJSONSpawner }, "required": ["type", "features"] })"; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp similarity index 89% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp index 8a42884e..9a64580e 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp @@ -1,13 +1,13 @@ #include "SpawnTicketMapWrapper.h" -namespace GeoJSONSpawner::GeoJSONWrappers +namespace RobotecGeoJSONSpawner::GeoJSONWrappers { void SpawnTicketMapWrapper::Reflect(AZ::ReflectContext* context) { if (auto behaviorContext = azrtti_cast(context)) { behaviorContext->Class("SpawnTicketMapWrapper") - ->Attribute(AZ::Script::Attributes::Category, "GeoJSONSpawner/Wrappers") + ->Attribute(AZ::Script::Attributes::Category, "RobotecGeoJSONSpawner/Wrappers") ->Method("Insert", &SpawnTicketMapWrapper::Insert) ->Method("Clear", &SpawnTicketMapWrapper::Clear) ->Method("GetKeys", &SpawnTicketMapWrapper::GetKeys) @@ -59,4 +59,4 @@ namespace GeoJSONSpawner::GeoJSONWrappers { this->m_map = m_map; } -} // namespace GeoJSONSpawner::GeoJSONWrappers +} // namespace RobotecGeoJSONSpawner::GeoJSONWrappers diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h similarity index 80% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h index 1f2730e2..2b5ad91b 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h @@ -1,18 +1,18 @@ #pragma once -#include "GeoJSONSpawner/GeoJSONSpawnerTypeIds.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h" #include #include #include #include -namespace GeoJSONSpawner::GeoJSONWrappers +namespace RobotecGeoJSONSpawner::GeoJSONWrappers { class SpawnTicketMapWrapper { public: - AZ_TYPE_INFO(SpawnTicketMapWrapper, GeoJSONSpawnerSpawnTicketMapWrapperTypeId); + AZ_TYPE_INFO(SpawnTicketMapWrapper, RobotecGeoJSONSpawnerSpawnTicketMapWrapperTypeId); AZ_CLASS_ALLOCATOR(SpawnTicketMapWrapper, AZ::SystemAllocator, 0); static void Reflect(AZ::ReflectContext* context); @@ -28,4 +28,4 @@ namespace GeoJSONSpawner::GeoJSONWrappers private: AZStd::unordered_map> m_map; }; -} // namespace GeoJSONSpawner::GeoJSONWrappers +} // namespace RobotecGeoJSONSpawner::GeoJSONWrappers diff --git a/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.cpp new file mode 100644 index 00000000..7f7601bf --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.cpp @@ -0,0 +1,42 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerModuleInterface.h" + +#include "ROS2/ROS2Bus.h" +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.h" + +#include + +#include + +#include + +namespace RobotecGeoJSONSpawner +{ + AZ_TYPE_INFO_WITH_NAME_IMPL( + RobotecGeoJSONSpawnerModuleInterface, "RobotecGeoJSONSpawnerModuleInterface", RobotecGeoJSONSpawnerModuleInterfaceTypeId); + AZ_RTTI_NO_TYPE_INFO_IMPL(RobotecGeoJSONSpawnerModuleInterface, AZ::Module); + AZ_CLASS_ALLOCATOR_IMPL(RobotecGeoJSONSpawnerModuleInterface, AZ::SystemAllocator); + + RobotecGeoJSONSpawnerModuleInterface::RobotecGeoJSONSpawnerModuleInterface() + { + m_descriptors.insert( + m_descriptors.end(), + { RobotecGeoJSONSpawnerSystemComponent::CreateDescriptor(), RobotecGeoJSONSpawnerComponent::CreateDescriptor() }); + } + + AZ::ComponentTypeList RobotecGeoJSONSpawnerModuleInterface::GetRequiredSystemComponents() const + { + return AZ::ComponentTypeList{ + azrtti_typeid(), + }; + } +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.h b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.h similarity index 74% rename from Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.h index 794bcfa3..08e15b21 100644 --- a/Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawnerModuleInterface.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/RobotecGeoJSONSpawnerModuleInterface.h @@ -13,17 +13,17 @@ #include #include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - class GeoJSONSpawnerModuleInterface : public AZ::Module + class RobotecGeoJSONSpawnerModuleInterface : public AZ::Module { public: - AZ_TYPE_INFO_WITH_NAME_DECL(GeoJSONSpawnerModuleInterface) + AZ_TYPE_INFO_WITH_NAME_DECL(RobotecGeoJSONSpawnerModuleInterface) AZ_RTTI_NO_TYPE_INFO_DECL() AZ_CLASS_ALLOCATOR_DECL - GeoJSONSpawnerModuleInterface(); + RobotecGeoJSONSpawnerModuleInterface(); AZ::ComponentTypeList GetRequiredSystemComponents() const override; }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorModule.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorModule.cpp new file mode 100644 index 00000000..5590bd7b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorModule.cpp @@ -0,0 +1,41 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.h" +#include "RobotecGeoJSONSpawnerEditorSystemComponent.h" +#include +#include + +namespace RobotecGeoJSONSpawner +{ + class RobotecGeoJSONSpawnerEditorModule : public RobotecGeoJSONSpawnerModuleInterface + { + public: + AZ_RTTI(RobotecGeoJSONSpawnerEditorModule, RobotecGeoJSONSpawnerEditorModuleTypeId, RobotecGeoJSONSpawnerModuleInterface); + AZ_CLASS_ALLOCATOR(RobotecGeoJSONSpawnerEditorModule, AZ::SystemAllocator); + + RobotecGeoJSONSpawnerEditorModule() + { + m_descriptors.insert( + m_descriptors.end(), + { RobotecGeoJSONSpawnerEditorSystemComponent::CreateDescriptor(), + RobotecGeoJSONSpawnerEditorComponent::CreateDescriptor() }); + } + + AZ::ComponentTypeList GetRequiredSystemComponents() const override + { + return AZ::ComponentTypeList{ + azrtti_typeid(), + }; + } + }; +} // namespace RobotecGeoJSONSpawner + +AZ_DECLARE_MODULE_CLASS(Gem_RobotecGeoJSONSpawner, RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerEditorModule) diff --git a/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.cpp b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.cpp new file mode 100644 index 00000000..c939880c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.cpp @@ -0,0 +1,68 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerEditorSystemComponent.h" +#include + +#include + +namespace RobotecGeoJSONSpawner +{ + AZ_COMPONENT_IMPL( + RobotecGeoJSONSpawnerEditorSystemComponent, + "RobotecGeoJSONSpawnerEditorSystemComponent", + RobotecGeoJSONSpawnerEditorSystemComponentTypeId, + BaseSystemComponent); + + void RobotecGeoJSONSpawnerEditorSystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(0); + } + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + BaseSystemComponent::GetProvidedServices(provided); + provided.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerEditorService")); + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + BaseSystemComponent::GetIncompatibleServices(incompatible); + incompatible.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerEditorService")); + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::GetRequiredServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) + { + BaseSystemComponent::GetRequiredServices(required); + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::GetDependentServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + BaseSystemComponent::GetDependentServices(dependent); + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::Activate() + { + RobotecGeoJSONSpawnerSystemComponent::Activate(); + AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); + } + + void RobotecGeoJSONSpawnerEditorSystemComponent::Deactivate() + { + AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); + RobotecGeoJSONSpawnerSystemComponent::Deactivate(); + } + +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.h b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.h similarity index 67% rename from Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.h rename to Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.h index 13115ec1..b9d6ba89 100644 --- a/Gems/GeoJSONSpawner/Code/Source/Tools/GeoJSONSpawnerEditorSystemComponent.h +++ b/Gems/RobotecGeoJSONSpawner/Code/Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.h @@ -12,24 +12,24 @@ #include -#include +#include -namespace GeoJSONSpawner +namespace RobotecGeoJSONSpawner { - /// System component for GeoJSONSpawner editor - class GeoJSONSpawnerEditorSystemComponent - : public GeoJSONSpawnerSystemComponent + /// System component for RobotecGeoJSONSpawner editor + class RobotecGeoJSONSpawnerEditorSystemComponent + : public RobotecGeoJSONSpawnerSystemComponent , protected AzToolsFramework::EditorEvents::Bus::Handler { - using BaseSystemComponent = GeoJSONSpawnerSystemComponent; + using BaseSystemComponent = RobotecGeoJSONSpawnerSystemComponent; public: - AZ_COMPONENT_DECL(GeoJSONSpawnerEditorSystemComponent); + AZ_COMPONENT_DECL(RobotecGeoJSONSpawnerEditorSystemComponent); static void Reflect(AZ::ReflectContext* context); - GeoJSONSpawnerEditorSystemComponent() = default; - ~GeoJSONSpawnerEditorSystemComponent() = default; + RobotecGeoJSONSpawnerEditorSystemComponent() = default; + ~RobotecGeoJSONSpawnerEditorSystemComponent() = default; private: static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); @@ -41,4 +41,4 @@ namespace GeoJSONSpawner void Activate() override; void Deactivate() override; }; -} // namespace GeoJSONSpawner +} // namespace RobotecGeoJSONSpawner diff --git a/Gems/GeoJSONSpawner/Code/Tests/Clients/GeoJSONSpawnerTest.cpp b/Gems/RobotecGeoJSONSpawner/Code/Tests/Clients/RobotecGeoJSONSpawnerTest.cpp similarity index 100% rename from Gems/GeoJSONSpawner/Code/Tests/Clients/GeoJSONSpawnerTest.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Tests/Clients/RobotecGeoJSONSpawnerTest.cpp diff --git a/Gems/GeoJSONSpawner/Code/Tests/Tools/GeoJSONSpawnerEditorTest.cpp b/Gems/RobotecGeoJSONSpawner/Code/Tests/Tools/RobotecGeoJSONSpawnerEditorTest.cpp similarity index 100% rename from Gems/GeoJSONSpawner/Code/Tests/Tools/GeoJSONSpawnerEditorTest.cpp rename to Gems/RobotecGeoJSONSpawner/Code/Tests/Tools/RobotecGeoJSONSpawnerEditorTest.cpp diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_api_files.cmake new file mode 100644 index 00000000..620fc10c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_api_files.cmake @@ -0,0 +1,5 @@ + +set(FILES + Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerBus.h + Include/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerTypeIds.h +) diff --git a/Gems/GeoJSONSpawner/Code/geojsonspawner_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawner/Code/geojsonspawner_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_private_files.cmake new file mode 100644 index 00000000..a0e78137 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_private_files.cmake @@ -0,0 +1,7 @@ + +set(FILES + Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.cpp + Source/Tools/RobotecGeoJSONSpawnerEditorSystemComponent.h + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.cpp + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerEditorComponent.h +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_shared_files.cmake new file mode 100644 index 00000000..fa9084d1 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_shared_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Source/Tools/RobotecGeoJSONSpawnerEditorModule.cpp +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_tests_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_tests_files.cmake new file mode 100644 index 00000000..b066ab1a --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_editor_tests_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Tests/Tools/RobotecGeoJSONSpawnerEditorTest.cpp +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_private_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_private_files.cmake new file mode 100644 index 00000000..bbfa647b --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_private_files.cmake @@ -0,0 +1,16 @@ + +set(FILES + Source/RobotecGeoJSONSpawnerModuleInterface.cpp + Source/RobotecGeoJSONSpawnerModuleInterface.h + Source/Clients/RobotecGeoJSONSpawnerSystemComponent.cpp + Source/Clients/RobotecGeoJSONSpawnerSystemComponent.h + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.cpp + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerComponent.h + Source/RobotecGeoJSONSpawner/Schemas/RobotecGeoJSONSchema.h + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.cpp + Source/RobotecGeoJSONSpawner/RobotecGeoJSONSpawnerUtils.h + Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.cpp + Source/RobotecGeoJSONSpawner/Wrappers/SpawnTicketMapWrapper.h + Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.cpp + Source/RobotecGeoJSONSpawner/EditorConfigurations/RobotecGeoJSONSpawnerEditorTerrainSettingsConfig.h +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_shared_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_shared_files.cmake new file mode 100644 index 00000000..202d1998 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_shared_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Source/Clients/RobotecGeoJSONSpawnerModule.cpp +) diff --git a/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_tests_files.cmake b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_tests_files.cmake new file mode 100644 index 00000000..8b1a61d3 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawner/Code/robotecgeojsonspawner_tests_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Tests/Clients/RobotecGeoJSONSpawnerTest.cpp +) diff --git a/Gems/GeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg b/Gems/RobotecGeoJSONSpawner/Registry/assetprocessor_settings.setreg similarity index 51% rename from Gems/GeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg rename to Gems/RobotecGeoJSONSpawner/Registry/assetprocessor_settings.setreg index d4c13db6..01cd5027 100644 --- a/Gems/GeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg +++ b/Gems/RobotecGeoJSONSpawner/Registry/assetprocessor_settings.setreg @@ -2,13 +2,13 @@ "Amazon": { "AssetProcessor": { "Settings": { - "ScanFolder GeoJSONSpawnerROS2/Assets": { - "watch": "@GEMROOT:GeoJSONSpawnerROS2@/Assets", + "ScanFolder RobotecGeoJSONSpawner/Assets": { + "watch": "@GEMROOT:RobotecGeoJSONSpawner@/Assets", "recursive": 1, "order": 101 }, - "ScanFolder GeoJSONSpawnerROS2/Registry": { - "watch": "@GEMROOT:GeoJSONSpawnerROS2@/Registry", + "ScanFolder RobotecGeoJSONSpawner/Registry": { + "watch": "@GEMROOT:RobotecGeoJSONSpawner@/Registry", "recursive": 1, "order": 102 } diff --git a/Gems/GeoJSONSpawner/gem.json b/Gems/RobotecGeoJSONSpawner/gem.json similarity index 82% rename from Gems/GeoJSONSpawner/gem.json rename to Gems/RobotecGeoJSONSpawner/gem.json index aae27ddc..6f306796 100644 --- a/Gems/GeoJSONSpawner/gem.json +++ b/Gems/RobotecGeoJSONSpawner/gem.json @@ -1,7 +1,7 @@ { - "gem_name": "GeoJSONSpawner", + "gem_name": "RobotecGeoJSONSpawner", "version": "2.0.0", - "display_name": "GeoJSONSpawner", + "display_name": "RobotecGeoJSONSpawner", "license": "Apache-2.0", "license_url": "https://opensource.org/licenses/Apache-2.0", "origin": "Robotec.ai", @@ -12,7 +12,7 @@ "Gem" ], "user_tags": [ - "GeoJSONSpawner" + "RobotecGeoJSONSpawner" ], "platforms": [ "" @@ -26,5 +26,5 @@ "repo_uri": "https://github.com/RobotecAI/robotec-o3de-tools", "compatible_engines": [], "engine_api_dependencies": [], - "restricted": "GeoJSONSpawner" + "restricted": "RobotecGeoJSONSpawner" } diff --git a/Gems/GeoJSONSpawner/preview.png b/Gems/RobotecGeoJSONSpawner/preview.png similarity index 100% rename from Gems/GeoJSONSpawner/preview.png rename to Gems/RobotecGeoJSONSpawner/preview.png diff --git a/Gems/GeoJSONSpawnerROS2/CMakeLists.txt b/Gems/RobotecGeoJSONSpawnerROS2/CMakeLists.txt similarity index 67% rename from Gems/GeoJSONSpawnerROS2/CMakeLists.txt rename to Gems/RobotecGeoJSONSpawnerROS2/CMakeLists.txt index 1782639a..eabc4596 100644 --- a/Gems/GeoJSONSpawnerROS2/CMakeLists.txt +++ b/Gems/RobotecGeoJSONSpawnerROS2/CMakeLists.txt @@ -1,5 +1,5 @@ -o3de_gem_setup("GeoJSONSpawnerROS2") +o3de_gem_setup("RobotecGeoJSONSpawnerROS2") ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty) diff --git a/Gems/GeoJSONSpawnerROS2/Code/CMakeLists.txt b/Gems/RobotecGeoJSONSpawnerROS2/Code/CMakeLists.txt similarity index 86% rename from Gems/GeoJSONSpawnerROS2/Code/CMakeLists.txt rename to Gems/RobotecGeoJSONSpawnerROS2/Code/CMakeLists.txt index fe9600f0..704705a5 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/CMakeLists.txt +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/CMakeLists.txt @@ -3,8 +3,8 @@ # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} # Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. -# i.e. It could here in our gem : Gems/GeoJSONSpawnerROS2/Code/Platform/ or -# //Gems/GeoJSONSpawnerROS2/Code +# i.e. It could here in our gem : Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/ or +# //Gems/RobotecGeoJSONSpawnerROS2/Code o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}") # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the @@ -13,7 +13,7 @@ o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${ include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # Check to see if building the Gem Modules are supported for the current platform -if(NOT PAL_TRAIT_GEOJSONSPAWNERROS2_SUPPORTED) +if(NOT PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED) return() endif() @@ -22,8 +22,8 @@ ly_add_target( NAME ${gem_name}.API INTERFACE NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_api_files.cmake - ${pal_dir}/geojsonspawnerros2_api_files.cmake + robotecgeojsonspawnerros2_api_files.cmake + ${pal_dir}/robotecgeojsonspawnerros2_api_files.cmake INCLUDE_DIRECTORIES INTERFACE Include @@ -38,8 +38,8 @@ ly_add_target( NAME ${gem_name}.Private.Object STATIC NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_private_files.cmake - ${pal_dir}/geojsonspawnerros2_private_files.cmake + robotecgeojsonspawnerros2_private_files.cmake + ${pal_dir}/robotecgeojsonspawnerros2_private_files.cmake TARGET_PROPERTIES O3DE_PRIVATE_TARGET TRUE INCLUDE_DIRECTORIES @@ -51,7 +51,7 @@ ly_add_target( AZ::AzCore AZ::AzFramework PRIVATE - Gem::GeoJSONSpawner.API + Gem::RobotecGeoJSONSpawner.API Gem::ROS2.Static ) @@ -60,8 +60,8 @@ ly_add_target( NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_shared_files.cmake - ${pal_dir}/geojsonspawnerros2_shared_files.cmake + robotecgeojsonspawnerros2_shared_files.cmake + ${pal_dir}/robotecgeojsonspawnerros2_shared_files.cmake INCLUDE_DIRECTORIES PUBLIC Include @@ -83,7 +83,7 @@ target_depends_on_ros2_packages(${gem_name}.Private.Object std_msgs std_srvs) # is used to bootstrap the gem in monolithic builds to link to the new gem name ly_add_source_properties( SOURCES - Source/Clients/GeoJSONSpawnerROS2Module.cpp + Source/Clients/RobotecGeoJSONSpawnerROS2Module.cpp PROPERTY COMPILE_DEFINITIONS VALUES O3DE_GEM_NAME=${gem_name} @@ -112,8 +112,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAME ${gem_name}.Editor.API INTERFACE NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_editor_api_files.cmake - ${pal_dir}/geojsonspawnerros2_editor_api_files.cmake + robotecgeojsonspawnerros2_editor_api_files.cmake + ${pal_dir}/robotecgeojsonspawnerros2_editor_api_files.cmake INCLUDE_DIRECTORIES INTERFACE Include @@ -129,7 +129,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAME ${gem_name}.Editor.Private.Object STATIC NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_editor_private_files.cmake + robotecgeojsonspawnerros2_editor_private_files.cmake TARGET_PROPERTIES O3DE_PRIVATE_TARGET TRUE INCLUDE_DIRECTORIES @@ -141,7 +141,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) AZ::AzToolsFramework ${gem_name}.Private.Object Gem::ROS2.Editor.Static - Gem::GeoJSONSpawner.API + Gem::RobotecGeoJSONSpawner.API ) ly_add_target( @@ -149,7 +149,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) NAMESPACE Gem AUTOMOC FILES_CMAKE - geojsonspawnerros2_editor_shared_files.cmake + robotecgeojsonspawnerros2_editor_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE Source @@ -161,7 +161,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) PRIVATE Gem::${gem_name}.Editor.Private.Object Gem::ROS2.Editor.Static - Gem::GeoJSONSpawner.API + Gem::RobotecGeoJSONSpawner.API ) # Include the gem name into the Editor Module source file @@ -171,7 +171,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) # is used to bootstrap the gem in monolithic builds to link to the new gem name ly_add_source_properties( SOURCES - Source/Tools/GeoJSONSpawnerROS2EditorModule.cpp + Source/Tools/RobotecGeoJSONSpawnerROS2EditorModule.cpp PROPERTY COMPILE_DEFINITIONS VALUES O3DE_GEM_NAME=${gem_name} @@ -198,13 +198,13 @@ endif() # See if globally, tests are supported if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests - if(PAL_TRAIT_GEOJSONSPAWNERROS2_TEST_SUPPORTED) + if(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED) # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target ly_add_target( NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_tests_files.cmake + robotecgeojsonspawnerros2_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE Tests @@ -226,14 +226,14 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) # If we are a host platform we want to add tools test like editor tests here if(PAL_TRAIT_BUILD_HOST_TOOLS) # We are a host platform, see if Editor tests are supported on this platform - if(PAL_TRAIT_GEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED) + if(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED) # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on # private ${gem_name}.Editor.Private.Object target ly_add_target( NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem FILES_CMAKE - geojsonspawnerros2_editor_tests_files.cmake + robotecgeojsonspawnerros2_editor_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE Tests diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Include/RobotecGeoJSONSpawnerROS2/RobotecGeoJSONSpawnerROS2TypeIds.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Include/RobotecGeoJSONSpawnerROS2/RobotecGeoJSONSpawnerROS2TypeIds.h new file mode 100644 index 00000000..a69f6dd7 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Include/RobotecGeoJSONSpawnerROS2/RobotecGeoJSONSpawnerROS2TypeIds.h @@ -0,0 +1,37 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#pragma once + +namespace RobotecGeoJSONSpawnerROS2 +{ + // System Component TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2SystemComponentTypeId = "{715CB9C6-1EFD-469D-B7DC-72D097E1FBE9}"; + inline constexpr const char* RobotecGeoJSONSpawnerROS2EditorSystemComponentTypeId = "{F56F94B4-D27B-4466-9794-3ECC2D35F5E9}"; + + // Module derived classes TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2ModuleInterfaceTypeId = "{F8EFEBC9-E997-4830-A035-AF7A201F42A9}"; + inline constexpr const char* RobotecGeoJSONSpawnerROS2ModuleTypeId = "{4F1BA299-BF1E-4810-B636-4896CC2842E8}"; + // The Editor Module by default is mutually exclusive with the Client Module + // so they use the Same TypeId + inline constexpr const char* RobotecGeoJSONSpawnerROS2EditorModuleTypeId = RobotecGeoJSONSpawnerROS2ModuleTypeId; + + // Editor Components TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2EditorComponentTypeId = "{e73adfb4-d45e-49de-a863-b20877300e99}"; + + // Configurations TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2ConfigurationTypeId = "{a023282f-5ec5-4af1-902d-74772f024339}"; + + // Components TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2TypeId = "{a302588e-10c5-443b-a9ec-5edc33c56ef2}"; + + // Interface TypeIds + inline constexpr const char* RobotecGeoJSONSpawnerROS2RequestsTypeId = "{636D9D5F-7EA7-47CA-902E-7DE5003A7FC7}"; +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake new file mode 100644 index 00000000..9f7d41ff --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/PAL_android.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Android/geojsonspawnerros2_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..4ed4a4f7 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Android +# i.e. ../Source/Android/RobotecGeoJSONSpawnerROS2Android.cpp +# ../Source/Android/RobotecGeoJSONSpawnerROS2Android.h +# ../Include/Android/RobotecGeoJSONSpawnerROS2Android.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..4ed4a4f7 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Android/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Android +# i.e. ../Source/Android/RobotecGeoJSONSpawnerROS2Android.cpp +# ../Source/Android/RobotecGeoJSONSpawnerROS2Android.h +# ../Include/Android/RobotecGeoJSONSpawnerROS2Android.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake new file mode 100644 index 00000000..9f7d41ff --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/PAL_linux.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_api_files.cmake diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Linux/geojsonspawnerros2_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..f642ff41 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Linux +# i.e. ../Source/Linux/RobotecGeoJSONSpawnerROS2Linux.cpp +# ../Source/Linux/RobotecGeoJSONSpawnerROS2Linux.h +# ../Include/Linux/RobotecGeoJSONSpawnerROS2Linux.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..f642ff41 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Linux/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Linux +# i.e. ../Source/Linux/RobotecGeoJSONSpawnerROS2Linux.cpp +# ../Source/Linux/RobotecGeoJSONSpawnerROS2Linux.h +# ../Include/Linux/RobotecGeoJSONSpawnerROS2Linux.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake new file mode 100644 index 00000000..9f7d41ff --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/PAL_mac.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_api_files.cmake diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Mac/geojsonspawnerros2_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..7663d1aa --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Mac +# i.e. ../Source/Mac/RobotecGeoJSONSpawnerROS2Mac.cpp +# ../Source/Mac/RobotecGeoJSONSpawnerROS2Mac.h +# ../Include/Mac/RobotecGeoJSONSpawnerROS2Mac.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..7663d1aa --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Mac/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Mac +# i.e. ../Source/Mac/RobotecGeoJSONSpawnerROS2Mac.cpp +# ../Source/Mac/RobotecGeoJSONSpawnerROS2Mac.h +# ../Include/Mac/RobotecGeoJSONSpawnerROS2Mac.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake new file mode 100644 index 00000000..9f7d41ff --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/PAL_windows.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_api_files.cmake diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/Windows/geojsonspawnerros2_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..c32c5255 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Windows +# i.e. ../Source/Windows/RobotecGeoJSONSpawnerROS2Windows.cpp +# ../Source/Windows/RobotecGeoJSONSpawnerROS2Windows.h +# ../Include/Windows/RobotecGeoJSONSpawnerROS2Windows.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..c32c5255 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/Windows/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for Windows +# i.e. ../Source/Windows/RobotecGeoJSONSpawnerROS2Windows.cpp +# ../Source/Windows/RobotecGeoJSONSpawnerROS2Windows.h +# ../Include/Windows/RobotecGeoJSONSpawnerROS2Windows.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake new file mode 100644 index 00000000..9f7d41ff --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/PAL_ios.cmake @@ -0,0 +1,4 @@ + +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_SUPPORTED TRUE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_TEST_SUPPORTED FALSE) +set(PAL_TRAIT_ROBOTECGEOJSONSPAWNERROS2_EDITOR_TEST_SUPPORTED FALSE) diff --git a/Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Platform/iOS/geojsonspawnerros2_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..4417af18 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for iOS +# i.e. ../Source/iOS/RobotecGeoJSONSpawnerROS2iOS.cpp +# ../Source/iOS/RobotecGeoJSONSpawnerROS2iOS.h +# ../Include/iOS/RobotecGeoJSONSpawnerROS2iOS.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..4417af18 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Platform/iOS/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,8 @@ + +# Platform specific files for iOS +# i.e. ../Source/iOS/RobotecGeoJSONSpawnerROS2iOS.cpp +# ../Source/iOS/RobotecGeoJSONSpawnerROS2iOS.h +# ../Include/iOS/RobotecGeoJSONSpawnerROS2iOS.h + +set(FILES +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2Module.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2Module.cpp new file mode 100644 index 00000000..797bfeb9 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2Module.cpp @@ -0,0 +1,25 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2SystemComponent.h" +#include +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + class RobotecGeoJSONSpawnerROS2Module : public RobotecGeoJSONSpawnerROS2ModuleInterface + { + public: + AZ_RTTI(RobotecGeoJSONSpawnerROS2Module, RobotecGeoJSONSpawnerROS2ModuleTypeId, RobotecGeoJSONSpawnerROS2ModuleInterface); + AZ_CLASS_ALLOCATOR(RobotecGeoJSONSpawnerROS2Module, AZ::SystemAllocator); + }; +} // namespace RobotecGeoJSONSpawnerROS2 + +AZ_DECLARE_MODULE_CLASS(Gem_RobotecGeoJSONSpawnerROS2, RobotecGeoJSONSpawnerROS2::RobotecGeoJSONSpawnerROS2Module) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.cpp new file mode 100644 index 00000000..d766b2d2 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.cpp @@ -0,0 +1,64 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2SystemComponent.h" + +#include + +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + AZ_COMPONENT_IMPL( + RobotecGeoJSONSpawnerROS2SystemComponent, + "RobotecGeoJSONSpawnerROS2SystemComponent", + RobotecGeoJSONSpawnerROS2SystemComponentTypeId); + + void RobotecGeoJSONSpawnerROS2SystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(0); + } + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2Service")); + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2Service")); + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::GetRequiredServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) + { + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::GetDependentServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::Init() + { + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::Activate() + { + } + + void RobotecGeoJSONSpawnerROS2SystemComponent::Deactivate() + { + } + +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.h similarity index 79% rename from Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.h rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.h index 9b747df2..055beb4d 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Clients/GeoJSONSpawnerROS2SystemComponent.h +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.h @@ -13,12 +13,12 @@ #include #include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { - class GeoJSONSpawnerROS2SystemComponent : public AZ::Component + class RobotecGeoJSONSpawnerROS2SystemComponent : public AZ::Component { public: - AZ_COMPONENT_DECL(GeoJSONSpawnerROS2SystemComponent); + AZ_COMPONENT_DECL(RobotecGeoJSONSpawnerROS2SystemComponent); static void Reflect(AZ::ReflectContext* context); @@ -27,8 +27,8 @@ namespace GeoJSONSpawnerROS2 static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); - GeoJSONSpawnerROS2SystemComponent() = default; - ~GeoJSONSpawnerROS2SystemComponent() = default; + RobotecGeoJSONSpawnerROS2SystemComponent() = default; + ~RobotecGeoJSONSpawnerROS2SystemComponent() = default; protected: //////////////////////////////////////////////////////////////////////// @@ -39,4 +39,4 @@ namespace GeoJSONSpawnerROS2 //////////////////////////////////////////////////////////////////////// }; -} // namespace GeoJSONSpawnerROS2 +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.cpp similarity index 62% rename from Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.cpp rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.cpp index 7bd95bf4..85db7db8 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.cpp +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.cpp @@ -8,19 +8,19 @@ * permission, please contact the copyright holders and delete this file. */ -#include "GeoJSONSpawnerROS2.h" +#include "RobotecGeoJSONSpawnerROS2.h" #include #include #include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { inline constexpr const char* stringMessageType = "std_msgs::msg::String"; inline constexpr const char* emptyMessageType = "std_msgs::msg::Empty"; inline constexpr const char* int32MultiArrayMessageType = "std_msgs::msg::Int32MultiArray"; - GeoJSONSpawnerROS2Configuration::GeoJSONSpawnerROS2Configuration() + RobotecGeoJSONSpawnerROS2Configuration::RobotecGeoJSONSpawnerROS2Configuration() { m_spawnWithRawStringTopicConfiguration.m_topic = "geojson/spawn_with_raw_string"; m_spawnWithRawStringTopicConfiguration.m_type = stringMessageType; @@ -38,75 +38,80 @@ namespace GeoJSONSpawnerROS2 m_deleteAllTopicConfiguration.m_type = emptyMessageType; } - void GeoJSONSpawnerROS2Configuration::Reflect(AZ::ReflectContext* context) + void RobotecGeoJSONSpawnerROS2Configuration::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serialize = azrtti_cast(context)) { - serialize->Class() + serialize->Class() ->Version(0) - ->Field("GetIdsServiceTopicName", &GeoJSONSpawnerROS2Configuration::m_getIdsServiceTopicName) - ->Field("SpawnWithRawStringTopicConfiguration", &GeoJSONSpawnerROS2Configuration::m_spawnWithRawStringTopicConfiguration) - ->Field("SpawnWithAssetPathTopicConfiguration", &GeoJSONSpawnerROS2Configuration::m_spawnWithAssetPathTopicConfiguration) - ->Field("ModifyTopicConfiguration", &GeoJSONSpawnerROS2Configuration::m_modifyTopicConfiguration) - ->Field("DeleteAllTopicConfiguration", &GeoJSONSpawnerROS2Configuration::m_deleteAllTopicConfiguration) - ->Field("DeleteByIdTopicConfiguration", &GeoJSONSpawnerROS2Configuration::m_deleteByIdTopicConfiguration); + ->Field("GetIdsServiceTopicName", &RobotecGeoJSONSpawnerROS2Configuration::m_getIdsServiceTopicName) + ->Field( + "SpawnWithRawStringTopicConfiguration", &RobotecGeoJSONSpawnerROS2Configuration::m_spawnWithRawStringTopicConfiguration) + ->Field( + "SpawnWithAssetPathTopicConfiguration", &RobotecGeoJSONSpawnerROS2Configuration::m_spawnWithAssetPathTopicConfiguration) + ->Field("ModifyTopicConfiguration", &RobotecGeoJSONSpawnerROS2Configuration::m_modifyTopicConfiguration) + ->Field("DeleteAllTopicConfiguration", &RobotecGeoJSONSpawnerROS2Configuration::m_deleteAllTopicConfiguration) + ->Field("DeleteByIdTopicConfiguration", &RobotecGeoJSONSpawnerROS2Configuration::m_deleteByIdTopicConfiguration); if (AZ::EditContext* editContext = serialize->GetEditContext()) { - editContext->Class("GeoJSONSpawnerROS2Configuration", "GeoJSONSpawnerROS2Configuration") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "GeoJSONSpawnerROS2Configuration") + editContext + ->Class( + "RobotecGeoJSONSpawnerROS2Configuration", "RobotecGeoJSONSpawnerROS2Configuration") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "RobotecGeoJSONSpawnerROS2Configuration") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game")) ->Attribute(AZ::Edit::Attributes::Category, "Spawners") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_getIdsServiceTopicName, + &RobotecGeoJSONSpawnerROS2Configuration::m_getIdsServiceTopicName, "Get Ids Service Name", "The name of the get ids service.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_spawnWithRawStringTopicConfiguration, + &RobotecGeoJSONSpawnerROS2Configuration::m_spawnWithRawStringTopicConfiguration, "Spawn with raw string Topic Configuration", "The spawn with raw string topic configuration.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_spawnWithAssetPathTopicConfiguration, + &RobotecGeoJSONSpawnerROS2Configuration::m_spawnWithAssetPathTopicConfiguration, "Spawn with asset path Topic Configuration", "The spawn with asset path topic configuration.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_modifyTopicConfiguration, + &RobotecGeoJSONSpawnerROS2Configuration::m_modifyTopicConfiguration, "Modify Topic Configuration", "The modify topic configuration.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_deleteAllTopicConfiguration, + &RobotecGeoJSONSpawnerROS2Configuration::m_deleteAllTopicConfiguration, "Delete All Topic Configuration", "The delete all enitities topic configuration.") ->DataElement( AZ::Edit::UIHandlers::Default, - &GeoJSONSpawnerROS2Configuration::m_deleteByIdTopicConfiguration, + &RobotecGeoJSONSpawnerROS2Configuration::m_deleteByIdTopicConfiguration, "Delete By Id Topic Configuration", "The delete group of entities by id topic configuration."); } } } - GeoJSONSpawnerROS2::GeoJSONSpawnerROS2(const GeoJSONSpawnerROS2Configuration& configuration) + RobotecGeoJSONSpawnerROS2::RobotecGeoJSONSpawnerROS2(const RobotecGeoJSONSpawnerROS2Configuration& configuration) : m_configuration(configuration) { } - void GeoJSONSpawnerROS2::Reflect(AZ::ReflectContext* context) + void RobotecGeoJSONSpawnerROS2::Reflect(AZ::ReflectContext* context) { - GeoJSONSpawnerROS2Configuration::Reflect(context); + RobotecGeoJSONSpawnerROS2Configuration::Reflect(context); if (AZ::SerializeContext* serialize = azrtti_cast(context)) { - serialize->Class()->Version(0)->Field("Configuration", &GeoJSONSpawnerROS2::m_configuration); + serialize->Class()->Version(0)->Field( + "Configuration", &RobotecGeoJSONSpawnerROS2::m_configuration); } } - void GeoJSONSpawnerROS2::Activate() + void RobotecGeoJSONSpawnerROS2::Activate() { auto ros2Frame = GetEntity()->FindComponent(); AZ_Assert(ros2Frame, "Unable to get pointer to ROS 2 frame component."); @@ -198,7 +203,7 @@ namespace GeoJSONSpawnerROS2 } } - void GeoJSONSpawnerROS2::Deactivate() + void RobotecGeoJSONSpawnerROS2::Deactivate() { if (m_spawnWithRawStringSubscription) { @@ -231,52 +236,54 @@ namespace GeoJSONSpawnerROS2 } } - void GeoJSONSpawnerROS2::ProcessSpawnWithRawStringMessage(const StringMsg& message) + void RobotecGeoJSONSpawnerROS2::ProcessSpawnWithRawStringMessage(const StringMsg& message) { - GeoJSONSpawner::Result result; - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult( - result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::SpawnWithRawString, message.data.c_str()); - AZ_Error("GeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); + RobotecGeoJSONSpawner::Result result; + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::SpawnWithRawString, message.data.c_str()); + AZ_Error("RobotecGeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); } - void GeoJSONSpawnerROS2::ProcessSpawnWithAssetPathMessage(const StringMsg& message) + void RobotecGeoJSONSpawnerROS2::ProcessSpawnWithAssetPathMessage(const StringMsg& message) { - GeoJSONSpawner::Result result; - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult( - result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::SpawnWithAssetPath, message.data.c_str()); - AZ_Error("GeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); + RobotecGeoJSONSpawner::Result result; + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::SpawnWithAssetPath, message.data.c_str()); + AZ_Error("RobotecGeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); } - void GeoJSONSpawnerROS2::ProcessModifyMessage(const StringMsg& message) + void RobotecGeoJSONSpawnerROS2::ProcessModifyMessage(const StringMsg& message) { - GeoJSONSpawner::Result result; - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult( - result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::Modify, message.data.c_str()); - AZ_Error("GeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); + RobotecGeoJSONSpawner::Result result; + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::Modify, message.data.c_str()); + AZ_Error("RobotecGeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); } - void GeoJSONSpawnerROS2::ProcessDeleteAllMessage() + void RobotecGeoJSONSpawnerROS2::ProcessDeleteAllMessage() { - GeoJSONSpawner::Result result; - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult(result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::DeleteAll); - AZ_Error("GeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); + RobotecGeoJSONSpawner::Result result; + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::DeleteAll); + AZ_Error("RobotecGeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); } - void GeoJSONSpawnerROS2::ProcessDeleteByIdMessage(const Int32MultiArrayMsg& message) + void RobotecGeoJSONSpawnerROS2::ProcessDeleteByIdMessage(const Int32MultiArrayMsg& message) { - GeoJSONSpawner::Result result; + RobotecGeoJSONSpawner::Result result; AZStd::unordered_set idsToDelete; AZStd::copy(message.data.begin(), message.data.end(), AZStd::inserter(idsToDelete, idsToDelete.end())); - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult( - result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::DeleteById, idsToDelete); - AZ_Error("GeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::DeleteById, idsToDelete); + AZ_Error("RobotecGeoJSONSpawnerROS2", result.IsSuccess(), result.GetError().c_str()); } - GeoJSONSpawner::GetIdsResult GeoJSONSpawnerROS2::GetIds() + RobotecGeoJSONSpawner::GetIdsResult RobotecGeoJSONSpawnerROS2::GetIds() { - GeoJSONSpawner::GetIdsResult result; - GeoJSONSpawner::GeoJSONSpawnerRequestBus::BroadcastResult(result, &GeoJSONSpawner::GeoJSONSpawnerRequestBus::Events::GetIds); + RobotecGeoJSONSpawner::GetIdsResult result; + RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::BroadcastResult( + result, &RobotecGeoJSONSpawner::RobotecGeoJSONSpawnerRequestBus::Events::GetIds); return result; } -} // namespace GeoJSONSpawnerROS2 \ No newline at end of file +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.h similarity index 72% rename from Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.h rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.h index 2cecf678..08a6b752 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2.h +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2.h @@ -10,13 +10,13 @@ #pragma once -#include +#include #include #include #include -#include #include +#include #include #include #include @@ -24,13 +24,13 @@ #include #include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { - struct GeoJSONSpawnerROS2Configuration + struct RobotecGeoJSONSpawnerROS2Configuration { - AZ_TYPE_INFO(GeoJSONSpawnerROS2Configuration, GeoJSONSpawnerROS2ConfigurationTypeId); - GeoJSONSpawnerROS2Configuration(); - ~GeoJSONSpawnerROS2Configuration() = default; + AZ_TYPE_INFO(RobotecGeoJSONSpawnerROS2Configuration, RobotecGeoJSONSpawnerROS2ConfigurationTypeId); + RobotecGeoJSONSpawnerROS2Configuration(); + ~RobotecGeoJSONSpawnerROS2Configuration() = default; static void Reflect(AZ::ReflectContext* context); ROS2::TopicConfiguration m_spawnWithRawStringTopicConfiguration; @@ -41,14 +41,14 @@ namespace GeoJSONSpawnerROS2 AZStd::string m_getIdsServiceTopicName{ "geojson/get_spawned_groups_ids" }; }; - class GeoJSONSpawnerROS2 : public AZ::Component + class RobotecGeoJSONSpawnerROS2 : public AZ::Component { public: - AZ_COMPONENT(GeoJSONSpawnerROS2, GeoJSONSpawnerROS2TypeId); + AZ_COMPONENT(RobotecGeoJSONSpawnerROS2, RobotecGeoJSONSpawnerROS2TypeId); - GeoJSONSpawnerROS2() = default; - GeoJSONSpawnerROS2(const GeoJSONSpawnerROS2Configuration& configuration); - ~GeoJSONSpawnerROS2() = default; + RobotecGeoJSONSpawnerROS2() = default; + RobotecGeoJSONSpawnerROS2(const RobotecGeoJSONSpawnerROS2Configuration& configuration); + ~RobotecGeoJSONSpawnerROS2() = default; static void Reflect(AZ::ReflectContext* context); @@ -65,9 +65,9 @@ namespace GeoJSONSpawnerROS2 void ProcessModifyMessage(const StringMsg& message); void ProcessDeleteAllMessage(); void ProcessDeleteByIdMessage(const Int32MultiArrayMsg& message); - GeoJSONSpawner::GetIdsResult GetIds(); + RobotecGeoJSONSpawner::GetIdsResult GetIds(); - GeoJSONSpawnerROS2Configuration m_configuration; + RobotecGeoJSONSpawnerROS2Configuration m_configuration; rclcpp::Subscription::SharedPtr m_spawnWithRawStringSubscription; rclcpp::Subscription::SharedPtr m_spawnWithAssetPathSubscription; @@ -78,4 +78,4 @@ namespace GeoJSONSpawnerROS2 rclcpp::Service::SharedPtr m_getIdsService; }; -} // namespace GeoJSONSpawnerROS2 +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.cpp new file mode 100644 index 00000000..51a36755 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.cpp @@ -0,0 +1,62 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2EditorComponent.h" + +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + void RobotecGeoJSONSpawnerROS2EditorComponent::Reflect(AZ::ReflectContext* context) + { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0) + ->Field("Configuration", &RobotecGeoJSONSpawnerROS2EditorComponent::m_configuration); + + if (AZ::EditContext* editContext = serialize->GetEditContext()) + { + editContext + ->Class( + "RobotecGeoJSONSpawnerROS2EditorComponent", "RobotecGeoJSONSpawnerROS2EditorComponent") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "RobotecGeoJSONSpawnerROS2EditorComponent") + ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) + ->Attribute(AZ::Edit::Attributes::Category, "Spawners") + ->DataElement( + AZ::Edit::UIHandlers::Default, + &RobotecGeoJSONSpawnerROS2EditorComponent::m_configuration, + "Configuration", + "Configuration of the spawner's ROS2 interface."); + } + } + } + + void RobotecGeoJSONSpawnerROS2EditorComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2")); + } + + void RobotecGeoJSONSpawnerROS2EditorComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2")); + } + + void RobotecGeoJSONSpawnerROS2EditorComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) + { + required.push_back(AZ_CRC_CE("ROS2Frame")); + } + + void RobotecGeoJSONSpawnerROS2EditorComponent::BuildGameEntity(AZ::Entity* gameEntity) + { + gameEntity->CreateComponent(m_configuration); + } + +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.h similarity index 60% rename from Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.h rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.h index b28a5184..b813c3db 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/ROS2/GeoJSONSpawnerROS2EditorComponent.h +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.h @@ -10,17 +10,18 @@ #pragma once -#include "GeoJSONSpawnerROS2.h" -#include +#include "RobotecGeoJSONSpawnerROS2.h" +#include #include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { - class GeoJSONSpawnerROS2EditorComponent : public AzToolsFramework::Components::EditorComponentBase + class RobotecGeoJSONSpawnerROS2EditorComponent : public AzToolsFramework::Components::EditorComponentBase { public: - AZ_EDITOR_COMPONENT(GeoJSONSpawnerROS2EditorComponent, ::GeoJSONSpawnerROS2::GeoJSONSpawnerROS2EditorComponentTypeId); + AZ_EDITOR_COMPONENT( + RobotecGeoJSONSpawnerROS2EditorComponent, ::RobotecGeoJSONSpawnerROS2::RobotecGeoJSONSpawnerROS2EditorComponentTypeId); static void Reflect(AZ::ReflectContext* context); @@ -28,13 +29,13 @@ namespace GeoJSONSpawnerROS2 static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); - GeoJSONSpawnerROS2EditorComponent() = default; - ~GeoJSONSpawnerROS2EditorComponent() = default; + RobotecGeoJSONSpawnerROS2EditorComponent() = default; + ~RobotecGeoJSONSpawnerROS2EditorComponent() = default; void BuildGameEntity(AZ::Entity* gameEntity) override; private: - GeoJSONSpawnerROS2Configuration m_configuration; + RobotecGeoJSONSpawnerROS2Configuration m_configuration; }; -} // namespace GeoJSONSpawnerROS2 +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.cpp new file mode 100644 index 00000000..2c55b20e --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.cpp @@ -0,0 +1,41 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2ModuleInterface.h" +#include + +#include + +#include +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + AZ_TYPE_INFO_WITH_NAME_IMPL( + RobotecGeoJSONSpawnerROS2ModuleInterface, + "RobotecGeoJSONSpawnerROS2ModuleInterface", + RobotecGeoJSONSpawnerROS2ModuleInterfaceTypeId); + AZ_RTTI_NO_TYPE_INFO_IMPL(RobotecGeoJSONSpawnerROS2ModuleInterface, AZ::Module); + AZ_CLASS_ALLOCATOR_IMPL(RobotecGeoJSONSpawnerROS2ModuleInterface, AZ::SystemAllocator); + + RobotecGeoJSONSpawnerROS2ModuleInterface::RobotecGeoJSONSpawnerROS2ModuleInterface() + { + m_descriptors.insert( + m_descriptors.end(), + { RobotecGeoJSONSpawnerROS2SystemComponent::CreateDescriptor(), RobotecGeoJSONSpawnerROS2::CreateDescriptor() }); + } + + AZ::ComponentTypeList RobotecGeoJSONSpawnerROS2ModuleInterface::GetRequiredSystemComponents() const + { + return AZ::ComponentTypeList{ + azrtti_typeid(), + }; + } +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.h similarity index 73% rename from Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.h rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.h index 16e9110e..f3d18dd0 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/GeoJSONSpawnerROS2ModuleInterface.h +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/RobotecGeoJSONSpawnerROS2ModuleInterface.h @@ -13,17 +13,17 @@ #include #include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { - class GeoJSONSpawnerROS2ModuleInterface : public AZ::Module + class RobotecGeoJSONSpawnerROS2ModuleInterface : public AZ::Module { public: - AZ_TYPE_INFO_WITH_NAME_DECL(GeoJSONSpawnerROS2ModuleInterface) + AZ_TYPE_INFO_WITH_NAME_DECL(RobotecGeoJSONSpawnerROS2ModuleInterface) AZ_RTTI_NO_TYPE_INFO_DECL() AZ_CLASS_ALLOCATOR_DECL - GeoJSONSpawnerROS2ModuleInterface(); + RobotecGeoJSONSpawnerROS2ModuleInterface(); AZ::ComponentTypeList GetRequiredSystemComponents() const override; }; -} // namespace GeoJSONSpawnerROS2 +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorModule.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorModule.cpp new file mode 100644 index 00000000..ac37b15c --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorModule.cpp @@ -0,0 +1,46 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2EditorSystemComponent.h" +#include +#include +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + class RobotecGeoJSONSpawnerROS2EditorModule : public RobotecGeoJSONSpawnerROS2ModuleInterface + { + public: + AZ_RTTI( + RobotecGeoJSONSpawnerROS2EditorModule, RobotecGeoJSONSpawnerROS2EditorModuleTypeId, RobotecGeoJSONSpawnerROS2ModuleInterface); + AZ_CLASS_ALLOCATOR(RobotecGeoJSONSpawnerROS2EditorModule, AZ::SystemAllocator); + + RobotecGeoJSONSpawnerROS2EditorModule() + { + m_descriptors.insert( + m_descriptors.end(), + { RobotecGeoJSONSpawnerROS2EditorSystemComponent::CreateDescriptor(), + RobotecGeoJSONSpawnerROS2EditorComponent::CreateDescriptor() }); + } + + AZ::ComponentTypeList GetRequiredSystemComponents() const override + { + return AZ::ComponentTypeList{ + azrtti_typeid(), + }; + } + }; +} // namespace RobotecGeoJSONSpawnerROS2 + +#if defined(O3DE_GEM_NAME) +AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), RobotecGeoJSONSpawnerROS2::RobotecGeoJSONSpawnerROS2EditorModule) +#else +AZ_DECLARE_MODULE_CLASS(Gem_RobotecGeoJSONSpawnerROS2_Editor, RobotecGeoJSONSpawnerROS2::RobotecGeoJSONSpawnerROS2EditorModule) +#endif diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.cpp new file mode 100644 index 00000000..d7dad753 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.cpp @@ -0,0 +1,72 @@ +/** + * Copyright (C) Robotec AI - All Rights Reserved + * + * This source code is protected under international copyright law. All rights + * reserved and protected by the copyright holders. + * This file is confidential and only available to authorized individuals with the + * permission of the copyright holders. If you encounter this file and do not have + * permission, please contact the copyright holders and delete this file. + */ + +#include "RobotecGeoJSONSpawnerROS2EditorSystemComponent.h" +#include + +#include + +namespace RobotecGeoJSONSpawnerROS2 +{ + AZ_COMPONENT_IMPL( + RobotecGeoJSONSpawnerROS2EditorSystemComponent, + "RobotecGeoJSONSpawnerROS2EditorSystemComponent", + RobotecGeoJSONSpawnerROS2EditorSystemComponentTypeId, + BaseSystemComponent); + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(0); + } + } + + RobotecGeoJSONSpawnerROS2EditorSystemComponent::RobotecGeoJSONSpawnerROS2EditorSystemComponent() = default; + + RobotecGeoJSONSpawnerROS2EditorSystemComponent::~RobotecGeoJSONSpawnerROS2EditorSystemComponent() = default; + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + BaseSystemComponent::GetProvidedServices(provided); + provided.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2EditorService")); + } + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + BaseSystemComponent::GetIncompatibleServices(incompatible); + incompatible.push_back(AZ_CRC_CE("RobotecGeoJSONSpawnerROS2EditorService")); + } + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::GetRequiredServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) + { + BaseSystemComponent::GetRequiredServices(required); + } + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::GetDependentServices( + [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + BaseSystemComponent::GetDependentServices(dependent); + } + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::Activate() + { + RobotecGeoJSONSpawnerROS2SystemComponent::Activate(); + AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); + } + + void RobotecGeoJSONSpawnerROS2EditorSystemComponent::Deactivate() + { + AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); + RobotecGeoJSONSpawnerROS2SystemComponent::Deactivate(); + } + +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.h b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.h similarity index 66% rename from Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.h rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.h index 84160ac6..9058c754 100644 --- a/Gems/GeoJSONSpawnerROS2/Code/Source/Tools/GeoJSONSpawnerROS2EditorSystemComponent.h +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.h @@ -12,24 +12,24 @@ #include -#include +#include -namespace GeoJSONSpawnerROS2 +namespace RobotecGeoJSONSpawnerROS2 { - /// System component for GeoJSONSpawnerROS2 editor - class GeoJSONSpawnerROS2EditorSystemComponent - : public GeoJSONSpawnerROS2SystemComponent + /// System component for RobotecGeoJSONSpawnerROS2 editor + class RobotecGeoJSONSpawnerROS2EditorSystemComponent + : public RobotecGeoJSONSpawnerROS2SystemComponent , protected AzToolsFramework::EditorEvents::Bus::Handler { - using BaseSystemComponent = GeoJSONSpawnerROS2SystemComponent; + using BaseSystemComponent = RobotecGeoJSONSpawnerROS2SystemComponent; public: - AZ_COMPONENT_DECL(GeoJSONSpawnerROS2EditorSystemComponent); + AZ_COMPONENT_DECL(RobotecGeoJSONSpawnerROS2EditorSystemComponent); static void Reflect(AZ::ReflectContext* context); - GeoJSONSpawnerROS2EditorSystemComponent(); - ~GeoJSONSpawnerROS2EditorSystemComponent(); + RobotecGeoJSONSpawnerROS2EditorSystemComponent(); + ~RobotecGeoJSONSpawnerROS2EditorSystemComponent(); private: static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); @@ -41,4 +41,4 @@ namespace GeoJSONSpawnerROS2 void Activate() override; void Deactivate() override; }; -} // namespace GeoJSONSpawnerROS2 +} // namespace RobotecGeoJSONSpawnerROS2 diff --git a/Gems/GeoJSONSpawnerROS2/Code/Tests/Clients/GeoJSONSpawnerROS2Test.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Tests/Clients/RobotecGeoJSONSpawnerROS2Test.cpp similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Tests/Clients/GeoJSONSpawnerROS2Test.cpp rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Tests/Clients/RobotecGeoJSONSpawnerROS2Test.cpp diff --git a/Gems/GeoJSONSpawnerROS2/Code/Tests/Tools/GeoJSONSpawnerROS2EditorTest.cpp b/Gems/RobotecGeoJSONSpawnerROS2/Code/Tests/Tools/RobotecGeoJSONSpawnerROS2EditorTest.cpp similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/Tests/Tools/GeoJSONSpawnerROS2EditorTest.cpp rename to Gems/RobotecGeoJSONSpawnerROS2/Code/Tests/Tools/RobotecGeoJSONSpawnerROS2EditorTest.cpp diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_api_files.cmake new file mode 100644 index 00000000..4c8d4f01 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_api_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Include/RobotecGeoJSONSpawnerROS2/RobotecGeoJSONSpawnerROS2TypeIds.h +) diff --git a/Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_api_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_api_files.cmake similarity index 100% rename from Gems/GeoJSONSpawnerROS2/Code/geojsonspawnerros2_editor_api_files.cmake rename to Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_api_files.cmake diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_private_files.cmake new file mode 100644 index 00000000..062ccd3f --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_private_files.cmake @@ -0,0 +1,7 @@ + +set(FILES + Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.cpp + Source/Tools/RobotecGeoJSONSpawnerROS2EditorSystemComponent.h + Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.cpp + Source/ROS2/RobotecGeoJSONSpawnerROS2EditorComponent.h +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_shared_files.cmake new file mode 100644 index 00000000..9e982365 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_shared_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Source/Tools/RobotecGeoJSONSpawnerROS2EditorModule.cpp +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_tests_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_tests_files.cmake new file mode 100644 index 00000000..179d24aa --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_editor_tests_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Tests/Tools/RobotecGeoJSONSpawnerROS2EditorTest.cpp +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_private_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_private_files.cmake new file mode 100644 index 00000000..f42d49df --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_private_files.cmake @@ -0,0 +1,9 @@ + +set(FILES + Source/RobotecGeoJSONSpawnerROS2ModuleInterface.cpp + Source/RobotecGeoJSONSpawnerROS2ModuleInterface.h + Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.cpp + Source/Clients/RobotecGeoJSONSpawnerROS2SystemComponent.h + Source/ROS2/RobotecGeoJSONSpawnerROS2.cpp + Source/ROS2/RobotecGeoJSONSpawnerROS2.h +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_shared_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_shared_files.cmake new file mode 100644 index 00000000..e0f416b3 --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_shared_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Source/Clients/RobotecGeoJSONSpawnerROS2Module.cpp +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_tests_files.cmake b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_tests_files.cmake new file mode 100644 index 00000000..011eeaac --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Code/robotecgeojsonspawnerros2_tests_files.cmake @@ -0,0 +1,4 @@ + +set(FILES + Tests/Clients/RobotecGeoJSONSpawnerROS2Test.cpp +) diff --git a/Gems/RobotecGeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg b/Gems/RobotecGeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg new file mode 100644 index 00000000..c86f08ee --- /dev/null +++ b/Gems/RobotecGeoJSONSpawnerROS2/Registry/assetprocessor_settings.setreg @@ -0,0 +1,18 @@ +{ + "Amazon": { + "AssetProcessor": { + "Settings": { + "ScanFolder RobotecGeoJSONSpawnerROS2/Assets": { + "watch": "@GEMROOT:RobotecGeoJSONSpawnerROS2@/Assets", + "recursive": 1, + "order": 101 + }, + "ScanFolder RobotecGeoJSONSpawnerROS2/Registry": { + "watch": "@GEMROOT:RobotecGeoJSONSpawnerROS2@/Registry", + "recursive": 1, + "order": 102 + } + } + } + } +} diff --git a/Gems/GeoJSONSpawnerROS2/gem.json b/Gems/RobotecGeoJSONSpawnerROS2/gem.json similarity index 64% rename from Gems/GeoJSONSpawnerROS2/gem.json rename to Gems/RobotecGeoJSONSpawnerROS2/gem.json index 6d2c4dc1..5882a812 100644 --- a/Gems/GeoJSONSpawnerROS2/gem.json +++ b/Gems/RobotecGeoJSONSpawnerROS2/gem.json @@ -1,31 +1,31 @@ { - "gem_name": "GeoJSONSpawnerROS2", + "gem_name": "RobotecGeoJSONSpawnerROS2", "version": "1.0.0", - "display_name": "GeoJSONSpawnerROS2", + "display_name": "RobotecGeoJSONSpawnerROS2", "license": "Apache-2.0", "license_url": "https://opensource.org/licenses/Apache-2.0", "origin": "Robotec.ai", "origin_url": "https://www.robotec.ai", "type": "Code", - "summary": "This component is responsible for handling ROS 2 requests and forwarding them to the GeoJSONSpawner gem.", + "summary": "This component is responsible for handling ROS 2 requests and forwarding them to the RobotecGeoJSONSpawner gem.", "canonical_tags": [ "Gem" ], "user_tags": [ - "GeoJSONSpawnerROS2" + "RobotecGeoJSONSpawnerROS2" ], "platforms": [ "" ], "icon_path": "preview.png", - "requirements": "Requires ROS2 Gem and GeoJSONSpawner Gem", + "requirements": "Requires ROS2 Gem and RobotecGeoJSONSpawner Gem", "documentation_url": "", "dependencies": [ - "GeoJSONSpawner", + "RobotecGeoJSONSpawner", "ROS2" ], "repo_uri": "https://github.com/RobotecAI/robotec-o3de-tools", "compatible_engines": [], "engine_api_dependencies": [], - "restricted": "GeoJSONSpawnerROS2" + "restricted": "RobotecGeoJSONSpawnerROS2" } diff --git a/Gems/GeoJSONSpawnerROS2/preview.png b/Gems/RobotecGeoJSONSpawnerROS2/preview.png similarity index 100% rename from Gems/GeoJSONSpawnerROS2/preview.png rename to Gems/RobotecGeoJSONSpawnerROS2/preview.png diff --git a/README.md b/README.md index 56f07be7..d595c7e3 100644 --- a/README.md +++ b/README.md @@ -6,27 +6,27 @@ Note that this is not a "Canonical" part of O3DE - those gems are third-party co # Compatibility -| Gem name | Compatibility | -| ----------------------------------------------------- | ------------- | -| [**CsvSpawner**](#csvspawner) | not verified | -| [**ExposeConsoleToRos**](#exposeconsoletoRos) | not verified | -| [**GeoJSONSpawner**](#geojsonspawner) | not verified | -| [**GeoJSONSpawnerROS2**](#geojsonspawnerros2) | not verified | -| [**ImGuiProvider**](#imguiprovider) | not verified | -| [**ImGuizmo**](#imguizmo) | not verified | -| [**LevelModificationTools**](#levelmodificationtools) | not verified | -| [**Pointcloud**](#pointcloud) | not verified | -| [**RandomizeUtils**](#randomizeutils) | not verified | -| [**RobotecRecordingTools**](#robotecrecordingtools) | not verified | -| [**RobotecSpectatorCamera**](#robotecspectatorcamera) | not verified | -| [**RobotecSplineTools**](#robotecsplinetools) | not verified | -| [**RobotecWatchdogTools**](#robotecwatchdogtools) | not verified | -| [**ROS2PoseControl**](#ros2posecontrol) | not verified | -| [**ROS2ScriptIntegration**](#ros2scriptintegration) | compatible | -| [**SensorDebug**](#sensordebug) | not verified | -| [**Smoothing**](#smoothing) | not verified | -| [**ViewportStreamer**](#viewportstreamer) | not verified | -| [**WheelAnimTool**](#wheelanimtool) | not verified | +| Gem name | Compatibility | +| ----------------------------------------------------------- | ------------- | +| [**CsvSpawner**](#csvspawner) | not verified | +| [**ExposeConsoleToRos**](#exposeconsoletoRos) | not verified | +| [**ImGuiProvider**](#imguiprovider) | not verified | +| [**ImGuizmo**](#imguizmo) | not verified | +| [**LevelModificationTools**](#levelmodificationtools) | not verified | +| [**Pointcloud**](#pointcloud) | not verified | +| [**RandomizeUtils**](#randomizeutils) | not verified | +| [**RobotecGeoJSONSpawner**](#groboteceojsonspawner) | not verified | +| [**RobotecGeoJSONSpawnerROS2**](#robotecgeojsonspawnerros2) | not verified | +| [**RobotecRecordingTools**](#robotecrecordingtools) | not verified | +| [**RobotecSpectatorCamera**](#robotecspectatorcamera) | not verified | +| [**RobotecSplineTools**](#robotecsplinetools) | not verified | +| [**RobotecWatchdogTools**](#robotecwatchdogtools) | not verified | +| [**ROS2PoseControl**](#ros2posecontrol) | not verified | +| [**ROS2ScriptIntegration**](#ros2scriptintegration) | compatible | +| [**SensorDebug**](#sensordebug) | not verified | +| [**Smoothing**](#smoothing) | not verified | +| [**ViewportStreamer**](#viewportstreamer) | not verified | +| [**WheelAnimTool**](#wheelanimtool) | not verified | # CsvSpawner @@ -76,8 +76,101 @@ It has two std_msgs/msg/String topics: Currently `o3de_console_in` is usable only. The gem functionality is available only in Profile/Debug. +# ImGuiProvider + +This gem adds support for displaying user defined ImGui GUI. Users can define their own gui using `ImGuiProvider::ImGuiProviderNotificationBus`. User's component should be handler of the `ImGuiProvider::ImGuiProviderNotificationBus::Handler` and define method `OnImGuiUpdate`. Mentioned method should contain all code related to displayed GUI. Acquiring ImGui context and its releasing is handled by the Gem and its system component. User's component should connect to `ImGuiProvider::ImGuiProviderNotificationBus` using `ImGuiProvider::ImGuiFeaturePath` aka `AZ::IO::Path`. Each segment of path represents one depth in the toolbar. + +Below example on how to register new feature during component activation: + +Visibility of the GUI menu bar can be overridden at the app start using `-cl_hide_menu_bar=1`. +Setting the flag effectively disables the GUI. + +```cpp +void ExampleComponent::Activate() +{ + /* + some implementation + */ + auto pathToFeature = ImGuiProvider::ImGuiFeaturePath{ "Tools/ExampleFeature" }; + ImGuiProvider::ImGuiProviderNotificationBus::Handler::BusConnect(pathToFeature); + /* + some implementation + */ +} +``` + +Gem monitors number of active handler, so ImGui features are available as long as the lifetime of component which registered it. + +Gem handles correct displaying of debug menu available using `home` button. If Gem detects debug menu, registered GUIs disappear. After disabling debug menu, previous state of registered features is restored. +If Gem detects custom GUI feature registered in Editor, viewport icons are moved to prevent covering the registered features. + +## API + +Gem defines `ImGuiProvider::ImGuiProviderNotificationBus` and `ImGuiProvider::ImGuiProviderRequestBus`. + +**Notification bus methods** + +Besides `OnImGuiUpdate` used for updating displayed GUI, notification bus defines methods: `OnImGuiSelected` and `OnImGuiUnselected`. Methods are triggered during registered GUI state change, respectively hidden -> visible and visible -> hidden. + +**Request bus methods** + +`AZStd::optional GetActiveGuiId()` - returns optional with ImGuiProvider::ImGuiFeaturePath. Optional is empty if there is no active GUI. + +`void SetActiveGUI(ImGuiFeaturePath guiId)` - sets GUI with given id as active. Doesn't check if given guiId exists. + +# ImGuizmo + +This gem brings gizmo (with some simple API) to be used in game mode. +It is gemification of existing ImGui extension called [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo). +This gem comes with only one system component that is active only in game mode. +To test this gizmo, activate gem and type in O3DE console (in gamelauncher): + +``` +imguizmo_acquire +imguizmo_show 0 +``` + +There is an API to work with multiple gizmos using handle. +Refer to script canvas example below: +![alt text](doc/imguizmo.png) + +_Note_ Only one gizmo can be rendered at the time! + +# LevelModificationTools + +The level modification tool contains a component called PrefabVariantEditorComponent. +This component allows the change a variant of loaded prefab during game mode. +It exposes PrefabVariantRequestsBus to Script Canvas or LUA. + +# Pointcloud + +A Gem that introduces point clouds to O3DE. +It offers: + +- PointcloudFeatureProcessor with public API +- Pointcloud product asset +- A public API for configuration (`PointcloudConfigurationBus`) + +At this moment it accepts [PLY]() as a source asset. + +![](doc/Pointcloud.png)\ +Pointcloud asset was obtained from [potree](https://github.com/potree/potree). + +# RandomizeUtils + +This gem allows to randomize prefab on spawning. +It has a component called `RandomizePoseComponent` that modifies an entity during activation. +It allows: + +- change translation and rotation and uniform scale of the Transform component, +- deactivate the entity with given probability + +![](doc/RandomizePoseComponent.png) + +**Note:** that only given entity is modified (not all descendants). + -# GeoJSONSpawner +# RobotecGeoJSONSpawner Component that spawns prefabs using coordinates stored in the GeoJSON format (either in a file or in a raw string). It supports WGS84 coordinate system. This component supports spawning prefabs using GeoJSON stored in the file or stored in the raw string and passed via the ROS2 interface. @@ -135,7 +228,7 @@ Example of supported GeoJSON: ## API -This Gem has defined notification bus - `GeoJSONSpawnerNotificationBus`. +This Gem has defined notification bus - `RobotecGeoJSONSpawnerNotificationBus`. Available functions: @@ -150,9 +243,9 @@ Available functions: > \*Supports **Lua** and **Script Canvas\*** -# GeoJSONSpawnerROS2 +# RobotecGeoJSONSpawnerROS2 -Gem provides a component that connects GeoJSONSpawner with ROS 2. This component provides 4 topics and 1 service that allows to control GeoJSONSpawner with ROS 2 messages. +Gem provides a component that connects RobotecGeoJSONSpawner with ROS 2. This component provides 4 topics and 1 service that allows to control RobotecGeoJSONSpawner with ROS 2 messages. ![](doc/GeoJSONSpawnerROS2Interface.png) @@ -218,7 +311,7 @@ Suppose the user wants to move the Feature Object assigned to ID 0. To do this, ``` -- `geojson/delete_all [std_msgs::msg::Empty]` - topic that despawns all entities spawned with GeoJSONSpawner. +- `geojson/delete_all [std_msgs::msg::Empty]` - topic that despawns all entities spawned with RobotecGeoJSONSpawner. - `geojson/delete_by_id [std_msgs/msg/Int32MultiArray]` - topic that despawns all entities associated with a given ids. Service: @@ -300,98 +393,6 @@ ros2 topic pub /geojson/delete_all std_msgs/msg/Empty "{}" --once ros2 service call /geojson/get_spawned_groups_ids std_srvs/srv/Trigger ``` -# ImGuiProvider - -This gem adds support for displaying user defined ImGui GUI. Users can define their own gui using `ImGuiProvider::ImGuiProviderNotificationBus`. User's component should be handler of the `ImGuiProvider::ImGuiProviderNotificationBus::Handler` and define method `OnImGuiUpdate`. Mentioned method should contain all code related to displayed GUI. Acquiring ImGui context and its releasing is handled by the Gem and its system component. User's component should connect to `ImGuiProvider::ImGuiProviderNotificationBus` using `ImGuiProvider::ImGuiFeaturePath` aka `AZ::IO::Path`. Each segment of path represents one depth in the toolbar. - -Below example on how to register new feature during component activation: - -Visibility of the GUI menu bar can be overridden at the app start using `-cl_hide_menu_bar=1`. -Setting the flag effectively disables the GUI. - -```cpp -void ExampleComponent::Activate() -{ - /* - some implementation - */ - auto pathToFeature = ImGuiProvider::ImGuiFeaturePath{ "Tools/ExampleFeature" }; - ImGuiProvider::ImGuiProviderNotificationBus::Handler::BusConnect(pathToFeature); - /* - some implementation - */ -} -``` - -Gem monitors number of active handler, so ImGui features are available as long as the lifetime of component which registered it. - -Gem handles correct displaying of debug menu available using `home` button. If Gem detects debug menu, registered GUIs disappear. After disabling debug menu, previous state of registered features is restored. -If Gem detects custom GUI feature registered in Editor, viewport icons are moved to prevent covering the registered features. - -## API - -Gem defines `ImGuiProvider::ImGuiProviderNotificationBus` and `ImGuiProvider::ImGuiProviderRequestBus`. - -**Notification bus methods** - -Besides `OnImGuiUpdate` used for updating displayed GUI, notification bus defines methods: `OnImGuiSelected` and `OnImGuiUnselected`. Methods are triggered during registered GUI state change, respectively hidden -> visible and visible -> hidden. - -**Request bus methods** - -`AZStd::optional GetActiveGuiId()` - returns optional with ImGuiProvider::ImGuiFeaturePath. Optional is empty if there is no active GUI. - -`void SetActiveGUI(ImGuiFeaturePath guiId)` - sets GUI with given id as active. Doesn't check if given guiId exists. - -# ImGuizmo - -This gem brings gizmo (with some simple API) to be used in game mode. -It is gemification of existing ImGui extension called [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo). -This gem comes with only one system component that is active only in game mode. -To test this gizmo, activate gem and type in O3DE console (in gamelauncher): - -``` -imguizmo_acquire -imguizmo_show 0 -``` - -There is an API to work with multiple gizmos using handle. -Refer to script canvas example below: -![alt text](doc/imguizmo.png) - -_Note_ Only one gizmo can be rendered at the time! - -# LevelModificationTools - -The level modification tool contains a component called PrefabVariantEditorComponent. -This component allows the change a variant of loaded prefab during game mode. -It exposes PrefabVariantRequestsBus to Script Canvas or LUA. - -# Pointcloud - -A Gem that introduces point clouds to O3DE. -It offers: - -- PointcloudFeatureProcessor with public API -- Pointcloud product asset -- A public API for configuration (`PointcloudConfigurationBus`) - -At this moment it accepts [PLY]() as a source asset. - -![](doc/Pointcloud.png)\ -Pointcloud asset was obtained from [potree](https://github.com/potree/potree). - -# RandomizeUtils - -This gem allows to randomize prefab on spawning. -It has a component called `RandomizePoseComponent` that modifies an entity during activation. -It allows: - -- change translation and rotation and uniform scale of the Transform component, -- deactivate the entity with given probability - -![](doc/RandomizePoseComponent.png) - -**Note:** that only given entity is modified (not all descendants). # RobotecRecordingTools