ソースを参照

Empty RecastNavigation gem created.

Signed-off-by: Olex Lozitskiy <[email protected]>
Olex Lozitskiy 3 年 前
コミット
88225d602e
58 ファイル変更786 行追加0 行削除
  1. 0 0
      Gems/RecastNavigation/.gitignore
  2. 14 0
      Gems/RecastNavigation/CMakeLists.txt
  3. 203 0
      Gems/RecastNavigation/Code/CMakeLists.txt
  4. 31 0
      Gems/RecastNavigation/Code/Include/RecastNavigation/RecastNavigationBus.h
  5. 4 0
      Gems/RecastNavigation/Code/Platform/Android/PAL_android.cmake
  6. 3 0
      Gems/RecastNavigation/Code/Platform/Android/recastnavigation_api_files.cmake
  7. 8 0
      Gems/RecastNavigation/Code/Platform/Android/recastnavigation_private_files.cmake
  8. 8 0
      Gems/RecastNavigation/Code/Platform/Android/recastnavigation_shared_files.cmake
  9. 4 0
      Gems/RecastNavigation/Code/Platform/Linux/PAL_linux.cmake
  10. 3 0
      Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_api_files.cmake
  11. 3 0
      Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_editor_api_files.cmake
  12. 8 0
      Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_private_files.cmake
  13. 8 0
      Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_shared_files.cmake
  14. 4 0
      Gems/RecastNavigation/Code/Platform/Mac/PAL_mac.cmake
  15. 3 0
      Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_api_files.cmake
  16. 3 0
      Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_editor_api_files.cmake
  17. 8 0
      Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_private_files.cmake
  18. 8 0
      Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_shared_files.cmake
  19. 4 0
      Gems/RecastNavigation/Code/Platform/Windows/PAL_windows.cmake
  20. 3 0
      Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_api_files.cmake
  21. 3 0
      Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_editor_api_files.cmake
  22. 8 0
      Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_private_files.cmake
  23. 8 0
      Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_shared_files.cmake
  24. 4 0
      Gems/RecastNavigation/Code/Platform/iOS/PAL_ios.cmake
  25. 3 0
      Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_api_files.cmake
  26. 8 0
      Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_private_files.cmake
  27. 8 0
      Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_shared_files.cmake
  28. 38 0
      Gems/RecastNavigation/Code/Source/RecastNavigationEditorModule.cpp
  29. 54 0
      Gems/RecastNavigation/Code/Source/RecastNavigationEditorSystemComponent.cpp
  30. 33 0
      Gems/RecastNavigation/Code/Source/RecastNavigationEditorSystemComponent.h
  31. 17 0
      Gems/RecastNavigation/Code/Source/RecastNavigationModule.cpp
  32. 36 0
      Gems/RecastNavigation/Code/Source/RecastNavigationModuleInterface.h
  33. 83 0
      Gems/RecastNavigation/Code/Source/RecastNavigationSystemComponent.cpp
  34. 47 0
      Gems/RecastNavigation/Code/Source/RecastNavigationSystemComponent.h
  35. 4 0
      Gems/RecastNavigation/Code/Tests/RecastNavigationEditorTest.cpp
  36. 4 0
      Gems/RecastNavigation/Code/Tests/RecastNavigationTest.cpp
  37. 4 0
      Gems/RecastNavigation/Code/recastnavigation_api_files.cmake
  38. 4 0
      Gems/RecastNavigation/Code/recastnavigation_editor_api_files.cmake
  39. 5 0
      Gems/RecastNavigation/Code/recastnavigation_editor_private_files.cmake
  40. 4 0
      Gems/RecastNavigation/Code/recastnavigation_editor_shared_files.cmake
  41. 4 0
      Gems/RecastNavigation/Code/recastnavigation_editor_tests_files.cmake
  42. 6 0
      Gems/RecastNavigation/Code/recastnavigation_private_files.cmake
  43. 4 0
      Gems/RecastNavigation/Code/recastnavigation_shared_files.cmake
  44. 4 0
      Gems/RecastNavigation/Code/recastnavigation_tests_files.cmake
  45. 1 0
      Gems/RecastNavigation/Platform/Android/android_gem.cmake
  46. 3 0
      Gems/RecastNavigation/Platform/Android/android_gem.json
  47. 1 0
      Gems/RecastNavigation/Platform/Linux/linux_gem.cmake
  48. 3 0
      Gems/RecastNavigation/Platform/Linux/linux_gem.json
  49. 1 0
      Gems/RecastNavigation/Platform/Mac/mac_gem.cmake
  50. 3 0
      Gems/RecastNavigation/Platform/Mac/mac_gem.json
  51. 1 0
      Gems/RecastNavigation/Platform/Windows/windows_gem.cmake
  52. 3 0
      Gems/RecastNavigation/Platform/Windows/windows_gem.json
  53. 1 0
      Gems/RecastNavigation/Platform/iOS/ios_gem.cmake
  54. 3 0
      Gems/RecastNavigation/Platform/iOS/ios_gem.json
  55. 18 0
      Gems/RecastNavigation/Registry/assetprocessor_settings.setreg
  56. 21 0
      Gems/RecastNavigation/gem.json
  57. 3 0
      Gems/RecastNavigation/preview.png
  58. 1 0
      engine.json

