Browse Source

Renamed provider bus to be a generic one

Signed-off-by: Olex Lozitskiy <[email protected]>
Olex Lozitskiy 3 năm trước cách đây
mục cha
commit
19e59a2c63

+ 4 - 4
Gems/RecastNavigation/Code/Include/RecastNavigation/RecastNavigationPhysxProviderBus.h → Gems/RecastNavigation/Code/Include/RecastNavigation/RecastNavigationProviderBus.h

@@ -13,8 +13,8 @@
 
 namespace RecastNavigation
 {
-    //! The interface for @RecastNavigationPhysXProviderRequestBus
-    class RecastNavigationPhysXProviderRequests
+    //! The interface for @RecastNavigationProviderRequestBus
+    class RecastNavigationProviderRequests
         : public AZ::ComponentBus
     {
     public:
@@ -35,6 +35,6 @@ namespace RecastNavigation
         virtual AZ::Aabb GetWorldBounds() const = 0;
     };
 
-    //! Request EBus for a navigation PhysX provider component that collects geometry data from PhysX world.
-    using RecastNavigationPhysXProviderRequestBus = AZ::EBus<RecastNavigationPhysXProviderRequests>;
+    //! Request EBus for a navigation provider component that collects geometry data.
+    using RecastNavigationProviderRequestBus = AZ::EBus<RecastNavigationProviderRequests>;
 } // namespace RecastNavigation

+ 3 - 3
Gems/RecastNavigation/Code/Source/Components/RecastNavigationMeshComponent.cpp

@@ -12,7 +12,7 @@
 #include <AzCore/Console/IConsole.h>
 #include <AzCore/Debug/Budget.h>
 #include <AzCore/Serialization/SerializeContext.h>
