1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use crateEnvironment;
use crateObject;
/// You can use the `start_sandbox` function to start the simulation of a sandbox environment.
///
/// \*It's still pretty experimental.
///
/// # Examples
/// ```
/// use openphys::utils::environment::Environment;
/// use openphys::utils::object::Object;
/// use openphys::modules::sandbox::start_sandbox;
///
/// fn main() {
/// let mut objects = vec![
/// Object { mass: 1.0, position: [0.0, 1.0, 0.0], ..Object::default() },
/// Object { mass: 10.0, position: [0.0, 2.0, 0.0], ..Object::default() },
/// ];
///
/// let mut env = Environment::default();
///
/// let time_step: f64 = 0.1;
///
/// let result = start_sandbox(&mut env, &mut objects, time_step);
/// }
/// ```