+ 0 - 0
Gems/RecastNavigation/.gitignore


+ 14 - 0
Gems/RecastNavigation/CMakeLists.txt

@@ -0,0 +1,14 @@
+
+set(gem_path ${CMAKE_CURRENT_LIST_DIR})
+set(gem_json ${gem_path}/gem.json)
+o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
+
+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
+# project cmake for this platform.
+include(${pal_dir}/${PAL_PLATFORM_NAME_LOWERCASE}_gem.cmake)
+
+ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty)
+
+add_subdirectory(Code)

+ 203 - 0
Gems/RecastNavigation/Code/CMakeLists.txt

@@ -0,0 +1,203 @@
+
+# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
+# 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/RecastNavigation/Code/Platform/<platorm_name>  or
+#            <restricted_folder>/<platform_name>/Gems/RecastNavigation/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
+# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
+# is supported by this platform.
+include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+
+# The RecastNavigation.API target declares the common interface that users of this gem should depend on in their targets
+ly_add_target(
+    NAME RecastNavigation.API INTERFACE
+    NAMESPACE Gem
+    FILES_CMAKE
+        recastnavigation_api_files.cmake
+        ${pal_dir}/recastnavigation_api_files.cmake
+    INCLUDE_DIRECTORIES
+        INTERFACE
+            Include
+    BUILD_DEPENDENCIES
+        INTERFACE
+           AZ::AzCore
+)
+
+# The RecastNavigation.Private.Object target is an internal target
+# It should not be used outside of this Gems CMakeLists.txt
+ly_add_target(
+    NAME RecastNavigation.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        recastnavigation_private_files.cmake
+        ${pal_dir}/recastnavigation_private_files.cmake
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+)
+
+# Here add RecastNavigation target, it depends on the Private Object library and Public API interface
+ly_add_target(
+    NAME RecastNavigation ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAMESPACE Gem
+    FILES_CMAKE
+        recastnavigation_shared_files.cmake
+        ${pal_dir}/recastnavigation_shared_files.cmake
+    INCLUDE_DIRECTORIES
+        PUBLIC
+            Include
+        PRIVATE
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            Gem::RecastNavigation.API
+        PRIVATE
+            Gem::RecastNavigation.Private.Object
+)
+
+# By default, we will specify that the above target RecastNavigation would be used by
+# Client and Server type targets when this gem is enabled.  If you don't want it
+# active in Clients or Servers by default, delete one of both of the following lines:
+ly_create_alias(NAME RecastNavigation.Clients NAMESPACE Gem TARGETS Gem::RecastNavigation)
+ly_create_alias(NAME RecastNavigation.Servers NAMESPACE Gem TARGETS Gem::RecastNavigation)
+
+# For the Client and Server variants of RecastNavigation Gem, an alias to the RecastNavigation.API target will be made
+ly_create_alias(NAME RecastNavigation.Clients.API NAMESPACE Gem TARGETS Gem::RecastNavigation.API)
+ly_create_alias(NAME RecastNavigation.Servers.API NAMESPACE Gem TARGETS Gem::RecastNavigation.API)
+
+# If we are on a host platform, we want to add the host tools targets like the RecastNavigation.Editor MODULE target
+if(PAL_TRAIT_BUILD_HOST_TOOLS)
+    # The RecastNavigation.Editor.API target can be used by other gems that want to interact with the RecastNavigation.Editor module
+    ly_add_target(
+        NAME RecastNavigation.Editor.API INTERFACE
+        NAMESPACE Gem
+        FILES_CMAKE
+            recastnavigation_editor_api_files.cmake
+            ${pal_dir}/recastnavigation_editor_api_files.cmake
+        INCLUDE_DIRECTORIES
+            INTERFACE
+                Include
+        BUILD_DEPENDENCIES
+            INTERFACE
+                AZ::AzToolsFramework
+    )
+
+    # The RecastNavigation.Editor.Private.Object target is an internal target
+    # which is only to be used by this gems CMakeLists.txt and any subdirectories
+    # Other gems should not use this target
+    ly_add_target(
+        NAME RecastNavigation.Editor.Private.Object STATIC
+        NAMESPACE Gem
+        FILES_CMAKE
+            recastnavigation_editor_private_files.cmake
+        TARGET_PROPERTIES
+            O3DE_PRIVATE_TARGET TRUE
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Include
+                Source
+        BUILD_DEPENDENCIES
+            PUBLIC
+                AZ::AzToolsFramework
+                $<TARGET_OBJECTS:Gem::RecastNavigation.Private.Object>
+    )
+
+    ly_add_target(
+        NAME RecastNavigation.Editor GEM_MODULE
+        NAMESPACE Gem
+        AUTOMOC
+        FILES_CMAKE
+            recastnavigation_editor_shared_files.cmake
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Source
+            PUBLIC
+                Include
+        BUILD_DEPENDENCIES
+            PUBLIC
+                Gem::RecastNavigation.Editor.API
+            PRIVATE
+                Gem::RecastNavigation.Editor.Private.Object
+    )
+
+    # By default, we will specify that the above target RecastNavigation would be used by
+    # Tool and Builder type targets when this gem is enabled.  If you don't want it
+    # active in Tools or Builders by default, delete one of both of the following lines:
+    ly_create_alias(NAME RecastNavigation.Tools    NAMESPACE Gem TARGETS Gem::RecastNavigation.Editor)
+    ly_create_alias(NAME RecastNavigation.Builders NAMESPACE Gem TARGETS Gem::RecastNavigation.Editor)
+
+    # For the Tools and Builders variants of RecastNavigation Gem, an alias to the RecastNavigation.Editor API target will be made
+    ly_create_alias(NAME RecastNavigation.Tools.API NAMESPACE Gem TARGETS Gem::RecastNavigation.Editor.API)
+    ly_create_alias(NAME RecastNavigation.Builders.API NAMESPACE Gem TARGETS Gem::RecastNavigation.Editor.API)
+
+endif()
+
+################################################################################
+# Tests
+################################################################################
+# 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 RecastNavigation.Tests
+    if(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED)
+        # We support RecastNavigation.Tests on this platform, add dependency on the Private Object target
+        ly_add_target(
+            NAME RecastNavigation.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+            NAMESPACE Gem
+            FILES_CMAKE
+                recastnavigation_tests_files.cmake
+            INCLUDE_DIRECTORIES
+                PRIVATE
+                    Tests
+                    Source
+            BUILD_DEPENDENCIES
+                PRIVATE
+                    AZ::AzTest
+                    AZ::AzFramework
+                    Gem::RecastNavigation.Private.Object
+        )
+
+        # Add RecastNavigation.Tests to googletest
+        ly_add_googletest(
+            NAME Gem::RecastNavigation.Tests
+        )
+    endif()
+
+    # 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_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED)
+            # We support RecastNavigation.Editor.Tests on this platform, add RecastNavigation.Editor.Tests target which depends on
+            # private RecastNavigation.Editor.Private.Object target
+            ly_add_target(
+                NAME RecastNavigation.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+                NAMESPACE Gem
+                FILES_CMAKE
+                    recastnavigation_editor_tests_files.cmake
+                INCLUDE_DIRECTORIES
+                    PRIVATE
+                        Tests
+                        Source
+                BUILD_DEPENDENCIES
+                    PRIVATE
+                        AZ::AzTest
+                        Gem::RecastNavigation.Private.Object
+            )
+
+            # Add RecastNavigation.Editor.Tests to googletest
+            ly_add_googletest(
+                NAME Gem::RecastNavigation.Editor.Tests
+            )
+        endif()
+    endif()
+endif()

