-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_structs.h
134 lines (92 loc) · 2.55 KB
/
gen_structs.h
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
cpCircleShape circle_shape {
Radius( cpFloat r ),
Center( cpVect c ),
};
cpSegmentShape segment_shape {
// Shape( cpShape shape ),
A( cpVect a ),
B( cpVect b ),
Norm( cpVect n ),
Thickness( float r ),
TA( cpVect ta ),
TB( cpVect tb ),
TNorm( cpVect tn ),
};
cpPolyShape poly {
// Shape( cpShape shape ),
NumVerts( int_readonly numVerts ),
Vects( cpVectArray verts ),
// cpPolyShapeAxis *axes;
TVerts( cpVectArray tVerts ),
// cpPolyShapeAxis *tAxes;
};
cpConstraint constr {
MaxForce( cpFloat maxForce ),
ErrorBias( cpFloat errorBias ),
MaxBias( cpFloat maxBias ),
};
cpPinJoint pin_joint {
// cpConstraint constraint;
Anchor1( cpVect anchr1 ),
Anchor2( cpVect anchr2 ),
Dist( cpFloat dist),
R1( cpVect r1 ),
R2( cpVect r2 ),
Vect( cpVect n ),
NMass( cpFloat nMass ),
JNAcc( cpFloat jnAcc ),
Bias( cpFloat bias ),
};
cpSlideJoint slide_joint {
// cpJoint joint;
Anchor1( cpVect anchr1 ),
Anchor2( cpVect anchr2 ),
Min( cpFloat min ),
Max( cpFloat max ),
R1( cpVect r1 ),
R2( cpVect r2 ),
Vect( cpVect n ),
NMass( cpFloat nMass ),
JNAcc( cpFloat jnAcc ),
Bias( cpFloat bias ),
};
cpPivotJoint pivot_joint {
// cpJoint joint;
Anchor1( cpVect anchr1 ),
Anchor2( cpVect anchr2 ),
R1( cpVect r1 ),
R2( cpVect r2 ),
JAcc( cpVect jAcc ),
Bias( cpVect bias ),
};
cpGrooveJoint groove_joint {
// cpJoint joint;
GrvN( cpVect grv_n ),
GrvA( cpVect grv_a ),
GrvB( cpVect grv_b ),
Anchor2( cpVect anchr2 ),
GrvTn( cpVect grv_tn ),
Clamp( cpFloat clamp ),
R1( cpVect r1 ),
R2( cpVect r2 ),
JAcc( cpVect jAcc ),
Bias( cpVect bias ),
};
// Data structure for tracking collisions between shapes.
cpArbiter arbiter {
// Information on the contact points between the objects.
// Calculated before calling the pre-solve collision handler
// Override them with custom values if you want specialized behavior
E( cpFloat e ),
U( cpFloat u ),
// Used for surface_v calculations, implementation may change
Surface_vr( cpVect surface_vr),
// struct cpCollisionHandler *handler;
};
cpBB bb {
L( cpFloat l ),
B( cpFloat b ),
R( cpFloat r ),
T( cpFloat t ),
} cpBB;
// vim: et