PlayRho  2.0.0
An interactive physics engine & library.
PlayRho API Documentation

Overview

Hello and welcome to PlayRho's API documentation!

PlayRho is an interactive, real-time oriented, C++17 based, physics engine and library currently best suited for 2-dimensional games. To view its source code, please see: https://github.com/louis-langholtz/PlayRho. For issues, visit: https://github.com/louis-langholtz/PlayRho/issues. For mathematical insight into how a physics engine works, see: Erin Catto's 2009 Modeling and Solving Constraints slides.

Getting Started

For coding, purists may want to begin by just including the World.hpp header file and making an instance of the playrho::d2::World class. Here's what this might look like:

int main()
{
auto world = playrho::d2::World{};
const auto bodyID = world.CreateBody();
// do more things with the world instance and body identifier (bodyID).
return 0; // world and associated resources go away automatically
}
Definitions of the World class and closely related code.
Definition of an independent and simulatable "world".
Definition: World.hpp:695
friend BodyID CreateBody(World &world, const Body &body, bool resetMassData)
Creates a rigid body within the world that's a copy of the given one.
Definition: World.cpp:50

Pragmatists may instead want to begin by including this file, BasicAPI.hpp, which includes headers for most of the entire PlayRho public API.

An Entire Application

For a more elaborate example, that's of an entire application, see HelloWorld.cpp.

See also
playrho::d2::World, Physical Entities