+ 31 - 0
Gems/RecastNavigation/Code/Include/RecastNavigation/RecastNavigationBus.h

@@ -0,0 +1,31 @@
+
+#pragma once
+
+#include <AzCore/EBus/EBus.h>
+#include <AzCore/Interface/Interface.h>
+
+namespace RecastNavigation
+{
+    class RecastNavigationRequests
+    {
+    public:
+        AZ_RTTI(RecastNavigationRequests, "{d1c2f552-287d-4aa1-a5b8-5b234c9106f3}");
+        virtual ~RecastNavigationRequests() = default;
+        // Put your public methods here
+    };
+    
+    class RecastNavigationBusTraits
+        : public AZ::EBusTraits
+    {
+    public:
+        //////////////////////////////////////////////////////////////////////////
+        // EBusTraits overrides
+        static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
+        static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
+        //////////////////////////////////////////////////////////////////////////
+    };
+
+    using RecastNavigationRequestBus = AZ::EBus<RecastNavigationRequests, RecastNavigationBusTraits>;
+    using RecastNavigationInterface = AZ::Interface<RecastNavigationRequests>;
+
+} // namespace RecastNavigation

+ 4 - 0
Gems/RecastNavigation/Code/Platform/Android/PAL_android.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_RECASTNAVIGATION_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Android/recastnavigation_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Android/recastnavigation_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/RecastNavigationAndroid.cpp
+#      ../Source/Android/RecastNavigationAndroid.h
+#      ../Include/Android/RecastNavigationAndroid.h
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Android/recastnavigation_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/RecastNavigationAndroid.cpp
+#      ../Source/Android/RecastNavigationAndroid.h
+#      ../Include/Android/RecastNavigationAndroid.h
+
+set(FILES
+)

