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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use {std};
use {constraint};
use stash::Stash;
use vec_map::VecMap;
pub mod group;
pub use self::group::Group;
#[cfg_attr(feature = "derive_serdes", derive(Serialize, Deserialize))]
#[derive(Clone,Debug,PartialEq)]
pub struct Contact {
pub constraint : constraint::Planar
}
#[cfg_attr(feature = "derive_serdes", derive(Serialize, Deserialize))]
#[derive(Clone,Debug,PartialEq)]
pub struct Colliding {
pub contact : Contact,
pub restitution : f64
}
#[derive(Clone,Debug,Default)]
pub (crate) struct Manager {
pub contact_groups : Stash <Group>,
pub object_groups_static : VecMap <group::KeyType>,
pub object_groups_dynamic : VecMap <group::KeyType>
}
impl std::ops::Deref for Colliding {
type Target = Contact;
fn deref (&self) -> &Contact {
&self.contact
}
}
impl Eq for Colliding { }
impl PartialOrd for Colliding {
fn partial_cmp (&self, _rhs : &Self) -> Option <std::cmp::Ordering> {
unreachable!()
}
}
impl Ord for Colliding {
fn cmp (&self, _other : &Self) -> std::cmp::Ordering {
unreachable!()
}
}