-#include <RecastNavigation/RecastNavigationPhysXProviderBus.h>
+#include <RecastNavigation/RecastNavigationProviderBus.h>
 
 AZ_CVAR(
     bool, cl_navmesh_debug, false, nullptr, AZ::ConsoleFunctorFlags::Null,
@@ -61,8 +61,8 @@ namespace RecastNavigation
         AZStd::vector<AZStd::shared_ptr<TileGeometry>> tiles;
 
         // Blocking call.
-        RecastNavigationPhysXProviderRequestBus::EventResult(tiles, GetEntityId(),
-            &RecastNavigationPhysXProviderRequests::CollectGeometry,
+        RecastNavigationProviderRequestBus::EventResult(tiles, GetEntityId(),
+            &RecastNavigationProviderRequests::CollectGeometry,
             m_meshConfig.m_tileSize, aznumeric_cast<float>(m_meshConfig.m_borderSize) * m_meshConfig.m_cellSize);
 
         {

+ 3 - 3
Gems/RecastNavigation/Code/Source/Components/RecastNavigationPhysXProviderComponent.cpp

@@ -34,18 +34,18 @@ namespace RecastNavigation
 
         if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
         {
-            behaviorContext->Class<RecastNavigationPhysXProviderComponent>()->RequestBus("RecastNavigationPhysXProviderRequestBus");
+            behaviorContext->Class<RecastNavigationPhysXProviderComponent>()->RequestBus("RecastNavigationProviderRequestBus");
         }
     }
 
     void RecastNavigationPhysXProviderComponent::Activate()
     {
-        RecastNavigationPhysXProviderRequestBus::Handler::BusConnect(GetEntityId());
+        RecastNavigationProviderRequestBus::Handler::BusConnect(GetEntityId());
     }
 
     void RecastNavigationPhysXProviderComponent::Deactivate()
     {
-        RecastNavigationPhysXProviderRequestBus::Handler::BusDisconnect();
+        RecastNavigationProviderRequestBus::Handler::BusDisconnect();
     }
 
     AZStd::vector<AZStd::shared_ptr<TileGeometry>> RecastNavigationPhysXProviderComponent::CollectGeometry(

+ 3 - 3
Gems/RecastNavigation/Code/Source/Components/RecastNavigationPhysXProviderComponent.h

@@ -12,7 +12,7 @@
 #include <AzCore/Math/Aabb.h>
 #include <Misc/RecastHelpers.h>
 #include <Misc/RecastNavigationPhysXProviderCommon.h>
-#include <RecastNavigation/RecastNavigationPhysXProviderBus.h>
+#include <RecastNavigation/RecastNavigationProviderBus.h>
 
 namespace RecastNavigation
 {
@@ -25,7 +25,7 @@ namespace RecastNavigation
     //!       which is needed by @RecastNavigationMeshComponent.
     class RecastNavigationPhysXProviderComponent final
         : public AZ::Component
-        , public RecastNavigationPhysXProviderRequestBus::Handler
+        , public RecastNavigationProviderRequestBus::Handler
         , public RecastNavigationPhysXProviderCommon
     {
     public:
@@ -42,7 +42,7 @@ namespace RecastNavigation
         void Deactivate() override;
         //! @}
 
-        //! RecastNavigationPhysXProviderRequestBus overrides ...
+        //! RecastNavigationProviderRequestBus overrides ...
         //! @{
         AZStd::vector<AZStd::shared_ptr<TileGeometry>> CollectGeometry(float tileSize, float borderSize) override;
         AZ::Aabb GetWorldBounds() const override;

+ 1 - 1
Gems/RecastNavigation/Code/Source/EditorComponents/EditorRecastNavigationPhysXProviderComponent.h

@@ -11,7 +11,7 @@
 #include <AzCore/Component/Component.h>
 #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
 #include <Misc/RecastNavigationPhysXProviderCommon.h>
-#include <RecastNavigation/RecastNavigationPhysXProviderBus.h>
+#include <RecastNavigation/RecastNavigationProviderBus.h>
 
 namespace RecastNavigation
 {

+ 3 - 3
Gems/RecastNavigation/Code/Source/Misc/RecastNavigationMeshCommon.cpp

@@ -12,7 +12,7 @@
 #include <AzCore/std/smart_ptr/make_shared.h>
 #include <AzFramework/Physics/PhysicsScene.h>
 #include <Misc/RecastNavigationMeshCommon.h>
-#include <RecastNavigation/RecastNavigationPhysXProviderBus.h>
+#include <RecastNavigation/RecastNavigationProviderBus.h>
 
 AZ_DEFINE_BUDGET(Navigation);
 
@@ -305,12 +305,12 @@ namespace RecastNavigation
         AZ::Aabb worldVolume = AZ::Aabb::CreateNull();
 
         dtNavMeshParams params = {};
-        RecastNavigationPhysXProviderRequestBus::EventResult(worldVolume, meshEntityId, &RecastNavigationPhysXProviderRequests::GetWorldBounds);
+        RecastNavigationProviderRequestBus::EventResult(worldVolume, meshEntityId, &RecastNavigationProviderRequests::GetWorldBounds);
 
         const RecastVector3 worldCenter(worldVolume.GetMin());
         rcVcopy(params.orig, &worldCenter.m_x);
 
-        RecastNavigationPhysXProviderRequestBus::EventResult(params.maxTiles, meshEntityId, &RecastNavigationPhysXProviderRequests::GetNumberOfTiles, tileSize);
+        RecastNavigationProviderRequestBus::EventResult(params.maxTiles, meshEntityId, &RecastNavigationProviderRequests::GetNumberOfTiles, tileSize);
 
         // in world units
         params.tileWidth = tileSize;

+ 1 - 1
Gems/RecastNavigation/Code/recastnavigation_api_files.cmake

@@ -10,5 +10,5 @@ set(FILES
     Include/RecastNavigation/RecastNavigationBus.h
     Include/RecastNavigation/DetourNavigationBus.h
     Include/RecastNavigation/RecastNavigationMeshBus.h
-    Include/RecastNavigation/RecastNavigationPhysXProviderBus.h
+    Include/RecastNavigation/RecastNavigationProviderBus.h
 )