+ 4 - 0
Gems/RecastNavigation/Code/Platform/Linux/PAL_linux.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_RECASTNAVIGATION_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/RecastNavigationLinux.cpp
+#      ../Source/Linux/RecastNavigationLinux.h
+#      ../Include/Linux/RecastNavigationLinux.h
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Linux/recastnavigation_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/RecastNavigationLinux.cpp
+#      ../Source/Linux/RecastNavigationLinux.h
+#      ../Include/Linux/RecastNavigationLinux.h
+
+set(FILES
+)

+ 4 - 0
Gems/RecastNavigation/Code/Platform/Mac/PAL_mac.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_RECASTNAVIGATION_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/RecastNavigationMac.cpp
+#      ../Source/Mac/RecastNavigationMac.h
+#      ../Include/Mac/RecastNavigationMac.h
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Mac/recastnavigation_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/RecastNavigationMac.cpp
+#      ../Source/Mac/RecastNavigationMac.h
+#      ../Include/Mac/RecastNavigationMac.h
+
+set(FILES
+)

+ 4 - 0
Gems/RecastNavigation/Code/Platform/Windows/PAL_windows.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_RECASTNAVIGATION_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/RecastNavigationWindows.cpp
+#      ../Source/Windows/RecastNavigationWindows.h
+#      ../Include/Windows/RecastNavigationWindows.h
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/Windows/recastnavigation_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/RecastNavigationWindows.cpp
+#      ../Source/Windows/RecastNavigationWindows.h
+#      ../Include/Windows/RecastNavigationWindows.h
+
+set(FILES
+)

