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
41
42
43
44
45
46
47
// Copyright Brandon Ly 2018.
// Copyright Jeron A. Lau 2018.
// Dual-licensed under either the MIT License or the Boost Software License,
// Version 1.0.  (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

//! The Cala Physics Engine.

#![warn(missing_docs)]
#![doc(
	html_logo_url = "http://plopgrizzly.com/cala/icon.png",
	html_favicon_url = "http://plopgrizzly.com/cala/icon.ico",
	html_root_url = "http://plopgrizzly.com/cala/"
)]

extern crate aci_png; // For loading default icon
extern crate ami; // For octree

// mod world;
mod derivative;
mod rigid_body;
mod state;
mod kinematics;
mod mass;

/// Prelude module.
pub mod prelude;

pub use ami::{ BBox };
// pub use world::{ World, Object };
pub use derivative::Derivative;
pub use rigid_body::RigidBody;
pub use state::State;
pub use mass::Mass;

mod constants {
	pub const GRAVITY: f32 = 9.81;
	#[allow(unused)] // TODO
	pub const METER: f32 = 1.0;
	#[allow(unused)] // TODO
	pub const DT: f32 = 1.0 / 100.0;
}

/// The integration step of the RK4 method
pub fn integrate(_state: State, _t: f32, _dt: f32) {
	
}