ShapeTestUtils.cpp 679 B

1234567891011121314151617181920212223
  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. #include <ShapeTestUtils.h>
  9. #include <AzCore/Component/Entity.h>
  10. #include <LmbrCentral/Shape/ShapeComponentBus.h>
  11. namespace UnitTest
  12. {
  13. bool IsPointInside(const AZ::Entity& entity, const AZ::Vector3& point)
  14. {
  15. bool inside = false;
  16. LmbrCentral::ShapeComponentRequestsBus::EventResult(
  17. inside, entity.GetId(), &LmbrCentral::ShapeComponentRequests::IsPointInside, point);
  18. return inside;
  19. }
  20. } // namespace UnitTest