+ 4 - 0
Gems/RecastNavigation/Code/Platform/iOS/PAL_ios.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_RECASTNAVIGATION_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_RECASTNAVIGATION_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/RecastNavigationiOS.cpp
+#      ../Source/iOS/RecastNavigationiOS.h
+#      ../Include/iOS/RecastNavigationiOS.h
+
+set(FILES
+)

+ 8 - 0
Gems/RecastNavigation/Code/Platform/iOS/recastnavigation_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/RecastNavigationiOS.cpp
+#      ../Source/iOS/RecastNavigationiOS.h
+#      ../Include/iOS/RecastNavigationiOS.h
+
+set(FILES
+)

+ 38 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationEditorModule.cpp

@@ -0,0 +1,38 @@
+
+#include <RecastNavigationModuleInterface.h>
+#include <RecastNavigationEditorSystemComponent.h>
+
+namespace RecastNavigation
+{
+    class RecastNavigationEditorModule
+        : public RecastNavigationModuleInterface
+    {
+    public:
+        AZ_RTTI(RecastNavigationEditorModule, "{a8fb0082-78ab-4ca6-8f63-68c98f1a6a6d}", RecastNavigationModuleInterface);
+        AZ_CLASS_ALLOCATOR(RecastNavigationEditorModule, AZ::SystemAllocator, 0);
+
+        RecastNavigationEditorModule()
+        {
+            // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
+            // Add ALL components descriptors associated with this gem to m_descriptors.
+            // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
+            // This happens through the [MyComponent]::Reflect() function.
+            m_descriptors.insert(m_descriptors.end(), {
+                RecastNavigationEditorSystemComponent::CreateDescriptor(),
+            });
+        }
+
+        /**
+         * Add required SystemComponents to the SystemEntity.
+         * Non-SystemComponents should not be added here
+         */
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override
+        {
+            return AZ::ComponentTypeList {
+                azrtti_typeid<RecastNavigationEditorSystemComponent>(),
+            };
+        }
+    };
+}// namespace RecastNavigation
+
+AZ_DECLARE_MODULE_CLASS(Gem_RecastNavigation, RecastNavigation::RecastNavigationEditorModule)

+ 54 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationEditorSystemComponent.cpp

@@ -0,0 +1,54 @@
+
+#include <AzCore/Serialization/SerializeContext.h>
+#include <RecastNavigationEditorSystemComponent.h>
+
+namespace RecastNavigation
+{
+    void RecastNavigationEditorSystemComponent::Reflect(AZ::ReflectContext* context)
+    {
+        if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serializeContext->Class<RecastNavigationEditorSystemComponent, RecastNavigationSystemComponent>()
+                ->Version(0);
+        }
+    }
+
+    RecastNavigationEditorSystemComponent::RecastNavigationEditorSystemComponent() = default;
+
+    RecastNavigationEditorSystemComponent::~RecastNavigationEditorSystemComponent() = default;
+
+    void RecastNavigationEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    {
+        BaseSystemComponent::GetProvidedServices(provided);
+        provided.push_back(AZ_CRC_CE("RecastNavigationEditorService"));
+    }
+
+    void RecastNavigationEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    {
+        BaseSystemComponent::GetIncompatibleServices(incompatible);
+        incompatible.push_back(AZ_CRC_CE("RecastNavigationEditorService"));
+    }
+
+    void RecastNavigationEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
+    {
+        BaseSystemComponent::GetRequiredServices(required);
+    }
+
+    void RecastNavigationEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    {
+        BaseSystemComponent::GetDependentServices(dependent);
+    }
+
+    void RecastNavigationEditorSystemComponent::Activate()
+    {
+        RecastNavigationSystemComponent::Activate();
+        AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
+    }
+
+    void RecastNavigationEditorSystemComponent::Deactivate()
+    {
+        AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
+        RecastNavigationSystemComponent::Deactivate();
+    }
+
+} // namespace RecastNavigation

+ 33 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationEditorSystemComponent.h

