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
//! `<contact>` element AST.
/// All `<contact>` data for a model.
#[derive(Default, Clone, Debug)]
pub struct Contact {
/// `<contact><pair>` overrides.
pub pairs: Vec<ContactPair>,
/// `<contact><exclude>` exclusions.
pub excludes: Vec<ContactExclude>,
}
/// `<contact><pair>` element.
#[derive(Clone, Debug, Default)]
pub struct ContactPair {
/// Pair name (optional).
pub name: Option<String>,
/// Default class.
pub class: Option<String>,
/// Geom name 1.
pub geom1: String,
/// Geom name 2.
pub geom2: String,
/// `condim` override (1, 3, 4, or 6).
pub condim: Option<u32>,
/// Friction `(slide, spin, roll)` override.
pub friction: Option<[f64; 3]>,
/// Margin override.
pub margin: Option<f64>,
/// Gap override.
pub gap: Option<f64>,
}
/// `<contact><exclude>` element.
#[derive(Clone, Debug, Default)]
pub struct ContactExclude {
/// Exclude name (optional).
pub name: Option<String>,
/// Body name 1.
pub body1: String,
/// Body name 2.
pub body2: String,
}