EmptyShapeTest.cpp 680 B

123456789101112131415161718192021222324
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2024 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #include <TestFramework.h>
  5. #include <Tests/Shapes/EmptyShapeTest.h>
  6. #include <Jolt/Physics/Collision/Shape/EmptyShape.h>
  7. #include <Jolt/Physics/Body/BodyCreationSettings.h>
  8. #include <Layers.h>
  9. JPH_IMPLEMENT_RTTI_VIRTUAL(EmptyShapeTest)
  10. {
  11. JPH_ADD_BASE_CLASS(EmptyShapeTest, Test)
  12. }
  13. void EmptyShapeTest::Initialize()
  14. {
  15. // Floor
  16. CreateFloor();
  17. // Empty shape
  18. mBodyInterface->CreateAndAddBody(BodyCreationSettings(new EmptyShape(), RVec3(0, 10, 0), Quat::sIdentity(), EMotionType::Dynamic, Layers::MOVING), EActivation::Activate);
  19. }