@@ -0,0 +1,33 @@
+
+#pragma once
+
+#include <RecastNavigationSystemComponent.h>
+
+#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
+
+namespace RecastNavigation
+{
+    /// System component for RecastNavigation editor
+    class RecastNavigationEditorSystemComponent
+        : public RecastNavigationSystemComponent
+        , private AzToolsFramework::EditorEvents::Bus::Handler
+    {
+        using BaseSystemComponent = RecastNavigationSystemComponent;
+    public:
+        AZ_COMPONENT(RecastNavigationEditorSystemComponent, "{2f0e450d-6ded-4e92-952a-4aa855fdfff8}", BaseSystemComponent);
+        static void Reflect(AZ::ReflectContext* context);
+
+        RecastNavigationEditorSystemComponent();
+        ~RecastNavigationEditorSystemComponent();
+
+    private:
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
+        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
+        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
+
+        // AZ::Component
+        void Activate() override;
+        void Deactivate() override;
+    };
+} // namespace RecastNavigation

+ 17 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationModule.cpp

@@ -0,0 +1,17 @@
+
+
+#include <RecastNavigationModuleInterface.h>
+#include <RecastNavigationSystemComponent.h>
+
+namespace RecastNavigation
+{
+    class RecastNavigationModule
+        : public RecastNavigationModuleInterface
+    {
+    public:
+        AZ_RTTI(RecastNavigationModule, "{a8fb0082-78ab-4ca6-8f63-68c98f1a6a6d}", RecastNavigationModuleInterface);
+        AZ_CLASS_ALLOCATOR(RecastNavigationModule, AZ::SystemAllocator, 0);
+    };
+}// namespace RecastNavigation
+
+AZ_DECLARE_MODULE_CLASS(Gem_RecastNavigation, RecastNavigation::RecastNavigationModule)

+ 36 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationModuleInterface.h

@@ -0,0 +1,36 @@
+
+#include <AzCore/Memory/SystemAllocator.h>
+#include <AzCore/Module/Module.h>
+#include <RecastNavigationSystemComponent.h>
+
+namespace RecastNavigation
+{
+    class RecastNavigationModuleInterface
+        : public AZ::Module
+    {
+    public:
+        AZ_RTTI(RecastNavigationModuleInterface, "{d1f30353-6d97-4392-b367-a82587ce439c}", AZ::Module);
+        AZ_CLASS_ALLOCATOR(RecastNavigationModuleInterface, AZ::SystemAllocator, 0);
+
+        RecastNavigationModuleInterface()
+        {
+            // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
+            // Add ALL components descriptors associated with this gem to m_descriptors.
+            // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
+            // This happens through the [MyComponent]::Reflect() function.
+            m_descriptors.insert(m_descriptors.end(), {
+                RecastNavigationSystemComponent::CreateDescriptor(),
+                });
+        }
+
+        /**
+         * Add required SystemComponents to the SystemEntity.
+         */
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override
+        {
+            return AZ::ComponentTypeList{
+                azrtti_typeid<RecastNavigationSystemComponent>(),
+            };
+        }
+    };
+}// namespace RecastNavigation

+ 83 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationSystemComponent.cpp

