RecastNavigationPhysXProviderComponent.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Component/Component.h>
  10. #include <AzFramework/Components/ComponentAdapter.h>
  11. #include <Misc/RecastNavigationConstants.h>
  12. #include <Misc/RecastNavigationPhysXProviderComponentController.h>
  13. #include <Misc/RecastNavigationPhysXProviderConfig.h>
  14. namespace RecastNavigation
  15. {
  16. //! This component requires an axis aligned box shape component that defines a world space to collect geometry from
  17. //! static PhysX colliders present within the bounds of a shape component on the same entity.
  18. //! The geometry is collected in portions of vertical tiles and is fed into @RecastNavigationMeshComponent.
  19. //!
  20. //! @note You can provide your implementation of collecting geometry instead of this component.
  21. //! If you do, in your component's @GetProvidedServices specify AZ_CRC_CE("RecastNavigationProviderService"),
  22. //! which is needed by @RecastNavigationMeshComponent.
  23. class RecastNavigationPhysXProviderComponent final
  24. : public AzFramework::Components::ComponentAdapter<RecastNavigationPhysXProviderComponentController, RecastNavigationPhysXProviderConfig>
  25. {
  26. using BaseClass = AzFramework::Components::ComponentAdapter<RecastNavigationPhysXProviderComponentController, RecastNavigationPhysXProviderConfig>;
  27. public:
  28. AZ_COMPONENT(RecastNavigationPhysXProviderComponent, RecastNavigationPhysXProviderComponentTypeId, BaseClass);
  29. RecastNavigationPhysXProviderComponent() = default;
  30. explicit RecastNavigationPhysXProviderComponent(const RecastNavigationPhysXProviderConfig& config);
  31. static void Reflect(AZ::ReflectContext* context);
  32. };
  33. } // namespace RecastNavigation