载入中...
搜索中...
未找到
PhysicsWorldFactory.cpp
浏览该文件的文档.
15World3D *Physics::newWorld3DWithBackend(const std::string &backend, float gravityX, float gravityY, float gravityZ,
17 if (backend != "box3d" && backend != "jolt") throw eve::Exception("Unknown rigid backend: %s", backend.c_str());
18 auto result = World3D::createWithBackend(backend == "jolt" ? RigidBackend3D::Jolt : RigidBackend3D::Box3D, gravityX,
World3D * newWorld3D(float gravityX, float gravityY, float gravityZ, bool sleep=true)
Create a 3D Box3D physics world. Coordinates are meters (Box3D native); +Y is up by convention.
Definition PhysicsWorldFactory.cpp:11
World3D * newWorld3DWithBackend(const std::string &backend, float gravityX, float gravityY, float gravityZ, bool sleep=true)
Compatibility script factory selecting "box3d" or "jolt" explicitly.
Definition PhysicsWorldFactory.cpp:15
World * newWorld(float gravityX, float gravityY, bool sleep=true)
Create a 2D Box2D physics world.
Definition PhysicsWorldFactory.cpp:7
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:47
static eve::Result< std::unique_ptr< World3D > > createWithBackend(RigidBackend3D backend, float gravityX, float gravityY, float gravityZ, bool sleep, eve::PersistentId instanceId=eve::PersistentId::nil())
Creates a world with an explicit solver; absent providers return Unsupported without fallback....
Definition World3D.cpp:55
Box2D world wrapper (2D physics) with pixel-space coordinates. Handles stepping, gravity,...
Definition World.h:44