@@ -0,0 +1,83 @@
+
+#include <RecastNavigationSystemComponent.h>
+
+#include <AzCore/Serialization/SerializeContext.h>
+#include <AzCore/Serialization/EditContext.h>
+#include <AzCore/Serialization/EditContextConstants.inl>
+
+namespace RecastNavigation
+{
+    void RecastNavigationSystemComponent::Reflect(AZ::ReflectContext* context)
+    {
+        if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serialize->Class<RecastNavigationSystemComponent, AZ::Component>()
+                ->Version(0)
+                ;
+
+            if (AZ::EditContext* ec = serialize->GetEditContext())
+            {
+                ec->Class<RecastNavigationSystemComponent>("RecastNavigation", "[Description of functionality provided by this System Component]")
+                    ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                        ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
+                        ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
+                    ;
+            }
+        }
+    }
+
+    void RecastNavigationSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    {
+        provided.push_back(AZ_CRC_CE("RecastNavigationService"));
+    }
+
+    void RecastNavigationSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    {
+        incompatible.push_back(AZ_CRC_CE("RecastNavigationService"));
+    }
+
+    void RecastNavigationSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
+    {
+    }
+
+    void RecastNavigationSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    {
+    }
+
+    RecastNavigationSystemComponent::RecastNavigationSystemComponent()
+    {
+        if (RecastNavigationInterface::Get() == nullptr)
+        {
+            RecastNavigationInterface::Register(this);
+        }
+    }
+
+    RecastNavigationSystemComponent::~RecastNavigationSystemComponent()
+    {
+        if (RecastNavigationInterface::Get() == this)
+        {
+            RecastNavigationInterface::Unregister(this);
+        }
+    }
+
+    void RecastNavigationSystemComponent::Init()
+    {
+    }
+
+    void RecastNavigationSystemComponent::Activate()
+    {
+        RecastNavigationRequestBus::Handler::BusConnect();
+        AZ::TickBus::Handler::BusConnect();
+    }
+
+    void RecastNavigationSystemComponent::Deactivate()
+    {
+        AZ::TickBus::Handler::BusDisconnect();
+        RecastNavigationRequestBus::Handler::BusDisconnect();
+    }
+
+    void RecastNavigationSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
+    {
+    }
+
+} // namespace RecastNavigation

+ 47 - 0
Gems/RecastNavigation/Code/Source/RecastNavigationSystemComponent.h

@@ -0,0 +1,47 @@
+
+#pragma once
+
+#include <AzCore/Component/Component.h>
+#include <AzCore/Component/TickBus.h>
+#include <RecastNavigation/RecastNavigationBus.h>
+
+namespace RecastNavigation
+{
+    class RecastNavigationSystemComponent
+        : public AZ::Component
+        , protected RecastNavigationRequestBus::Handler
+        , public AZ::TickBus::Handler
+    {
+    public:
+        AZ_COMPONENT(RecastNavigationSystemComponent, "{9d7ae509-b1db-4889-98bb-941a3f672ca3}");
+
+        static void Reflect(AZ::ReflectContext* context);
+
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
+        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
+        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
+
+        RecastNavigationSystemComponent();
+        ~RecastNavigationSystemComponent();
+
+    protected:
+        ////////////////////////////////////////////////////////////////////////
+        // RecastNavigationRequestBus interface implementation
+
+        ////////////////////////////////////////////////////////////////////////
+
+        ////////////////////////////////////////////////////////////////////////
+        // AZ::Component interface implementation
+        void Init() override;
+        void Activate() override;
+        void Deactivate() override;
+        ////////////////////////////////////////////////////////////////////////
+
+        ////////////////////////////////////////////////////////////////////////
+        // AZTickBus interface implementation
+        void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
+        ////////////////////////////////////////////////////////////////////////
+    };
+
+} // namespace RecastNavigation

+ 4 - 0
Gems/RecastNavigation/Code/Tests/RecastNavigationEditorTest.cpp

@@ -0,0 +1,4 @@
+
+#include <AzTest/AzTest.h>
+
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 4 - 0
Gems/RecastNavigation/Code/Tests/RecastNavigationTest.cpp

@@ -0,0 +1,4 @@
+
+#include <AzTest/AzTest.h>
+
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_api_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Include/RecastNavigation/RecastNavigationBus.h
+)

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_editor_api_files.cmake

@@ -0,0 +1,4 @@
+
+
+set(FILES
+)

+ 5 - 0
Gems/RecastNavigation/Code/recastnavigation_editor_private_files.cmake

@@ -0,0 +1,5 @@
+
+set(FILES
+    Source/RecastNavigationEditorSystemComponent.cpp
+    Source/RecastNavigationEditorSystemComponent.h
+)

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_editor_shared_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Source/RecastNavigationEditorModule.cpp
+)

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_editor_tests_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Tests/RecastNavigationEditorTest.cpp
+)

+ 6 - 0
Gems/RecastNavigation/Code/recastnavigation_private_files.cmake

