The Gravel v3 SDK enables software developers using C/C++, Delphi, etc, to develop applications which model the behaviour of astronomical objects in 3D space according to Newton's Law of Gravity.
The Gravel v3 SDK contains the following folders:
| Demo | An application, written in ANSI C, which demonstrates how to use the SDK. |
| Docs | This SDK documentation. |
| Include | The C/C++ header files describing the API of the SDK. |
| Lib | The DLL's lib file (Visual C++ 2003/2005). |
| Redist | The DLL containing the Gravel Physics Engine. |
| Source | Extracts from the source code. |
Writing an application which uses the Gravel v3 Physics Engine involves four distinct steps:
Create a Gravel Scene
Gravel scenes are created by calling createGravelScene or createGravelSceneWithData which returns a handle to the newly created scene.
This handle is the first parameter of all the other API functions.
Add astronomical objects to the Gravel Scene
Astronomical objects are added to a Gravel scene by calling addGravelObject and specifying mass, radii, location and velocity.
Run the simulation
A typical application will alternate between two distinct activities:
| Advancing the simulated time. | The simulation is advanced in time by calling advanceGravelTime and specifying the number of seconds (or minutes, or hours) that should be simulated. |
| Retrieving and displaying the state of the astronomical objects. | The state of each astronomical object is retrieved by calling getGravelObjectCPointer for each astronomical object in the Gravel scene. |
Delete the Gravel Scene
The Gravel scene is destroyed by calling deleteGravelScene.
For more detailed information, see the Tutorial.
Comments and suggestions are always welcome,
and can be submitted via the feedback page.