3
0

PhysXDebugBus.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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/EBus/EBus.h>
  10. namespace PhysXDebug
  11. {
  12. class DebugRequests
  13. : public AZ::EBusTraits
  14. {
  15. public:
  16. // EBusTraits overrides
  17. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  18. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
  19. /// Toggle the PhysX debug gem visualization on/off.
  20. /// @param enabled to enable visualization or not.
  21. virtual void SetVisualization(bool enabled) = 0;
  22. /// Toggle between minimal physx::PxVisualizationParameter::eCOLLISION_SHAPES and eCOLLISION_EDGES
  23. /// and full visualization everything in physx::PxVisualizationParameter configuration.
  24. /// Will switch between minimal and full on call.
  25. virtual void ToggleVisualizationConfiguration() = 0;
  26. /// Toggle editor mode collider proximity debug visualization on/off (disabled by default)
  27. virtual void ToggleColliderProximityDebugVisualization() = 0;
  28. /// Enables PhysX debug visualization and also sets the culling box size.
  29. /// @param cullingBoxSize specifies the new culling box size to use. A value of 0 or less turns off culling.
  30. virtual void SetCullingBoxSize(float cullingBoxSize) = 0;
  31. /// Toggle the visual culling box.
  32. /// The visual culling box is disabled by default.
  33. virtual void ToggleCullingWireFrame() = 0;
  34. };
  35. using PhysXDebugRequestBus = AZ::EBus<DebugRequests>;
  36. } // namespace PhysXDebug