@@ -0,0 +1,6 @@
+
+set(FILES
+    Source/RecastNavigationModuleInterface.h
+    Source/RecastNavigationSystemComponent.cpp
+    Source/RecastNavigationSystemComponent.h
+)

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_shared_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Source/RecastNavigationModule.cpp
+)

+ 4 - 0
Gems/RecastNavigation/Code/recastnavigation_tests_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Tests/RecastNavigationTest.cpp
+)

+ 1 - 0
Gems/RecastNavigation/Platform/Android/android_gem.cmake

@@ -0,0 +1 @@
+

+ 3 - 0
Gems/RecastNavigation/Platform/Android/android_gem.json

@@ -0,0 +1,3 @@
+{
+    "Tags": ["Android"],
+}

+ 1 - 0
Gems/RecastNavigation/Platform/Linux/linux_gem.cmake

@@ -0,0 +1 @@
+

+ 3 - 0
Gems/RecastNavigation/Platform/Linux/linux_gem.json

@@ -0,0 +1,3 @@
+{
+  "Tags": ["Linux"]
+}

+ 1 - 0
Gems/RecastNavigation/Platform/Mac/mac_gem.cmake

@@ -0,0 +1 @@
+

+ 3 - 0
Gems/RecastNavigation/Platform/Mac/mac_gem.json

@@ -0,0 +1,3 @@
+{
+  "Tags": ["Mac"]
+}

+ 1 - 0
Gems/RecastNavigation/Platform/Windows/windows_gem.cmake

@@ -0,0 +1 @@
+

+ 3 - 0
Gems/RecastNavigation/Platform/Windows/windows_gem.json

@@ -0,0 +1,3 @@
+{
+  "Tags": ["Windows"]
+}

+ 1 - 0
Gems/RecastNavigation/Platform/iOS/ios_gem.cmake

@@ -0,0 +1 @@
+

+ 3 - 0
Gems/RecastNavigation/Platform/iOS/ios_gem.json

@@ -0,0 +1,3 @@
+{
+    "Tags": ["iOS"]
+}

+ 18 - 0
Gems/RecastNavigation/Registry/assetprocessor_settings.setreg

@@ -0,0 +1,18 @@
+{
+    "Amazon": {
+        "AssetProcessor": {
+            "Settings": {
+                "ScanFolder RecastNavigation/Assets": {
+                    "watch": "@GEMROOT:RecastNavigation@/Assets",
+                    "recursive": 1,
+                    "order": 101
+                },
+                "ScanFolder RecastNavigation/Registry": {
+                    "watch": "@GEMROOT:RecastNavigation@/Registry",
+                    "recursive": 1,
+                    "order": 102
+                }
+            }
+        }
+    }
+}

+ 21 - 0
Gems/RecastNavigation/gem.json

@@ -0,0 +1,21 @@
+{
+    "gem_name": "RecastNavigation",
+    "display_name": "RecastNavigation",
+    "license": "Apache-2.0 Or MIT and zlib license for Recast library",
+    "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
+    "origin": "Open 3D Engine - o3de.org",
+    "origin_url": "https://github.com/o3de/o3de",
+    "type": "Code",
+    "summary": "Recast Navigation gem provides navigation features using Recast/Detour library that can be found at https://github.com/recastnavigation/recastnavigation",
+    "canonical_tags": [
+        "Gem"
+    ],
+    "user_tags": [
+        "Navigation"
+    ],
+    "icon_path": "preview.png",
+    "requirements": "This gem requires https://github.com/recastnavigation/recastnavigation",
+    "documentation_url": "",
+    "dependencies": [],
+    "restricted": "RecastNavigation"
+}

+ 3 - 0
Gems/RecastNavigation/preview.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:248e3ffe1fc9ffc02afb2ba8914e222a5a5d13ac45a48b98c95ee062e959a94c
+size 4475

+ 1 - 0
engine.json

@@ -6,6 +6,7 @@
     "O3DECopyrightYear": 2021,
     "O3DEBuildNumber": 0,
     "external_subdirectories": [
+        "Gems/RecastNavigation",
         "Gems/Achievements",
         "Gems/AssetValidation",
         "Gems/Atom",