Codebase list sugar-pippy-activity / 5fa0238
Fix conflict with Turkish translations Pootle Translation 15 years ago
33 changed file(s) with 14186 addition(s) and 303 deletion(s). Raw diff Collapse all Expand all
+222
-206
MANIFEST less more
00 NEWS
1 pippy_app.py
2 setup.py
31 activity.py
4 library/pippy/__init__.py
5 library/pippy/query.py
6 library/pippy/console.py
7 library/pippy/sound.py
8 library/pippy/game.py
9 po/ur.po
10 po/th.po
11 po/bn.po
12 po/af.po
13 po/am.po
14 po/gu.po
15 po/pap.po
16 po/ay.po
17 po/ha.po
18 po/pt.po
19 po/es.po
20 po/fr.po
21 po/km.po
22 po/hi.po
23 po/fa.po
24 po/sl.po
25 po/tpi.po
26 po/en.po
27 po/mk.po
28 po/bn_IN.po
29 po/el.po
30 po/nl.po
31 po/pt_BR.po
32 po/mr.po
33 po/ff.po
34 po/en_US.po
35 po/mvo.po
36 po/ml.po
37 po/ro.po
38 po/mn.po
39 po/ht.po
40 po/zh_CN.po
41 po/nb.po
42 po/de.po
43 po/pseudo.po
44 po/ca.po
45 po/yo.po
46 po/ne.po
47 po/is.po
48 po/si.po
49 po/ja.po
50 po/ar.po
51 po/ps.po
52 po/tr.po
53 po/it.po
54 po/ig.po
55 po/ru.po
56 po/bg.po
57 po/pis.po
58 po/pl.po
59 po/Pippy.pot
60 po/ko.po
61 po/rw.po
62 po/vi.po
63 po/qu.po
64 po/pa.po
65 po/dz.po
66 po/sd.po
67 po/fa_AF.po
68 po/zh_TW.po
69 po/te.po
70 data/python/function
71 data/python/interpreter
72 data/python/if
73 data/python/recursion
74 data/math/pascal
75 data/math/times
76 data/math/sierpinski
77 data/math/fibonacci
78 data/math/guess
79 data/sound/sequence
80 data/sound/playSine
81 data/sound/playWave
82 data/sound/getSoundList
83 data/string/hello
84 data/string/thanks
85 data/graphics/tree
86 data/graphics/slideshow
87 data/graphics/camera
88 data/graphics/pong
89 data/graphics/lines
90 data/graphics/snow
91 data/graphics/jump
92 data/graphics/bounce
932 activity/activity-default.svg
943 activity/activity-icon.svg
954 activity/activity.info
5 data/graphics/bounce
6 data/graphics/camera
7 data/graphics/jump
8 data/graphics/lines
9 data/graphics/physics
10 data/graphics/pong
11 data/graphics/slideshow
12 data/graphics/snow
13 data/graphics/tree
14 data/math/fibonacci
15 data/math/guess
16 data/math/pascal
17 data/math/sierpinski
18 data/math/times
19 data/python/function
20 data/python/if
21 data/python/interpreter
22 data/python/recursion
23 data/sound/getSoundList
24 data/sound/playSine
25 data/sound/playWave
26 data/sound/sequence
27 data/string/hello
28 data/string/thanks
29 library/pippy/__init__.py
30 library/pippy/console.py
31 library/pippy/game.py
32 library/pippy/physics/Box2D2.py
33 library/pippy/physics/__init__.py
34 library/pippy/physics/add_objects.py
35 library/pippy/physics/box2d/__init__.py
36 library/pippy/physics/box2d/box2d_linux32/Box2D2.py
37 library/pippy/physics/box2d/box2d_linux32/_Box2D2.so
38 library/pippy/physics/box2d/box2d_linux32/__init__.py
39 library/pippy/physics/box2d/box2d_linux64/Box2D2.py
40 library/pippy/physics/box2d/box2d_linux64/_Box2D2.so
41 library/pippy/physics/box2d/box2d_linux64/__init__.py
42 library/pippy/physics/callbacks.py
43 library/pippy/physics/camera.py
44 library/pippy/physics/drawing.py
45 library/pippy/physics/elements.py
46 library/pippy/physics/locals.py
47 library/pippy/physics/menu.py
48 library/pippy/physics/tools.py
49 library/pippy/physics/tools_poly.py
50 library/pippy/query.py
51 library/pippy/sound.py
52 locale/af/LC_MESSAGES/org.laptop.Pippy.mo
53 locale/af/activity.linfo
54 locale/am/LC_MESSAGES/org.laptop.Pippy.mo
55 locale/am/activity.linfo
56 locale/ar/LC_MESSAGES/org.laptop.Pippy.mo
57 locale/ar/activity.linfo
58 locale/ay/LC_MESSAGES/org.laptop.Pippy.mo
59 locale/ay/activity.linfo
60 locale/bg/LC_MESSAGES/org.laptop.Pippy.mo
61 locale/bg/activity.linfo
62 locale/bn/LC_MESSAGES/org.laptop.Pippy.mo
63 locale/bn/activity.linfo
64 locale/bn_IN/LC_MESSAGES/org.laptop.Pippy.mo
65 locale/bn_IN/activity.linfo
66 locale/ca/LC_MESSAGES/org.laptop.Pippy.mo
9667 locale/ca/activity.linfo
97 locale/ca/LC_MESSAGES/org.laptop.Pippy.mo
68 locale/de/LC_MESSAGES/org.laptop.Pippy.mo
69 locale/de/activity.linfo
70 locale/dz/LC_MESSAGES/org.laptop.Pippy.mo
71 locale/dz/activity.linfo
72 locale/el/LC_MESSAGES/org.laptop.Pippy.mo
73 locale/el/activity.linfo
74 locale/en/LC_MESSAGES/org.laptop.Pippy.mo
75 locale/en/activity.linfo
76 locale/en_US/LC_MESSAGES/org.laptop.Pippy.mo
77 locale/en_US/activity.linfo
78 locale/es/LC_MESSAGES/org.laptop.Pippy.mo
79 locale/es/activity.linfo
80 locale/fa/LC_MESSAGES/org.laptop.Pippy.mo
81 locale/fa/activity.linfo
82 locale/fa_AF/LC_MESSAGES/org.laptop.Pippy.mo
83 locale/fa_AF/activity.linfo
84 locale/ff/LC_MESSAGES/org.laptop.Pippy.mo
85 locale/ff/activity.linfo
86 locale/fr/LC_MESSAGES/org.laptop.Pippy.mo
87 locale/fr/activity.linfo
88 locale/gu/LC_MESSAGES/org.laptop.Pippy.mo
89 locale/gu/activity.linfo
90 locale/ha/LC_MESSAGES/org.laptop.Pippy.mo
91 locale/ha/activity.linfo
92 locale/hi/LC_MESSAGES/org.laptop.Pippy.mo
93 locale/hi/activity.linfo
94 locale/ht/LC_MESSAGES/org.laptop.Pippy.mo
95 locale/ht/activity.linfo
96 locale/ig/LC_MESSAGES/org.laptop.Pippy.mo
97 locale/ig/activity.linfo
98 locale/is/LC_MESSAGES/org.laptop.Pippy.mo
99 locale/is/activity.linfo
100 locale/it/LC_MESSAGES/org.laptop.Pippy.mo
101 locale/it/activity.linfo
102 locale/ja/LC_MESSAGES/org.laptop.Pippy.mo
103 locale/ja/activity.linfo
104 locale/km/LC_MESSAGES/org.laptop.Pippy.mo
105 locale/km/activity.linfo
106 locale/ko/LC_MESSAGES/org.laptop.Pippy.mo
107 locale/ko/activity.linfo
108 locale/mk/LC_MESSAGES/org.laptop.Pippy.mo
109 locale/mk/activity.linfo
110 locale/ml/LC_MESSAGES/org.laptop.Pippy.mo
111 locale/ml/activity.linfo
112 locale/mn/LC_MESSAGES/org.laptop.Pippy.mo
113 locale/mn/activity.linfo
114 locale/mr/LC_MESSAGES/org.laptop.Pippy.mo
115 locale/mr/activity.linfo
116 locale/mvo/LC_MESSAGES/org.laptop.Pippy.mo
117 locale/mvo/activity.linfo
118 locale/nb/LC_MESSAGES/org.laptop.Pippy.mo
119 locale/nb/activity.linfo
120 locale/ne/LC_MESSAGES/org.laptop.Pippy.mo
121 locale/ne/activity.linfo
122 locale/nl/LC_MESSAGES/org.laptop.Pippy.mo
123 locale/nl/activity.linfo
124 locale/pa/LC_MESSAGES/org.laptop.Pippy.mo
125 locale/pa/activity.linfo
126 locale/pap/LC_MESSAGES/org.laptop.Pippy.mo
127 locale/pap/activity.linfo
128 locale/pis/LC_MESSAGES/org.laptop.Pippy.mo
129 locale/pis/activity.linfo
130 locale/pl/LC_MESSAGES/org.laptop.Pippy.mo
131 locale/pl/activity.linfo
132 locale/ps/LC_MESSAGES/org.laptop.Pippy.mo
133 locale/ps/activity.linfo
134 locale/pt/LC_MESSAGES/org.laptop.Pippy.mo
135 locale/pt/activity.linfo
136 locale/pt_BR/LC_MESSAGES/org.laptop.Pippy.mo
137 locale/pt_BR/activity.linfo
138 locale/qu/LC_MESSAGES/org.laptop.Pippy.mo
139 locale/qu/activity.linfo
140 locale/ro/LC_MESSAGES/org.laptop.Pippy.mo
141 locale/ro/activity.linfo
142 locale/ru/LC_MESSAGES/org.laptop.Pippy.mo
143 locale/ru/activity.linfo
144 locale/rw/LC_MESSAGES/org.laptop.Pippy.mo
145 locale/rw/activity.linfo
146 locale/sd/LC_MESSAGES/org.laptop.Pippy.mo
147 locale/sd/activity.linfo
148 locale/si/LC_MESSAGES/org.laptop.Pippy.mo
98149 locale/si/activity.linfo
99 locale/si/LC_MESSAGES/org.laptop.Pippy.mo
100 locale/pseudo/activity.linfo
101 locale/pseudo/LC_MESSAGES/org.laptop.Pippy.mo
102 locale/ro/activity.linfo
103 locale/ro/LC_MESSAGES/org.laptop.Pippy.mo
104 locale/ha/activity.linfo
105 locale/ha/LC_MESSAGES/org.laptop.Pippy.mo
106 locale/fa/activity.linfo
107 locale/fa/LC_MESSAGES/org.laptop.Pippy.mo
108 locale/es/activity.linfo
109 locale/es/LC_MESSAGES/org.laptop.Pippy.mo
110 locale/pap/activity.linfo
111 locale/pap/LC_MESSAGES/org.laptop.Pippy.mo
112 locale/mk/activity.linfo
113 locale/mk/LC_MESSAGES/org.laptop.Pippy.mo
114 locale/qu/activity.linfo
115 locale/qu/LC_MESSAGES/org.laptop.Pippy.mo
150 locale/sl/LC_MESSAGES/org.laptop.Pippy.mo
151 locale/sl/activity.linfo
152 locale/te/LC_MESSAGES/org.laptop.Pippy.mo
153 locale/te/activity.linfo
154 locale/th/LC_MESSAGES/org.laptop.Pippy.mo
116155 locale/th/activity.linfo
117 locale/th/LC_MESSAGES/org.laptop.Pippy.mo
118 locale/nb/activity.linfo
119 locale/nb/LC_MESSAGES/org.laptop.Pippy.mo
120 locale/km/activity.linfo
121 locale/km/LC_MESSAGES/org.laptop.Pippy.mo
122 locale/pt_BR/activity.linfo
123 locale/pt_BR/LC_MESSAGES/org.laptop.Pippy.mo
156 locale/tpi/LC_MESSAGES/org.laptop.Pippy.mo
157 locale/tpi/activity.linfo
158 locale/tr/LC_MESSAGES/org.laptop.Pippy.mo
159 locale/tr/activity.linfo
160 locale/ur/LC_MESSAGES/org.laptop.Pippy.mo
161 locale/ur/activity.linfo
162 locale/vi/LC_MESSAGES/org.laptop.Pippy.mo
163 locale/vi/activity.linfo
164 locale/yo/LC_MESSAGES/org.laptop.Pippy.mo
165 locale/yo/activity.linfo
166 locale/zh_CN/LC_MESSAGES/org.laptop.Pippy.mo
124167 locale/zh_CN/activity.linfo
125 locale/zh_CN/LC_MESSAGES/org.laptop.Pippy.mo
126 locale/tr/activity.linfo
127 locale/tr/LC_MESSAGES/org.laptop.Pippy.mo
128 locale/el/activity.linfo
129 locale/el/LC_MESSAGES/org.laptop.Pippy.mo
130 locale/it/activity.linfo
131 locale/it/LC_MESSAGES/org.laptop.Pippy.mo
132 locale/ff/activity.linfo
133 locale/ff/LC_MESSAGES/org.laptop.Pippy.mo
134 locale/ig/activity.linfo
135 locale/ig/LC_MESSAGES/org.laptop.Pippy.mo
136 locale/sl/activity.linfo
137 locale/sl/LC_MESSAGES/org.laptop.Pippy.mo
168 locale/zh_TW/LC_MESSAGES/org.laptop.Pippy.mo
138169 locale/zh_TW/activity.linfo
139 locale/zh_TW/LC_MESSAGES/org.laptop.Pippy.mo
140 locale/ml/activity.linfo
141 locale/ml/LC_MESSAGES/org.laptop.Pippy.mo
142 locale/sd/activity.linfo
143 locale/sd/LC_MESSAGES/org.laptop.Pippy.mo
144 locale/fr/activity.linfo
145 locale/fr/LC_MESSAGES/org.laptop.Pippy.mo
146 locale/ja/activity.linfo
147 locale/ja/LC_MESSAGES/org.laptop.Pippy.mo
148 locale/bn_IN/activity.linfo
149 locale/bn_IN/LC_MESSAGES/org.laptop.Pippy.mo
150 locale/bn/activity.linfo
151 locale/bn/LC_MESSAGES/org.laptop.Pippy.mo
152 locale/ay/activity.linfo
153 locale/ay/LC_MESSAGES/org.laptop.Pippy.mo
154 locale/mvo/activity.linfo
155 locale/mvo/LC_MESSAGES/org.laptop.Pippy.mo
156 locale/tpi/activity.linfo
157 locale/tpi/LC_MESSAGES/org.laptop.Pippy.mo
158 locale/af/activity.linfo
159 locale/af/LC_MESSAGES/org.laptop.Pippy.mo
160 locale/mr/activity.linfo
161 locale/mr/LC_MESSAGES/org.laptop.Pippy.mo
162 locale/ar/activity.linfo
163 locale/ar/LC_MESSAGES/org.laptop.Pippy.mo
164 locale/am/activity.linfo
165 locale/am/LC_MESSAGES/org.laptop.Pippy.mo
166 locale/hi/activity.linfo
167 locale/hi/LC_MESSAGES/org.laptop.Pippy.mo
168 locale/yo/activity.linfo
169 locale/yo/LC_MESSAGES/org.laptop.Pippy.mo
170 locale/is/activity.linfo
171 locale/is/LC_MESSAGES/org.laptop.Pippy.mo
172 locale/fa_AF/activity.linfo
173 locale/fa_AF/LC_MESSAGES/org.laptop.Pippy.mo
174 locale/pa/activity.linfo
175 locale/pa/LC_MESSAGES/org.laptop.Pippy.mo
176 locale/ko/activity.linfo
177 locale/ko/LC_MESSAGES/org.laptop.Pippy.mo
178 locale/ur/activity.linfo
179 locale/ur/LC_MESSAGES/org.laptop.Pippy.mo
180 locale/pt/activity.linfo
181 locale/pt/LC_MESSAGES/org.laptop.Pippy.mo
182 locale/dz/activity.linfo
183 locale/dz/LC_MESSAGES/org.laptop.Pippy.mo
184 locale/en_US/activity.linfo
185 locale/en_US/LC_MESSAGES/org.laptop.Pippy.mo
186 locale/mn/activity.linfo
187 locale/mn/LC_MESSAGES/org.laptop.Pippy.mo
188 locale/ne/activity.linfo
189 locale/ne/LC_MESSAGES/org.laptop.Pippy.mo
190 locale/de/activity.linfo
191 locale/de/LC_MESSAGES/org.laptop.Pippy.mo
192 locale/ps/activity.linfo
193 locale/ps/LC_MESSAGES/org.laptop.Pippy.mo
194 locale/en/activity.linfo
195 locale/en/LC_MESSAGES/org.laptop.Pippy.mo
196 locale/rw/activity.linfo
197 locale/rw/LC_MESSAGES/org.laptop.Pippy.mo
198 locale/bg/activity.linfo
199 locale/bg/LC_MESSAGES/org.laptop.Pippy.mo
200 locale/vi/activity.linfo
201 locale/vi/LC_MESSAGES/org.laptop.Pippy.mo
202 locale/pl/activity.linfo
203 locale/pl/LC_MESSAGES/org.laptop.Pippy.mo
204 locale/pis/activity.linfo
205 locale/pis/LC_MESSAGES/org.laptop.Pippy.mo
206 locale/ru/activity.linfo
207 locale/ru/LC_MESSAGES/org.laptop.Pippy.mo
208 locale/ht/activity.linfo
209 locale/ht/LC_MESSAGES/org.laptop.Pippy.mo
210 locale/te/activity.linfo
211 locale/te/LC_MESSAGES/org.laptop.Pippy.mo
212 locale/gu/activity.linfo
213 locale/gu/LC_MESSAGES/org.laptop.Pippy.mo
214 locale/nl/activity.linfo
215 locale/nl/LC_MESSAGES/org.laptop.Pippy.mo
170 pippy_app.py
171 po/Pippy.pot
172 po/af.po
173 po/am.po
174 po/ar.po
175 po/ay.po
176 po/bg.po
177 po/bn.po
178 po/bn_IN.po
179 po/ca.po
180 po/de.po
181 po/dz.po
182 po/el.po
183 po/en.po
184 po/en_US.po
185 po/es.po
186 po/fa.po
187 po/fa_AF.po
188 po/ff.po
189 po/fr.po
190 po/gu.po
191 po/ha.po
192 po/hi.po
193 po/ht.po
194 po/ig.po
195 po/is.po
196 po/it.po
197 po/ja.po
198 po/km.po
199 po/ko.po
200 po/mk.po
201 po/ml.po
202 po/mn.po
203 po/mr.po
204 po/mvo.po
205 po/nb.po
206 po/ne.po
207 po/nl.po
208 po/pa.po
209 po/pap.po
210 po/pis.po
211 po/pl.po
212 po/ps.po
213 po/pt.po
214 po/pt_BR.po
215 po/qu.po
216 po/ro.po
217 po/ru.po
218 po/rw.po
219 po/sd.po
220 po/si.po
221 po/sl.po
222 po/te.po
223 po/th.po
224 po/tpi.po
225 po/tr.po
226 po/ur.po
227 po/vi.po
228 po/yo.po
229 po/zh_CN.po
230 po/zh_TW.po
231 setup.py
0 30
1
2 * Allow playing sounds identified by full filesystem path in
3 pippy.sound (cscott)
4 * Resync Pippy's "Pippy metadata" with its activity.info, etc. (cscott)
5 * New default activity icon (Madeleine Ball)
6 * Trac #6323: Pippy's terminal and code editor font sizes are too big (brian)
7 * Add pippy.physics package and graphics/physics example (brian)
8 * Allow UTF-8 in Pippy source files. (cscott)
9
10 29
11
12 * Trac #8665, cont: further fixes for bundle-building.
13
14 28
15
16 * Trac #8665: Bundle-building was broken by a Sugar API change (trac #8136)
17
18 27
19
20 * Use a protected update_url.
21 * Updated license information in files; added 'license' field.
22 * Reverted bundlebuilder change: using .start("Pippy") makes modern
23 bundlebuilder complain:
24 WARNING:root:bundle_name deprecated, now comes from activity.info
25
26 26
27
28 * Bundlebuilder API change -- use .start("Pippy") instead of .start().
29
030 25
131
232 24
0 <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
1 <!ENTITY stroke_color "#010101">
2 <!ENTITY fill_color "#FFFFFF">
3 ]><svg enable-background="new 0 0 55 55" height="55px" version="1.1"
4 viewBox="0 0 55 55" width="55px" x="0px" y="0px" xml:space="preserve"
5 xmlns="http://www.w3.org/2000/svg"
6 xmlns:xlink="http://www.w3.org/1999/xlink"
7 ><g display="block" id="activity-icon"><path
8 d="M 28.497,48.507 C 34.485,48.507 43.377,45.669 43.377,37.322 C 43.377,32.6795 41.44125,30.14375 39.104125,28.651125 C 36.767,27.1585 38.482419,26.816027 39.758087,25.662766 C 39.42248,24.275242 37.206195,22.826987 36.262179,21.037968 C 34.005473,20.582994 27.526,19.113 30.314,19.113 C 30.314,19.113 36.946,22.777 42.58,19.853 C 44.168,19.03 47.012,15.185 47.012,12.533 C 47.012,9.88 37.831,6.814 35.045,6.814 C 32.257,6.814 29.886,10.661 29.886,10.661 C 24.312,10.661 12.043878,16.258005 12.043878,21.564005 C 12.043878,24.216505 16.585399,30.069973 19.144694,33.736352 C 22.438716,38.455279 27.257,31.3065 30.444,31.885 C 33.407,32.354 35.885,34.105 35.322,37.323 C 34.865,39.936 32.327,42.629 26.961,42.629 C 22.709,42.629 13.661,42.41 12.216,38.55 C 11.287,36.064 12.384,33.345 13.778,33.345 L 13.751,33.185 C 12.331,33.027 8.203,33.345 8.203,38.65 C 8.202,45.452 17.347,48.507 28.497,48.507 z "
9 fill="&fill_color;" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" />
10 <path d="M42.579,19.854c-2.623-0.287-6.611-2-7.467-5.022" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-width="3"/>
11 <circle cx="35.805" cy="10.96" fill="&stroke_color;" r="1.676"/>
12 </g></svg>
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
2 <!ENTITY ns_svg "http://www.w3.org/2000/svg">
3 <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
4 <!ENTITY stroke_color "#000000">
5 <!ENTITY fill_color "#FFFFFF">
6 ]><!--"-->
7 <svg version="1.1" id="Pippy_activity" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="47.585" height="49.326"
8 viewBox="0 0 47.585 49.326" overflow="visible" enable-background="new 0 0 47.585 49.326" xml:space="preserve">
9
10 <path
11 fill="&fill_color;" stroke="&stroke_color;" stroke-width="2" d="M 30.689595,16.460324 L 24.320145,12.001708 L 2.7550028,23.830689 L 23.319231,38.662412 L 45.157349,26.742438 L 36.877062,21.100925" id="path3195" />
12 <path
13 fill="&fill_color;" stroke="&stroke_color;" stroke-width="2"
14 nodetypes="cscscssscsssssccc"
15 d="M 12.201296,21.930888 C 13.063838,20.435352 17.035411,18.617621 20.372026,18.965837 C 22.109464,19.147161 24.231003,20.786115 24.317406,21.584638 C 24.401593,22.43057 25.386617,24.647417 26.88611,24.600494 C 28.114098,24.562065 28.61488,23.562481 28.992123,22.444401 C 28.992123,22.444401 28.564434,17.493894 31.897757,15.363536 C 32.836646,14.763482 35.806711,14.411448 37.249047,15.221493 C 38.691382,16.031536 37.648261,19.495598 36.785717,20.991133 C 35.923174,22.48667 32.967872,24.980813 32.967872,24.980813 C 31.242783,27.971884 29.235995,28.5001 26.338769,28.187547 C 23.859153,27.920046 22.434219,26.128159 21.837191,24.708088 C 21.323835,23.487033 20.047743,22.524906 18.388178,22.52176 C 17.218719,22.519542 14.854476,23.017137 16.212763,25.620664 C 16.687174,26.53 18.919175,28.917592 21.08204,29.521929 C 22.919903,30.035455 26.713699,31.223552 30.30027,31.418089 C 26.770532,33.262079 21.760623,32.530604 18.909599,31.658168 C 17.361253,30.887002 9.0350995,26.651992 12.201296,21.930888 z "
16 id="path2209" />
17 <path
18 fill="&fill_color;" stroke="&stroke_color;" stroke-width="1"
19 d="M 37.832194,18.895786 C 36.495131,19.851587 34.017797,22.097672 32.3528,21.069911"
20 id="path2211"
21 transform-center-y="-3.6171625"
22 transform-center-x="-0.50601649" />
23 <circle
24 fill="&stroke_color;" stroke="none" stroke-width="0"
25 cx="33.926998"
26 cy="6.073"
27 r="1.927"
28 id="circle2213"
29 transform="matrix(0.269108,-0.4665976,-0.472839,-0.2655557,26.503175,35.608682)"
30 />
31 </svg>
44 <path d="M28.497,48.507 c5.988,0,14.88-2.838,14.88-11.185c0-9.285-7.743-10.143-10.954-11.083c-3.549-0.799-5.913-1.914-6.055-3.455 c-0.243-2.642,1.158-3.671,3.946-3.671c0,0,6.632,3.664,12.266,0.74c1.588-0.823,4.432-4.668,4.432-7.32 c0-2.653-9.181-5.719-11.967-5.719c-2.788,0-5.159,3.847-5.159,3.847c-5.574,0-11.149,5.306-11.149,10.612 c0,5.305,5.333,9.455,11.707,10.612c2.963,0.469,5.441,2.22,4.878,5.438c-0.457,2.613-2.995,5.306-8.361,5.306 c-4.252,0-13.3-0.219-14.745-4.079c-0.929-2.486,0.168-5.205,1.562-5.205l-0.027-0.16c-1.42-0.158-5.548,0.16-5.548,5.465 C8.202,45.452,17.347,48.507,28.497,48.507z" fill="&fill_color;" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
55 <path d="M42.579,19.854c-2.623-0.287-6.611-2-7.467-5.022" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-width="3"/>
66 <circle cx="35.805" cy="10.96" fill="&stroke_color;" r="1.676"/>
7 </g></svg>
8
7 </g></svg><!-- " -->
33 service_name = org.laptop.Pippy
44 class = pippy_app.PippyActivity
55 icon = activity-icon
6 activity_version = 25
6 activity_version = 30
77 mime_types = text/x-python
88 show_launcher = yes
9
10 license = GPLv2+
11 update_url = http://wiki.laptop.org/go/Activities/G1G1
0 #!/usr/bin/python
1 # -*- coding: utf-8 -*-
2 # Copyright 2007-8 One Laptop per Child Association, Inc.
3 # Written by C. Scott Ananian <cscott@laptop.org>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 """Pippy activity helper classes."""
019 from sugar.activity import activity
120
221 class ViewSourceActivity(activity.Activity):
4665
4766 TARGET_TYPE_TEXT = 80
4867 class VteActivity(ViewSourceActivity):
68 """Activity subclass built around the Vte terminal widget."""
4969 def __init__(self, handle):
5070 import gtk, pango, vte
5171 from sugar.graphics.toolbutton import ToolButton
155175 # hide the buttons we don't use.
156176 toolbar.share.hide() # this should share bundle.
157177 toolbar.keep.hide()
178
179 def _main():
180 """Launch this activity from the command line."""
181 from sugar.activity import activityfactory
182 from sugar.activity.registry import ActivityInfo
183 from sugar.bundle.activitybundle import ActivityBundle
184 import os, os.path
185 ab = ActivityBundle(os.path.dirname(__file__) or '.')
186 ai = ActivityInfo(name=ab.get_name(),
187 icon=None,
188 bundle_id=ab.get_bundle_id(),
189 version=ab.get_activity_version(),
190 path=ab.get_path(),
191 show_launcher=ab.get_show_launcher(),
192 command=ab.get_command(),
193 favorite=True,
194 installation_time=ab.get_installation_time(),
195 position_x=0, position_y=0)
196 env = activityfactory.get_environment(ai)
197 cmd_args = activityfactory.get_command(ai)
198 os.execvpe(cmd_args[0], cmd_args, env)
199
200 if __name__=='__main__': _main()
0 # physics
1
2 import pippy, pygame, sys, math
3 from pygame.locals import *
4 from pippy import physics
5
6 # initialize pygame first thing
7 pygame.init()
8 screen = pygame.display.set_mode((1200,900))
9
10 # set up the physics world (instance of Elements)
11 world = physics.Elements(screen.get_size())
12 world.renderer.set_surface(screen)
13
14 # set up initial physics objects
15 world.add.ground()
16 world.add.ball((600,0), 50)
17 world.add.rect((500,0), 25, 300, dynamic=True, density=1.0, restitution=0.16, friction=0.5)
18
19 # add 20 more balls
20 balls = 0
21 while(balls<20):
22 world.add.ball((balls*5+200,balls*5), 50)
23 balls+=1
24
25 # begin physics simulation
26 world.run_physics = True
27
28 while pippy.pygame.next_frame() and world.run_physics:
29 for event in pygame.event.get():
30 if event.type == QUIT:
31 sys.exit()
32
33 elif event.type == KEYDOWN:
34 sys.exit()
35
36 elif event.type == MOUSEBUTTONDOWN and event.button == 1:
37 bodylist = world.get_bodies_at_pos(event.pos, include_static=False)
38 if bodylist and len(bodylist) > 0:
39 world.add.mouseJoint(bodylist[0], event.pos)
40
41 elif event.type == MOUSEBUTTONUP and event.button == 1:
42 world.add.remove_mouseJoint()
43
44 elif event.type == MOUSEMOTION and event.buttons[0]:
45 world.mouse_move(event.pos)
46
47 # clear display with a color
48 # (r,g,b), where 0<=value<256
49 screen.fill((80,160,240))
50
51 # update & draw physics world
52 world.update()
53 world.draw()
54
55 # update the display
56 pygame.display.flip()
57
00 """Pippy standard library."""
11 import pippy.console as console
22 import pippy.game as pygame
3 #import pippy.physics as physics
4
35 try:
46 import pippy.sound as sound
57 except ImportError:
00 """Console helpers for pippy."""
1 # Copyright (C) 2007 One Laptop Per Child Association, Inc.
2 # Licensed under the terms of the GNU GPL v2 or later; see
3 # /usr/share/licenses/common-licenses/GPLv2+ for details.
4 # Written by C. Scott Ananian <cscott@laptop.org>
15 import sys
26 def clear():
37 """Clear screen on console."""
8791 sys.stdout.write('\x1B[4m')
8892
8993 def inverse():
90 """Switch to underlined text."""
94 """Switch to inverse text."""
9195 sys.stdout.write('\x1B[7m')
9296
9397 def black():
00 """pygame support for pippy."""
1 # Copyright (C) 2007-8 One Laptop Per Child Association, Inc.
2 # Licensed under the terms of the GNU GPL v2 or later; see
3 # /usr/share/licenses/common-licenses/GPLv2+ for details.
4 # Written by C. Scott Ananian <cscott@laptop.org>
15
26 def pause():
37 """Display a "Paused" screen and suspend."""
0 # This file was automatically generated by SWIG (http://www.swig.org).
1 # Version 1.3.31
2 #
3 # Don't modify this file, modify the SWIG interface instead.
4 # This file is compatible with both classic and new-style classes.
5
6 import _Box2D2
7 import new
8 new_instancemethod = new.instancemethod
9 try:
10 _swig_property = property
11 except NameError:
12 pass # Python < 2.2 doesn't have 'property'.
13 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14 if (name == "thisown"): return self.this.own(value)
15 if (name == "this"):
16 if type(value).__name__ == 'PySwigObject':
17 self.__dict__[name] = value
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
25
26 def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29 def _swig_getattr(self,class_type,name):
30 if (name == "thisown"): return self.this.own()
31 method = class_type.__swig_getmethods__.get(name,None)
32 if method: return method(self)
33 raise AttributeError,name
34
35 def _swig_repr(self):
36 try: strthis = "proxy of " + self.this.__repr__()
37 except: strthis = ""
38 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
39
40 import types
41 try:
42 _object = types.ObjectType
43 _newclass = 1
44 except AttributeError:
45 class _object : pass
46 _newclass = 0
47 del types
48
49
50 try:
51 import weakref
52 weakref_proxy = weakref.proxy
53 except:
54 weakref_proxy = lambda x: x
55
56
57
58 def b2Alloc(*args):
59 """b2Alloc(int32 size) -> void"""
60 return _Box2D2.b2Alloc(*args)
61
62 def b2Free(*args):
63 """b2Free(void mem)"""
64 return _Box2D2.b2Free(*args)
65 class b2Version(_object):
66 """Proxy of C++ b2Version class"""
67 __swig_setmethods__ = {}
68 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
69 __swig_getmethods__ = {}
70 __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
71 __repr__ = _swig_repr
72 __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
73 __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
74 if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
75 __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
76 __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
77 if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
78 __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
79 __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
80 if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
81 def __init__(self, *args):
82 """__init__(self) -> b2Version"""
83 this = _Box2D2.new_b2Version(*args)
84 try: self.this.append(this)
85 except: self.this = this
86 __swig_destroy__ = _Box2D2.delete_b2Version
87 __del__ = lambda self : None;
88 b2Version_swigregister = _Box2D2.b2Version_swigregister
89 b2Version_swigregister(b2Version)
90 cvar = _Box2D2.cvar
91 b2_pi = cvar.b2_pi
92 b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
93 b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
94 b2_maxProxies = cvar.b2_maxProxies
95 b2_maxPairs = cvar.b2_maxPairs
96 b2_linearSlop = cvar.b2_linearSlop
97 b2_angularSlop = cvar.b2_angularSlop
98 b2_toiSlop = cvar.b2_toiSlop
99 b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
100 b2_velocityThreshold = cvar.b2_velocityThreshold
101 b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
102 b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
103 b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
104 b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
105 b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
106 b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
107 b2_contactBaumgarte = cvar.b2_contactBaumgarte
108 b2_timeToSleep = cvar.b2_timeToSleep
109 b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
110 b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
111
112
113 def b2IsValid(*args):
114 """b2IsValid(float32 x) -> bool"""
115 return _Box2D2.b2IsValid(*args)
116
117 def b2InvSqrt(*args):
118 """b2InvSqrt(float32 x) -> float32"""
119 return _Box2D2.b2InvSqrt(*args)
120 class b2Vec2(_object):
121 """Proxy of C++ b2Vec2 class"""
122 __swig_setmethods__ = {}
123 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
124 __swig_getmethods__ = {}
125 __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
126 __repr__ = _swig_repr
127 def __init__(self, *args):
128 """
129 __init__(self) -> b2Vec2
130 __init__(self, float32 x, float32 y) -> b2Vec2
131 """
132 this = _Box2D2.new_b2Vec2(*args)
133 try: self.this.append(this)
134 except: self.this = this
135 def SetZero(*args):
136 """SetZero(self)"""
137 return _Box2D2.b2Vec2_SetZero(*args)
138
139 def Set(*args):
140 """Set(self, float32 x_, float32 y_)"""
141 return _Box2D2.b2Vec2_Set(*args)
142
143 def __neg__(*args):
144 """__neg__(self) -> b2Vec2"""
145 return _Box2D2.b2Vec2___neg__(*args)
146
147 def __iadd__(*args):
148 """__iadd__(self, b2Vec2 v)"""
149 return _Box2D2.b2Vec2___iadd__(*args)
150
151 def __isub__(*args):
152 """__isub__(self, b2Vec2 v)"""
153 return _Box2D2.b2Vec2___isub__(*args)
154
155 def __imul__(*args):
156 """__imul__(self, float32 a)"""
157 return _Box2D2.b2Vec2___imul__(*args)
158
159 def Length(*args):
160 """Length(self) -> float32"""
161 return _Box2D2.b2Vec2_Length(*args)
162
163 def LengthSquared(*args):
164 """LengthSquared(self) -> float32"""
165 return _Box2D2.b2Vec2_LengthSquared(*args)
166
167 def Normalize(*args):
168 """Normalize(self) -> float32"""
169 return _Box2D2.b2Vec2_Normalize(*args)
170
171 def IsValid(*args):
172 """IsValid(self) -> bool"""
173 return _Box2D2.b2Vec2_IsValid(*args)
174
175 __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
176 __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
177 if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
178 __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
179 __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
180 if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
181 def __repr__(self):
182 return "b2Vec2(%g,%g)" % (self.x, self.y)
183 def tuple(self):
184 return (self.x, self.y)
185
186 def __mul__(*args):
187 """__mul__(self, float32 a) -> b2Vec2"""
188 return _Box2D2.b2Vec2___mul__(*args)
189
190 def __add__(*args):
191 """__add__(self, b2Vec2 other) -> b2Vec2"""
192 return _Box2D2.b2Vec2___add__(*args)
193
194 def __sub__(*args):
195 """__sub__(self, b2Vec2 other) -> b2Vec2"""
196 return _Box2D2.b2Vec2___sub__(*args)
197
198 __swig_destroy__ = _Box2D2.delete_b2Vec2
199 __del__ = lambda self : None;
200 b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
201 b2Vec2_swigregister(b2Vec2)
202
203 class b2Mat22(_object):
204 """Proxy of C++ b2Mat22 class"""
205 __swig_setmethods__ = {}
206 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
207 __swig_getmethods__ = {}
208 __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
209 __repr__ = _swig_repr
210 def __init__(self, *args):
211 """
212 __init__(self) -> b2Mat22
213 __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
214 __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
215 __init__(self, float32 angle) -> b2Mat22
216 """
217 this = _Box2D2.new_b2Mat22(*args)
218 try: self.this.append(this)
219 except: self.this = this
220 def Set(*args):
221 """
222 Set(self, b2Vec2 c1, b2Vec2 c2)
223 Set(self, float32 angle)
224 """
225 return _Box2D2.b2Mat22_Set(*args)
226
227 def SetIdentity(*args):
228 """SetIdentity(self)"""
229 return _Box2D2.b2Mat22_SetIdentity(*args)
230
231 def SetZero(*args):
232 """SetZero(self)"""
233 return _Box2D2.b2Mat22_SetZero(*args)
234
235 def GetAngle(*args):
236 """GetAngle(self) -> float32"""
237 return _Box2D2.b2Mat22_GetAngle(*args)
238
239 def Invert(*args):
240 """Invert(self) -> b2Mat22"""
241 return _Box2D2.b2Mat22_Invert(*args)
242
243 def Solve(*args):
244 """Solve(self, b2Vec2 b) -> b2Vec2"""
245 return _Box2D2.b2Mat22_Solve(*args)
246
247 __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
248 __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
249 if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
250 __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
251 __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
252 if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
253 __swig_destroy__ = _Box2D2.delete_b2Mat22
254 __del__ = lambda self : None;
255 b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
256 b2Mat22_swigregister(b2Mat22)
257
258 class b2XForm(_object):
259 """Proxy of C++ b2XForm class"""
260 __swig_setmethods__ = {}
261 __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
262 __swig_getmethods__ = {}
263 __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
264 __repr__ = _swig_repr
265 def __init__(self, *args):
266 """
267 __init__(self) -> b2XForm
268 __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
269 """
270 this = _Box2D2.new_b2XForm(*args)
271 try: self.this.append(this)
272 except: self.this = this
273 def SetIdentity(*args):
274 """SetIdentity(self)"""
275 return _Box2D2.b2XForm_SetIdentity(*args)
276
277 __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
278 __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
279 if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
280 __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
281 __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
282 if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
283 __swig_destroy__ = _Box2D2.delete_b2XForm
284 __del__ = lambda self : None;
285 b2XForm_swigregister = _Box2D2.b2XForm_swigregister
286 b2XForm_swigregister(b2XForm)
287
288 class b2Sweep(_object):
289 """Proxy of C++ b2Sweep class"""
290 __swig_setmethods__ = {}
291 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
292 __swig_getmethods__ = {}
293 __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
294 __repr__ = _swig_repr
295 def GetXForm(*args):
296 """GetXForm(self, b2XForm xf, float32 t)"""
297 return _Box2D2.b2Sweep_GetXForm(*args)
298
299 def Advance(*args):
300 """Advance(self, float32 t)"""
301 return _Box2D2.b2Sweep_Advance(*args)
302
303 __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
304 __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
305 if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
306 __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
307 __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
308 if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
309 __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
310 __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
311 if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
312 __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
313 __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
314 if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
315 __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
316 __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
317 if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
318 __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
319 __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
320 if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
321 def __init__(self, *args):
322 """__init__(self) -> b2Sweep"""
323 this = _Box2D2.new_b2Sweep(*args)
324 try: self.this.append(this)
325 except: self.this = this
326 __swig_destroy__ = _Box2D2.delete_b2Sweep
327 __del__ = lambda self : None;
328 b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
329 b2Sweep_swigregister(b2Sweep)
330
331
332 def b2Dot(*args):
333 """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
334 return _Box2D2.b2Dot(*args)
335
336 def b2_VaddV(*args):
337 """b2_VaddV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
338 return _Box2D2.b2_VaddV(*args)
339
340 def b2_VsubV(*args):
341 """b2_VsubV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
342 return _Box2D2.b2_VsubV(*args)
343
344 def b2_VmulF(*args):
345 """b2_VmulF(float32 s, b2Vec2 a) -> b2Vec2"""
346 return _Box2D2.b2_VmulF(*args)
347
348 def b2_VequV(*args):
349 """b2_VequV(b2Vec2 a, b2Vec2 b) -> bool"""
350 return _Box2D2.b2_VequV(*args)
351
352 def b2DistanceSquared(*args):
353 """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
354 return _Box2D2.b2DistanceSquared(*args)
355
356 def b2_MaddM(*args):
357 """b2_MaddM(b2Mat22 A, b2Mat22 B) -> b2Mat22"""
358 return _Box2D2.b2_MaddM(*args)
359
360 def b2Min(*args):
361 """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
362 return _Box2D2.b2Min(*args)
363
364 def b2Max(*args):
365 """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
366 return _Box2D2.b2Max(*args)
367
368 def b2Clamp(*args):
369 """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
370 return _Box2D2.b2Clamp(*args)
371 RAND_LIMIT = _Box2D2.RAND_LIMIT
372
373 def b2NextPowerOfTwo(*args):
374 """b2NextPowerOfTwo(uint32 x) -> uint32"""
375 return _Box2D2.b2NextPowerOfTwo(*args)
376
377 def b2IsPowerOfTwo(*args):
378 """b2IsPowerOfTwo(uint32 x) -> bool"""
379 return _Box2D2.b2IsPowerOfTwo(*args)
380 class b2ContactID(_object):
381 """Proxy of C++ b2ContactID class"""
382 __swig_setmethods__ = {}
383 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
384 __swig_getmethods__ = {}
385 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
386 __repr__ = _swig_repr
387 __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
388 __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
389 if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
390 __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
391 if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
392 def __init__(self, *args):
393 """__init__(self) -> b2ContactID"""
394 this = _Box2D2.new_b2ContactID(*args)
395 try: self.this.append(this)
396 except: self.this = this
397 __swig_destroy__ = _Box2D2.delete_b2ContactID
398 __del__ = lambda self : None;
399 b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
400 b2ContactID_swigregister(b2ContactID)
401 b2Vec2_zero = cvar.b2Vec2_zero
402 b2Mat22_identity = cvar.b2Mat22_identity
403 b2XForm_identity = cvar.b2XForm_identity
404
405 def b2Cross(*args):
406 """
407 b2Cross(b2Vec2 a, b2Vec2 b) -> float32
408 b2Cross(b2Vec2 a, float32 s) -> b2Vec2
409 b2Cross(float32 s, b2Vec2 a) -> b2Vec2
410 """
411 return _Box2D2.b2Cross(*args)
412
413 def b2Mul(*args):
414 """
415 b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
416 b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
417 b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
418 """
419 return _Box2D2.b2Mul(*args)
420
421 def b2MulT(*args):
422 """
423 b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
424 b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
425 b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
426 """
427 return _Box2D2.b2MulT(*args)
428
429 def b2Abs(*args):
430 """
431 b2Abs(float32 a) -> float32
432 b2Abs(b2Vec2 a) -> b2Vec2
433 b2Abs(b2Mat22 A) -> b2Mat22
434 """
435 return _Box2D2.b2Abs(*args)
436
437 def b2Random(*args):
438 """
439 b2Random() -> float32
440 b2Random(float32 lo, float32 hi) -> float32
441 """
442 return _Box2D2.b2Random(*args)
443 b2_nullFeature = cvar.b2_nullFeature
444 b2_newPoint = cvar.b2_newPoint
445 b2_oldPoint = cvar.b2_oldPoint
446
447 class b2ContactID_features(_object):
448 """Proxy of C++ b2ContactID_features class"""
449 __swig_setmethods__ = {}
450 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
451 __swig_getmethods__ = {}
452 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
453 __repr__ = _swig_repr
454 __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
455 __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
456 if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
457 __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
458 __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
459 if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
460 __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
461 __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
462 if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
463 __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
464 __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
465 if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
466 def __init__(self, *args):
467 """__init__(self) -> b2ContactID_features"""
468 this = _Box2D2.new_b2ContactID_features(*args)
469 try: self.this.append(this)
470 except: self.this = this
471 __swig_destroy__ = _Box2D2.delete_b2ContactID_features
472 __del__ = lambda self : None;
473 b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
474 b2ContactID_features_swigregister(b2ContactID_features)
475
476 class b2ManifoldPoint(_object):
477 """Proxy of C++ b2ManifoldPoint class"""
478 __swig_setmethods__ = {}
479 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
480 __swig_getmethods__ = {}
481 __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
482 __repr__ = _swig_repr
483 __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
484 __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
485 if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
486 __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
487 __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
488 if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
489 __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
490 __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
491 if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
492 __swig_setmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_set
493 __swig_getmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_get
494 if _newclass:normalForce = _swig_property(_Box2D2.b2ManifoldPoint_normalForce_get, _Box2D2.b2ManifoldPoint_normalForce_set)
495 __swig_setmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_set
496 __swig_getmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_get
497 if _newclass:tangentForce = _swig_property(_Box2D2.b2ManifoldPoint_tangentForce_get, _Box2D2.b2ManifoldPoint_tangentForce_set)
498 __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
499 __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
500 if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
501 def __init__(self, *args):
502 """__init__(self) -> b2ManifoldPoint"""
503 this = _Box2D2.new_b2ManifoldPoint(*args)
504 try: self.this.append(this)
505 except: self.this = this
506 __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
507 __del__ = lambda self : None;
508 b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
509 b2ManifoldPoint_swigregister(b2ManifoldPoint)
510
511 class b2Manifold(_object):
512 """Proxy of C++ b2Manifold class"""
513 __swig_setmethods__ = {}
514 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
515 __swig_getmethods__ = {}
516 __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
517 __repr__ = _swig_repr
518 __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
519 __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
520 if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
521 __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
522 __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
523 if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
524 __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
525 __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
526 if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
527 def __init__(self, *args):
528 """__init__(self) -> b2Manifold"""
529 this = _Box2D2.new_b2Manifold(*args)
530 try: self.this.append(this)
531 except: self.this = this
532 __swig_destroy__ = _Box2D2.delete_b2Manifold
533 __del__ = lambda self : None;
534 b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
535 b2Manifold_swigregister(b2Manifold)
536
537 class b2Segment(_object):
538 """Proxy of C++ b2Segment class"""
539 __swig_setmethods__ = {}
540 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
541 __swig_getmethods__ = {}
542 __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
543 __repr__ = _swig_repr
544 def TestSegment(*args):
545 """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
546 return _Box2D2.b2Segment_TestSegment(*args)
547
548 __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
549 __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
550 if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
551 __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
552 __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
553 if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
554 def __init__(self, *args):
555 """__init__(self) -> b2Segment"""
556 this = _Box2D2.new_b2Segment(*args)
557 try: self.this.append(this)
558 except: self.this = this
559 __swig_destroy__ = _Box2D2.delete_b2Segment
560 __del__ = lambda self : None;
561 b2Segment_swigregister = _Box2D2.b2Segment_swigregister
562 b2Segment_swigregister(b2Segment)
563
564 class b2AABB(_object):
565 """Proxy of C++ b2AABB class"""
566 __swig_setmethods__ = {}
567 __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
568 __swig_getmethods__ = {}
569 __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
570 __repr__ = _swig_repr
571 def IsValid(*args):
572 """IsValid(self) -> bool"""
573 return _Box2D2.b2AABB_IsValid(*args)
574
575 __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
576 __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
577 if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
578 __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
579 __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
580 if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
581 def __init__(self, *args):
582 """__init__(self) -> b2AABB"""
583 this = _Box2D2.new_b2AABB(*args)
584 try: self.this.append(this)
585 except: self.this = this
586 __swig_destroy__ = _Box2D2.delete_b2AABB
587 __del__ = lambda self : None;
588 b2AABB_swigregister = _Box2D2.b2AABB_swigregister
589 b2AABB_swigregister(b2AABB)
590
591 class b2OBB(_object):
592 """Proxy of C++ b2OBB class"""
593 __swig_setmethods__ = {}
594 __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
595 __swig_getmethods__ = {}
596 __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
597 __repr__ = _swig_repr
598 __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
599 __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
600 if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
601 __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
602 __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
603 if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
604 __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
605 __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
606 if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
607 def __init__(self, *args):
608 """__init__(self) -> b2OBB"""
609 this = _Box2D2.new_b2OBB(*args)
610 try: self.this.append(this)
611 except: self.this = this
612 __swig_destroy__ = _Box2D2.delete_b2OBB
613 __del__ = lambda self : None;
614 b2OBB_swigregister = _Box2D2.b2OBB_swigregister
615 b2OBB_swigregister(b2OBB)
616
617
618 def b2CollideCircles(*args):
619 """
620 b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
621 b2CircleShape circle2, b2XForm xf2)
622 """
623 return _Box2D2.b2CollideCircles(*args)
624
625 def b2CollidePolygonAndCircle(*args):
626 """
627 b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
628 b2CircleShape circle, b2XForm xf2)
629 """
630 return _Box2D2.b2CollidePolygonAndCircle(*args)
631
632 def b2CollidePolygons(*args):
633 """
634 b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
635 b2PolygonShape polygon2, b2XForm xf2)
636 """
637 return _Box2D2.b2CollidePolygons(*args)
638
639 def b2TimeOfImpact(*args):
640 """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
641 return _Box2D2.b2TimeOfImpact(*args)
642
643 def b2TestOverlap(*args):
644 """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
645 return _Box2D2.b2TestOverlap(*args)
646 class b2MassData(_object):
647 """Proxy of C++ b2MassData class"""
648 __swig_setmethods__ = {}
649 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
650 __swig_getmethods__ = {}
651 __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
652 __repr__ = _swig_repr
653 __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
654 __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
655 if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
656 __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
657 __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
658 if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
659 __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
660 __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
661 if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
662 def __init__(self, *args):
663 """__init__(self) -> b2MassData"""
664 this = _Box2D2.new_b2MassData(*args)
665 try: self.this.append(this)
666 except: self.this = this
667 __swig_destroy__ = _Box2D2.delete_b2MassData
668 __del__ = lambda self : None;
669 b2MassData_swigregister = _Box2D2.b2MassData_swigregister
670 b2MassData_swigregister(b2MassData)
671
672 def b2Distance(*args):
673 """
674 b2Distance(b2Vec2 a, b2Vec2 b) -> float32
675 b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
676 b2Shape shape2, b2XForm xf2) -> float32
677 """
678 return _Box2D2.b2Distance(*args)
679
680 e_unknownShape = _Box2D2.e_unknownShape
681 e_circleShape = _Box2D2.e_circleShape
682 e_polygonShape = _Box2D2.e_polygonShape
683 e_shapeTypeCount = _Box2D2.e_shapeTypeCount
684 class b2ShapeDef(_object):
685 """Proxy of C++ b2ShapeDef class"""
686 __swig_setmethods__ = {}
687 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
688 __swig_getmethods__ = {}
689 __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
690 __repr__ = _swig_repr
691 def __init__(self, *args):
692 """__init__(self) -> b2ShapeDef"""
693 this = _Box2D2.new_b2ShapeDef(*args)
694 try: self.this.append(this)
695 except: self.this = this
696 __swig_destroy__ = _Box2D2.delete_b2ShapeDef
697 __del__ = lambda self : None;
698 __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
699 __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
700 if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
701 __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
702 __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
703 if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
704 __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
705 __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
706 if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
707 __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
708 __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
709 if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
710 __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
711 __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
712 if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
713 __swig_setmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_set
714 __swig_getmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_get
715 if _newclass:categoryBits = _swig_property(_Box2D2.b2ShapeDef_categoryBits_get, _Box2D2.b2ShapeDef_categoryBits_set)
716 __swig_setmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_set
717 __swig_getmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_get
718 if _newclass:maskBits = _swig_property(_Box2D2.b2ShapeDef_maskBits_get, _Box2D2.b2ShapeDef_maskBits_set)
719 __swig_setmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_set
720 __swig_getmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_get
721 if _newclass:groupIndex = _swig_property(_Box2D2.b2ShapeDef_groupIndex_get, _Box2D2.b2ShapeDef_groupIndex_set)
722 __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
723 __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
724 if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
725 b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
726 b2ShapeDef_swigregister(b2ShapeDef)
727
728 class b2Shape(_object):
729 """Proxy of C++ b2Shape class"""
730 __swig_setmethods__ = {}
731 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
732 __swig_getmethods__ = {}
733 __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
734 def __init__(self): raise AttributeError, "No constructor defined"
735 __repr__ = _swig_repr
736 def GetType(*args):
737 """GetType(self) -> int"""
738 return _Box2D2.b2Shape_GetType(*args)
739
740 def IsSensor(*args):
741 """IsSensor(self) -> bool"""
742 return _Box2D2.b2Shape_IsSensor(*args)
743
744 def GetBody(*args):
745 """GetBody(self) -> b2Body"""
746 return _Box2D2.b2Shape_GetBody(*args)
747
748 def GetNext(*args):
749 """GetNext(self) -> b2Shape"""
750 return _Box2D2.b2Shape_GetNext(*args)
751
752 def GetUserData(*args):
753 """GetUserData(self) -> void"""
754 return _Box2D2.b2Shape_GetUserData(*args)
755
756 def TestPoint(*args):
757 """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
758 return _Box2D2.b2Shape_TestPoint(*args)
759
760 def TestSegment(*args):
761 """
762 TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
763 float32 maxLambda) -> bool
764 """
765 return _Box2D2.b2Shape_TestSegment(*args)
766
767 def ComputeAABB(*args):
768 """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
769 return _Box2D2.b2Shape_ComputeAABB(*args)
770
771 def ComputeSweptAABB(*args):
772 """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
773 return _Box2D2.b2Shape_ComputeSweptAABB(*args)
774
775 def ComputeMass(*args):
776 """ComputeMass(self, b2MassData massData)"""
777 return _Box2D2.b2Shape_ComputeMass(*args)
778
779 def Create(*args):
780 """Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
781 return _Box2D2.b2Shape_Create(*args)
782
783 if _newclass:Create = staticmethod(Create)
784 __swig_getmethods__["Create"] = lambda x: Create
785 def Destroy(*args):
786 """Destroy(b2Shape shape, b2BlockAllocator allocator)"""
787 return _Box2D2.b2Shape_Destroy(*args)
788
789 if _newclass:Destroy = staticmethod(Destroy)
790 __swig_getmethods__["Destroy"] = lambda x: Destroy
791 __swig_destroy__ = _Box2D2.delete_b2Shape
792 __del__ = lambda self : None;
793 def CreateProxy(*args):
794 """CreateProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
795 return _Box2D2.b2Shape_CreateProxy(*args)
796
797 def DestroyProxy(*args):
798 """DestroyProxy(self, b2BroadPhase broadPhase)"""
799 return _Box2D2.b2Shape_DestroyProxy(*args)
800
801 def Synchronize(*args):
802 """Synchronize(self, b2BroadPhase broadPhase, b2XForm xf1, b2XForm xf2) -> bool"""
803 return _Box2D2.b2Shape_Synchronize(*args)
804
805 def ResetProxy(*args):
806 """ResetProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
807 return _Box2D2.b2Shape_ResetProxy(*args)
808
809 def UpdateSweepRadius(*args):
810 """UpdateSweepRadius(self, b2Vec2 center)"""
811 return _Box2D2.b2Shape_UpdateSweepRadius(*args)
812
813 def GetSweepRadius(*args):
814 """GetSweepRadius(self) -> float32"""
815 return _Box2D2.b2Shape_GetSweepRadius(*args)
816
817 __swig_setmethods__["m_type"] = _Box2D2.b2Shape_m_type_set
818 __swig_getmethods__["m_type"] = _Box2D2.b2Shape_m_type_get
819 if _newclass:m_type = _swig_property(_Box2D2.b2Shape_m_type_get, _Box2D2.b2Shape_m_type_set)
820 __swig_setmethods__["m_next"] = _Box2D2.b2Shape_m_next_set
821 __swig_getmethods__["m_next"] = _Box2D2.b2Shape_m_next_get
822 if _newclass:m_next = _swig_property(_Box2D2.b2Shape_m_next_get, _Box2D2.b2Shape_m_next_set)
823 __swig_setmethods__["m_body"] = _Box2D2.b2Shape_m_body_set
824 __swig_getmethods__["m_body"] = _Box2D2.b2Shape_m_body_get
825 if _newclass:m_body = _swig_property(_Box2D2.b2Shape_m_body_get, _Box2D2.b2Shape_m_body_set)
826 __swig_setmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_set
827 __swig_getmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_get
828 if _newclass:m_sweepRadius = _swig_property(_Box2D2.b2Shape_m_sweepRadius_get, _Box2D2.b2Shape_m_sweepRadius_set)
829 __swig_setmethods__["m_density"] = _Box2D2.b2Shape_m_density_set
830 __swig_getmethods__["m_density"] = _Box2D2.b2Shape_m_density_get
831 if _newclass:m_density = _swig_property(_Box2D2.b2Shape_m_density_get, _Box2D2.b2Shape_m_density_set)
832 __swig_setmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_set
833 __swig_getmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_get
834 if _newclass:m_friction = _swig_property(_Box2D2.b2Shape_m_friction_get, _Box2D2.b2Shape_m_friction_set)
835 __swig_setmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_set
836 __swig_getmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_get
837 if _newclass:m_restitution = _swig_property(_Box2D2.b2Shape_m_restitution_get, _Box2D2.b2Shape_m_restitution_set)
838 __swig_setmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_set
839 __swig_getmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_get
840 if _newclass:m_proxyId = _swig_property(_Box2D2.b2Shape_m_proxyId_get, _Box2D2.b2Shape_m_proxyId_set)
841 __swig_setmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_set
842 __swig_getmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_get
843 if _newclass:m_categoryBits = _swig_property(_Box2D2.b2Shape_m_categoryBits_get, _Box2D2.b2Shape_m_categoryBits_set)
844 __swig_setmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_set
845 __swig_getmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_get
846 if _newclass:m_maskBits = _swig_property(_Box2D2.b2Shape_m_maskBits_get, _Box2D2.b2Shape_m_maskBits_set)
847 __swig_setmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_set
848 __swig_getmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_get
849 if _newclass:m_groupIndex = _swig_property(_Box2D2.b2Shape_m_groupIndex_get, _Box2D2.b2Shape_m_groupIndex_set)
850 __swig_setmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_set
851 __swig_getmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_get
852 if _newclass:m_isSensor = _swig_property(_Box2D2.b2Shape_m_isSensor_get, _Box2D2.b2Shape_m_isSensor_set)
853 __swig_setmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_set
854 __swig_getmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_get
855 if _newclass:m_userData = _swig_property(_Box2D2.b2Shape_m_userData_get, _Box2D2.b2Shape_m_userData_set)
856 def __repr__(self):
857 return "b2Shape(from Body %s )" % (self.GetBody())
858 def typeName(self):
859 types = { e_unknownShape : "Unknown",
860 e_circleShape : "Circle",
861 e_polygonShape : "Polygon",
862 e_shapeTypeCount: "ShapeType" }
863 return types[self.GetType()]
864 def getAsType(self):
865 """Return a typecasted version of the shape"""
866 return (getattr(self, "as%s" % self.typeName())) ()
867
868 def asCircle(*args):
869 """asCircle(self) -> b2CircleShape"""
870 return _Box2D2.b2Shape_asCircle(*args)
871
872 def asPolygon(*args):
873 """asPolygon(self) -> b2PolygonShape"""
874 return _Box2D2.b2Shape_asPolygon(*args)
875
876 b2Shape_swigregister = _Box2D2.b2Shape_swigregister
877 b2Shape_swigregister(b2Shape)
878
879 def b2Shape_Create(*args):
880 """b2Shape_Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
881 return _Box2D2.b2Shape_Create(*args)
882
883 def b2Shape_Destroy(*args):
884 """b2Shape_Destroy(b2Shape shape, b2BlockAllocator allocator)"""
885 return _Box2D2.b2Shape_Destroy(*args)
886
887 class b2CircleDef(b2ShapeDef):
888 """Proxy of C++ b2CircleDef class"""
889 __swig_setmethods__ = {}
890 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
891 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
892 __swig_getmethods__ = {}
893 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
894 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
895 __repr__ = _swig_repr
896 def __init__(self, *args):
897 """__init__(self) -> b2CircleDef"""
898 this = _Box2D2.new_b2CircleDef(*args)
899 try: self.this.append(this)
900 except: self.this = this
901 __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
902 __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
903 if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
904 __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
905 __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
906 if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
907 __swig_destroy__ = _Box2D2.delete_b2CircleDef
908 __del__ = lambda self : None;
909 b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
910 b2CircleDef_swigregister(b2CircleDef)
911
912 class b2CircleShape(b2Shape):
913 """Proxy of C++ b2CircleShape class"""
914 __swig_setmethods__ = {}
915 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
916 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
917 __swig_getmethods__ = {}
918 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
919 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
920 __repr__ = _swig_repr
921 def TestPoint(*args):
922 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
923 return _Box2D2.b2CircleShape_TestPoint(*args)
924
925 def TestSegment(*args):
926 """
927 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
928 float32 maxLambda) -> bool
929 """
930 return _Box2D2.b2CircleShape_TestSegment(*args)
931
932 def ComputeAABB(*args):
933 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
934 return _Box2D2.b2CircleShape_ComputeAABB(*args)
935
936 def ComputeSweptAABB(*args):
937 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
938 return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
939
940 def ComputeMass(*args):
941 """ComputeMass(self, b2MassData massData)"""
942 return _Box2D2.b2CircleShape_ComputeMass(*args)
943
944 def GetLocalPosition(*args):
945 """GetLocalPosition(self) -> b2Vec2"""
946 return _Box2D2.b2CircleShape_GetLocalPosition(*args)
947
948 def GetRadius(*args):
949 """GetRadius(self) -> float32"""
950 return _Box2D2.b2CircleShape_GetRadius(*args)
951
952 def __init__(self, *args):
953 """__init__(self, b2ShapeDef def) -> b2CircleShape"""
954 this = _Box2D2.new_b2CircleShape(*args)
955 try: self.this.append(this)
956 except: self.this = this
957 def UpdateSweepRadius(*args):
958 """UpdateSweepRadius(self, b2Vec2 center)"""
959 return _Box2D2.b2CircleShape_UpdateSweepRadius(*args)
960
961 __swig_setmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_set
962 __swig_getmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_get
963 if _newclass:m_localPosition = _swig_property(_Box2D2.b2CircleShape_m_localPosition_get, _Box2D2.b2CircleShape_m_localPosition_set)
964 __swig_setmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_set
965 __swig_getmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_get
966 if _newclass:m_radius = _swig_property(_Box2D2.b2CircleShape_m_radius_get, _Box2D2.b2CircleShape_m_radius_set)
967 __swig_destroy__ = _Box2D2.delete_b2CircleShape
968 __del__ = lambda self : None;
969 b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
970 b2CircleShape_swigregister(b2CircleShape)
971
972 class b2PolygonDef(b2ShapeDef):
973 """Proxy of C++ b2PolygonDef class"""
974 __swig_setmethods__ = {}
975 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
976 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
977 __swig_getmethods__ = {}
978 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
979 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
980 __repr__ = _swig_repr
981 def __init__(self, *args):
982 """__init__(self) -> b2PolygonDef"""
983 this = _Box2D2.new_b2PolygonDef(*args)
984 try: self.this.append(this)
985 except: self.this = this
986 def SetAsBox(*args):
987 """
988 SetAsBox(self, float32 hx, float32 hy)
989 SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
990 """
991 return _Box2D2.b2PolygonDef_SetAsBox(*args)
992
993 __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
994 __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
995 if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
996 __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
997 __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
998 if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
999 def getVertex(*args):
1000 """getVertex(self, uint16 vnum) -> b2Vec2"""
1001 return _Box2D2.b2PolygonDef_getVertex(*args)
1002
1003 def setVertex(*args):
1004 """setVertex(self, uint16 vnum, b2Vec2 value)"""
1005 return _Box2D2.b2PolygonDef_setVertex(*args)
1006
1007 __swig_destroy__ = _Box2D2.delete_b2PolygonDef
1008 __del__ = lambda self : None;
1009 b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
1010 b2PolygonDef_swigregister(b2PolygonDef)
1011
1012 class b2PolygonShape(b2Shape):
1013 """Proxy of C++ b2PolygonShape class"""
1014 __swig_setmethods__ = {}
1015 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1016 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
1017 __swig_getmethods__ = {}
1018 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1019 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
1020 __repr__ = _swig_repr
1021 def TestPoint(*args):
1022 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
1023 return _Box2D2.b2PolygonShape_TestPoint(*args)
1024
1025 def TestSegment(*args):
1026 """
1027 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
1028 float32 maxLambda) -> bool
1029 """
1030 return _Box2D2.b2PolygonShape_TestSegment(*args)
1031
1032 def ComputeAABB(*args):
1033 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
1034 return _Box2D2.b2PolygonShape_ComputeAABB(*args)
1035
1036 def ComputeSweptAABB(*args):
1037 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
1038 return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
1039
1040 def ComputeMass(*args):
1041 """ComputeMass(self, b2MassData massData)"""
1042 return _Box2D2.b2PolygonShape_ComputeMass(*args)
1043
1044 def GetOBB(*args):
1045 """GetOBB(self) -> b2OBB"""
1046 return _Box2D2.b2PolygonShape_GetOBB(*args)
1047
1048 def GetCentroid(*args):
1049 """GetCentroid(self) -> b2Vec2"""
1050 return _Box2D2.b2PolygonShape_GetCentroid(*args)
1051
1052 def GetVertexCount(*args):
1053 """GetVertexCount(self) -> int32"""
1054 return _Box2D2.b2PolygonShape_GetVertexCount(*args)
1055
1056 def GetVertices(*args):
1057 """GetVertices(self) -> b2Vec2"""
1058 return _Box2D2.b2PolygonShape_GetVertices(*args)
1059
1060 def GetCoreVertices(*args):
1061 """GetCoreVertices(self) -> b2Vec2"""
1062 return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
1063
1064 def __init__(self, *args):
1065 """__init__(self, b2ShapeDef def) -> b2PolygonShape"""
1066 this = _Box2D2.new_b2PolygonShape(*args)
1067 try: self.this.append(this)
1068 except: self.this = this
1069 def UpdateSweepRadius(*args):
1070 """UpdateSweepRadius(self, b2Vec2 center)"""
1071 return _Box2D2.b2PolygonShape_UpdateSweepRadius(*args)
1072
1073 def GetFirstVertex(*args):
1074 """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
1075 return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
1076
1077 def Centroid(*args):
1078 """Centroid(self, b2XForm xf) -> b2Vec2"""
1079 return _Box2D2.b2PolygonShape_Centroid(*args)
1080
1081 def Support(*args):
1082 """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
1083 return _Box2D2.b2PolygonShape_Support(*args)
1084
1085 __swig_setmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_set
1086 __swig_getmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_get
1087 if _newclass:m_centroid = _swig_property(_Box2D2.b2PolygonShape_m_centroid_get, _Box2D2.b2PolygonShape_m_centroid_set)
1088 __swig_setmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_set
1089 __swig_getmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_get
1090 if _newclass:m_obb = _swig_property(_Box2D2.b2PolygonShape_m_obb_get, _Box2D2.b2PolygonShape_m_obb_set)
1091 __swig_setmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_set
1092 __swig_getmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_get
1093 if _newclass:m_vertices = _swig_property(_Box2D2.b2PolygonShape_m_vertices_get, _Box2D2.b2PolygonShape_m_vertices_set)
1094 __swig_setmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_set
1095 __swig_getmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_get
1096 if _newclass:m_normals = _swig_property(_Box2D2.b2PolygonShape_m_normals_get, _Box2D2.b2PolygonShape_m_normals_set)
1097 __swig_setmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_set
1098 __swig_getmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_get
1099 if _newclass:m_coreVertices = _swig_property(_Box2D2.b2PolygonShape_m_coreVertices_get, _Box2D2.b2PolygonShape_m_coreVertices_set)
1100 __swig_setmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_set
1101 __swig_getmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_get
1102 if _newclass:m_vertexCount = _swig_property(_Box2D2.b2PolygonShape_m_vertexCount_get, _Box2D2.b2PolygonShape_m_vertexCount_set)
1103 def __repr__(self):
1104 return "b2PolygonShape()"
1105
1106 def getVertex(*args):
1107 """getVertex(self, uint16 vnum) -> b2Vec2"""
1108 return _Box2D2.b2PolygonShape_getVertex(*args)
1109
1110 __swig_destroy__ = _Box2D2.delete_b2PolygonShape
1111 __del__ = lambda self : None;
1112 b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
1113 b2PolygonShape_swigregister(b2PolygonShape)
1114
1115 class b2Pair(_object):
1116 """Proxy of C++ b2Pair class"""
1117 __swig_setmethods__ = {}
1118 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
1119 __swig_getmethods__ = {}
1120 __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
1121 __repr__ = _swig_repr
1122 e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
1123 e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
1124 e_pairFinal = _Box2D2.b2Pair_e_pairFinal
1125 def SetBuffered(*args):
1126 """SetBuffered(self)"""
1127 return _Box2D2.b2Pair_SetBuffered(*args)
1128
1129 def ClearBuffered(*args):
1130 """ClearBuffered(self)"""
1131 return _Box2D2.b2Pair_ClearBuffered(*args)
1132
1133 def IsBuffered(*args):
1134 """IsBuffered(self) -> bool"""
1135 return _Box2D2.b2Pair_IsBuffered(*args)
1136
1137 def SetRemoved(*args):
1138 """SetRemoved(self)"""
1139 return _Box2D2.b2Pair_SetRemoved(*args)
1140
1141 def ClearRemoved(*args):
1142 """ClearRemoved(self)"""
1143 return _Box2D2.b2Pair_ClearRemoved(*args)
1144
1145 def IsRemoved(*args):
1146 """IsRemoved(self) -> bool"""
1147 return _Box2D2.b2Pair_IsRemoved(*args)
1148
1149 def SetFinal(*args):
1150 """SetFinal(self)"""
1151 return _Box2D2.b2Pair_SetFinal(*args)
1152
1153 def IsFinal(*args):
1154 """IsFinal(self) -> bool"""
1155 return _Box2D2.b2Pair_IsFinal(*args)
1156
1157 __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
1158 __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
1159 if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
1160 __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
1161 __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
1162 if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
1163 __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
1164 __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
1165 if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
1166 __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
1167 __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
1168 if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
1169 __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
1170 __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
1171 if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
1172 def __init__(self, *args):
1173 """__init__(self) -> b2Pair"""
1174 this = _Box2D2.new_b2Pair(*args)
1175 try: self.this.append(this)
1176 except: self.this = this
1177 __swig_destroy__ = _Box2D2.delete_b2Pair
1178 __del__ = lambda self : None;
1179 b2Pair_swigregister = _Box2D2.b2Pair_swigregister
1180 b2Pair_swigregister(b2Pair)
1181 b2_nullPair = cvar.b2_nullPair
1182 b2_nullProxy = cvar.b2_nullProxy
1183 b2_tableCapacity = cvar.b2_tableCapacity
1184 b2_tableMask = cvar.b2_tableMask
1185
1186 class b2BufferedPair(_object):
1187 """Proxy of C++ b2BufferedPair class"""
1188 __swig_setmethods__ = {}
1189 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
1190 __swig_getmethods__ = {}
1191 __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
1192 __repr__ = _swig_repr
1193 __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
1194 __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
1195 if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
1196 __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
1197 __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
1198 if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
1199 def __init__(self, *args):
1200 """__init__(self) -> b2BufferedPair"""
1201 this = _Box2D2.new_b2BufferedPair(*args)
1202 try: self.this.append(this)
1203 except: self.this = this
1204 __swig_destroy__ = _Box2D2.delete_b2BufferedPair
1205 __del__ = lambda self : None;
1206 b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
1207 b2BufferedPair_swigregister(b2BufferedPair)
1208
1209 class b2PairCallback(_object):
1210 """Proxy of C++ b2PairCallback class"""
1211 __swig_setmethods__ = {}
1212 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
1213 __swig_getmethods__ = {}
1214 __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
1215 def __init__(self): raise AttributeError, "No constructor defined"
1216 __repr__ = _swig_repr
1217 __swig_destroy__ = _Box2D2.delete_b2PairCallback
1218 __del__ = lambda self : None;
1219 def PairAdded(*args):
1220 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
1221 return _Box2D2.b2PairCallback_PairAdded(*args)
1222
1223 def PairRemoved(*args):
1224 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
1225 return _Box2D2.b2PairCallback_PairRemoved(*args)
1226
1227 b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
1228 b2PairCallback_swigregister(b2PairCallback)
1229
1230 class b2PairManager(_object):
1231 """Proxy of C++ b2PairManager class"""
1232 __swig_setmethods__ = {}
1233 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
1234 __swig_getmethods__ = {}
1235 __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
1236 __repr__ = _swig_repr
1237 def __init__(self, *args):
1238 """__init__(self) -> b2PairManager"""
1239 this = _Box2D2.new_b2PairManager(*args)
1240 try: self.this.append(this)
1241 except: self.this = this
1242 def Initialize(*args):
1243 """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
1244 return _Box2D2.b2PairManager_Initialize(*args)
1245
1246 def AddBufferedPair(*args):
1247 """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1248 return _Box2D2.b2PairManager_AddBufferedPair(*args)
1249
1250 def RemoveBufferedPair(*args):
1251 """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1252 return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
1253
1254 def Commit(*args):
1255 """Commit(self)"""
1256 return _Box2D2.b2PairManager_Commit(*args)
1257
1258 __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
1259 __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
1260 if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
1261 __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
1262 __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
1263 if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
1264 __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
1265 __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
1266 if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
1267 __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
1268 __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
1269 if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
1270 __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
1271 __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
1272 if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
1273 __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
1274 __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
1275 if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
1276 __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
1277 __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
1278 if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
1279 __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
1280 __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
1281 if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
1282 __swig_destroy__ = _Box2D2.delete_b2PairManager
1283 __del__ = lambda self : None;
1284 b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
1285 b2PairManager_swigregister(b2PairManager)
1286
1287 class b2Bound(_object):
1288 """Proxy of C++ b2Bound class"""
1289 __swig_setmethods__ = {}
1290 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
1291 __swig_getmethods__ = {}
1292 __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
1293 __repr__ = _swig_repr
1294 def IsLower(*args):
1295 """IsLower(self) -> bool"""
1296 return _Box2D2.b2Bound_IsLower(*args)
1297
1298 def IsUpper(*args):
1299 """IsUpper(self) -> bool"""
1300 return _Box2D2.b2Bound_IsUpper(*args)
1301
1302 __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
1303 __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
1304 if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
1305 __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
1306 __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
1307 if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
1308 __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
1309 __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
1310 if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
1311 def __init__(self, *args):
1312 """__init__(self) -> b2Bound"""
1313 this = _Box2D2.new_b2Bound(*args)
1314 try: self.this.append(this)
1315 except: self.this = this
1316 __swig_destroy__ = _Box2D2.delete_b2Bound
1317 __del__ = lambda self : None;
1318 b2Bound_swigregister = _Box2D2.b2Bound_swigregister
1319 b2Bound_swigregister(b2Bound)
1320 b2_invalid = cvar.b2_invalid
1321 b2_nullEdge = cvar.b2_nullEdge
1322
1323 class b2Proxy(_object):
1324 """Proxy of C++ b2Proxy class"""
1325 __swig_setmethods__ = {}
1326 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
1327 __swig_getmethods__ = {}
1328 __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
1329 __repr__ = _swig_repr
1330 def GetNext(*args):
1331 """GetNext(self) -> uint16"""
1332 return _Box2D2.b2Proxy_GetNext(*args)
1333
1334 def SetNext(*args):
1335 """SetNext(self, uint16 next)"""
1336 return _Box2D2.b2Proxy_SetNext(*args)
1337
1338 def IsValid(*args):
1339 """IsValid(self) -> bool"""
1340 return _Box2D2.b2Proxy_IsValid(*args)
1341
1342 __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
1343 __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
1344 if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
1345 __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
1346 __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
1347 if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
1348 __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
1349 __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
1350 if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
1351 __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
1352 __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
1353 if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
1354 __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
1355 __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
1356 if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
1357 def __init__(self, *args):
1358 """__init__(self) -> b2Proxy"""
1359 this = _Box2D2.new_b2Proxy(*args)
1360 try: self.this.append(this)
1361 except: self.this = this
1362 __swig_destroy__ = _Box2D2.delete_b2Proxy
1363 __del__ = lambda self : None;
1364 b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
1365 b2Proxy_swigregister(b2Proxy)
1366
1367 class b2BroadPhase(_object):
1368 """Proxy of C++ b2BroadPhase class"""
1369 __swig_setmethods__ = {}
1370 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
1371 __swig_getmethods__ = {}
1372 __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
1373 __repr__ = _swig_repr
1374 def __init__(self, *args):
1375 """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
1376 this = _Box2D2.new_b2BroadPhase(*args)
1377 try: self.this.append(this)
1378 except: self.this = this
1379 __swig_destroy__ = _Box2D2.delete_b2BroadPhase
1380 __del__ = lambda self : None;
1381 def InRange(*args):
1382 """InRange(self, b2AABB aabb) -> bool"""
1383 return _Box2D2.b2BroadPhase_InRange(*args)
1384
1385 def CreateProxy(*args):
1386 """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
1387 return _Box2D2.b2BroadPhase_CreateProxy(*args)
1388
1389 def DestroyProxy(*args):
1390 """DestroyProxy(self, int32 proxyId)"""
1391 return _Box2D2.b2BroadPhase_DestroyProxy(*args)
1392
1393 def MoveProxy(*args):
1394 """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
1395 return _Box2D2.b2BroadPhase_MoveProxy(*args)
1396
1397 def Commit(*args):
1398 """Commit(self)"""
1399 return _Box2D2.b2BroadPhase_Commit(*args)
1400
1401 def GetProxy(*args):
1402 """GetProxy(self, int32 proxyId) -> b2Proxy"""
1403 return _Box2D2.b2BroadPhase_GetProxy(*args)
1404
1405 def Query(*args):
1406 """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
1407 return _Box2D2.b2BroadPhase_Query(*args)
1408
1409 def Validate(*args):
1410 """Validate(self)"""
1411 return _Box2D2.b2BroadPhase_Validate(*args)
1412
1413 def ValidatePairs(*args):
1414 """ValidatePairs(self)"""
1415 return _Box2D2.b2BroadPhase_ValidatePairs(*args)
1416
1417 __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
1418 __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
1419 if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
1420 __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
1421 __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
1422 if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
1423 __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
1424 __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
1425 if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
1426 __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
1427 __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
1428 if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
1429 __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
1430 __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
1431 if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
1432 __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
1433 __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
1434 if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
1435 __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
1436 __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
1437 if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
1438 __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
1439 __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
1440 if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
1441 __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
1442 __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
1443 if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
1444 __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
1445 __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
1446 if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
1447 __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
1448 __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
1449 if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
1450 b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
1451 b2BroadPhase_swigregister(b2BroadPhase)
1452
1453 class b2DestructionListener(_object):
1454 """Proxy of C++ b2DestructionListener class"""
1455 __swig_setmethods__ = {}
1456 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
1457 __swig_getmethods__ = {}
1458 __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
1459 __repr__ = _swig_repr
1460 __swig_destroy__ = _Box2D2.delete_b2DestructionListener
1461 __del__ = lambda self : None;
1462 def SayGoodbye(*args):
1463 """
1464 SayGoodbye(self, b2Joint joint)
1465 SayGoodbye(self, b2Shape shape)
1466 """
1467 return _Box2D2.b2DestructionListener_SayGoodbye(*args)
1468
1469 def __init__(self, *args):
1470 """__init__(self) -> b2DestructionListener"""
1471 if self.__class__ == b2DestructionListener:
1472 args = (None,) + args
1473 else:
1474 args = (self,) + args
1475 this = _Box2D2.new_b2DestructionListener(*args)
1476 try: self.this.append(this)
1477 except: self.this = this
1478 def __disown__(self):
1479 self.this.disown()
1480 _Box2D2.disown_b2DestructionListener(self)
1481 return weakref_proxy(self)
1482 b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
1483 b2DestructionListener_swigregister(b2DestructionListener)
1484
1485 class b2BoundaryListener(_object):
1486 """Proxy of C++ b2BoundaryListener class"""
1487 __swig_setmethods__ = {}
1488 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
1489 __swig_getmethods__ = {}
1490 __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
1491 __repr__ = _swig_repr
1492 __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
1493 __del__ = lambda self : None;
1494 def Violation(*args):
1495 """Violation(self, b2Body body)"""
1496 return _Box2D2.b2BoundaryListener_Violation(*args)
1497
1498 def __init__(self, *args):
1499 """__init__(self) -> b2BoundaryListener"""
1500 if self.__class__ == b2BoundaryListener:
1501 args = (None,) + args
1502 else:
1503 args = (self,) + args
1504 this = _Box2D2.new_b2BoundaryListener(*args)
1505 try: self.this.append(this)
1506 except: self.this = this
1507 def __disown__(self):
1508 self.this.disown()
1509 _Box2D2.disown_b2BoundaryListener(self)
1510 return weakref_proxy(self)
1511 b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
1512 b2BoundaryListener_swigregister(b2BoundaryListener)
1513
1514 class b2ContactFilter(_object):
1515 """Proxy of C++ b2ContactFilter class"""
1516 __swig_setmethods__ = {}
1517 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
1518 __swig_getmethods__ = {}
1519 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
1520 __repr__ = _swig_repr
1521 __swig_destroy__ = _Box2D2.delete_b2ContactFilter
1522 __del__ = lambda self : None;
1523 def ShouldCollide(*args):
1524 """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
1525 return _Box2D2.b2ContactFilter_ShouldCollide(*args)
1526
1527 def __init__(self, *args):
1528 """__init__(self) -> b2ContactFilter"""
1529 this = _Box2D2.new_b2ContactFilter(*args)
1530 try: self.this.append(this)
1531 except: self.this = this
1532 b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
1533 b2ContactFilter_swigregister(b2ContactFilter)
1534
1535 class b2ContactListener(_object):
1536 """Proxy of C++ b2ContactListener class"""
1537 __swig_setmethods__ = {}
1538 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
1539 __swig_getmethods__ = {}
1540 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
1541 __repr__ = _swig_repr
1542 __swig_destroy__ = _Box2D2.delete_b2ContactListener
1543 __del__ = lambda self : None;
1544 def Add(*args):
1545 """Add(self, b2ContactPoint point)"""
1546 return _Box2D2.b2ContactListener_Add(*args)
1547
1548 def Persist(*args):
1549 """Persist(self, b2ContactPoint point)"""
1550 return _Box2D2.b2ContactListener_Persist(*args)
1551
1552 def Remove(*args):
1553 """Remove(self, b2ContactPoint point)"""
1554 return _Box2D2.b2ContactListener_Remove(*args)
1555
1556 def __init__(self, *args):
1557 """__init__(self) -> b2ContactListener"""
1558 if self.__class__ == b2ContactListener:
1559 args = (None,) + args
1560 else:
1561 args = (self,) + args
1562 this = _Box2D2.new_b2ContactListener(*args)
1563 try: self.this.append(this)
1564 except: self.this = this
1565 def __disown__(self):
1566 self.this.disown()
1567 _Box2D2.disown_b2ContactListener(self)
1568 return weakref_proxy(self)
1569 b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
1570 b2ContactListener_swigregister(b2ContactListener)
1571
1572 class b2Color(_object):
1573 """Proxy of C++ b2Color class"""
1574 __swig_setmethods__ = {}
1575 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
1576 __swig_getmethods__ = {}
1577 __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
1578 __repr__ = _swig_repr
1579 def __init__(self, *args):
1580 """
1581 __init__(self) -> b2Color
1582 __init__(self, float32 r, float32 g, float32 b) -> b2Color
1583 """
1584 this = _Box2D2.new_b2Color(*args)
1585 try: self.this.append(this)
1586 except: self.this = this
1587 __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
1588 __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
1589 if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
1590 __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
1591 __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
1592 if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
1593 __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
1594 __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
1595 if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
1596 __swig_destroy__ = _Box2D2.delete_b2Color
1597 __del__ = lambda self : None;
1598 b2Color_swigregister = _Box2D2.b2Color_swigregister
1599 b2Color_swigregister(b2Color)
1600
1601 class b2DebugDraw(_object):
1602 """Proxy of C++ b2DebugDraw class"""
1603 __swig_setmethods__ = {}
1604 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
1605 __swig_getmethods__ = {}
1606 __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
1607 __repr__ = _swig_repr
1608 def __init__(self, *args):
1609 """__init__(self) -> b2DebugDraw"""
1610 if self.__class__ == b2DebugDraw:
1611 args = (None,) + args
1612 else:
1613 args = (self,) + args
1614 this = _Box2D2.new_b2DebugDraw(*args)
1615 try: self.this.append(this)
1616 except: self.this = this
1617 __swig_destroy__ = _Box2D2.delete_b2DebugDraw
1618 __del__ = lambda self : None;
1619 e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
1620 e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
1621 e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
1622 e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
1623 e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
1624 e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
1625 e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
1626 def SetFlags(*args):
1627 """SetFlags(self, uint32 flags)"""
1628 return _Box2D2.b2DebugDraw_SetFlags(*args)
1629
1630 def GetFlags(*args):
1631 """GetFlags(self) -> uint32"""
1632 return _Box2D2.b2DebugDraw_GetFlags(*args)
1633
1634 def AppendFlags(*args):
1635 """AppendFlags(self, uint32 flags)"""
1636 return _Box2D2.b2DebugDraw_AppendFlags(*args)
1637
1638 def ClearFlags(*args):
1639 """ClearFlags(self, uint32 flags)"""
1640 return _Box2D2.b2DebugDraw_ClearFlags(*args)
1641
1642 def DrawPolygon(*args):
1643 """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1644 return _Box2D2.b2DebugDraw_DrawPolygon(*args)
1645
1646 def DrawSolidPolygon(*args):
1647 """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1648 return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
1649
1650 def DrawCircle(*args):
1651 """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
1652 return _Box2D2.b2DebugDraw_DrawCircle(*args)
1653
1654 def DrawSolidCircle(*args):
1655 """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
1656 return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
1657
1658 def DrawSegment(*args):
1659 """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
1660 return _Box2D2.b2DebugDraw_DrawSegment(*args)
1661
1662 def DrawXForm(*args):
1663 """DrawXForm(self, b2XForm xf)"""
1664 return _Box2D2.b2DebugDraw_DrawXForm(*args)
1665
1666 def __disown__(self):
1667 self.this.disown()
1668 _Box2D2.disown_b2DebugDraw(self)
1669 return weakref_proxy(self)
1670 b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
1671 b2DebugDraw_swigregister(b2DebugDraw)
1672
1673 class b2BlockAllocator(_object):
1674 """Proxy of C++ b2BlockAllocator class"""
1675 __swig_setmethods__ = {}
1676 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
1677 __swig_getmethods__ = {}
1678 __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
1679 __repr__ = _swig_repr
1680 def __init__(self, *args):
1681 """__init__(self) -> b2BlockAllocator"""
1682 this = _Box2D2.new_b2BlockAllocator(*args)
1683 try: self.this.append(this)
1684 except: self.this = this
1685 __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
1686 __del__ = lambda self : None;
1687 def Allocate(*args):
1688 """Allocate(self, int32 size) -> void"""
1689 return _Box2D2.b2BlockAllocator_Allocate(*args)
1690
1691 def Free(*args):
1692 """Free(self, void p, int32 size)"""
1693 return _Box2D2.b2BlockAllocator_Free(*args)
1694
1695 def Clear(*args):
1696 """Clear(self)"""
1697 return _Box2D2.b2BlockAllocator_Clear(*args)
1698
1699 b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
1700 b2BlockAllocator_swigregister(b2BlockAllocator)
1701 b2_chunkSize = cvar.b2_chunkSize
1702 b2_maxBlockSize = cvar.b2_maxBlockSize
1703 b2_blockSizes = cvar.b2_blockSizes
1704 b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
1705
1706 class b2StackEntry(_object):
1707 """Proxy of C++ b2StackEntry class"""
1708 __swig_setmethods__ = {}
1709 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
1710 __swig_getmethods__ = {}
1711 __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
1712 __repr__ = _swig_repr
1713 __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
1714 __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
1715 if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
1716 __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
1717 __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
1718 if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
1719 __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
1720 __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
1721 if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
1722 def __init__(self, *args):
1723 """__init__(self) -> b2StackEntry"""
1724 this = _Box2D2.new_b2StackEntry(*args)
1725 try: self.this.append(this)
1726 except: self.this = this
1727 __swig_destroy__ = _Box2D2.delete_b2StackEntry
1728 __del__ = lambda self : None;
1729 b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
1730 b2StackEntry_swigregister(b2StackEntry)
1731 b2_stackSize = cvar.b2_stackSize
1732 b2_maxStackEntries = cvar.b2_maxStackEntries
1733
1734 class b2StackAllocator(_object):
1735 """Proxy of C++ b2StackAllocator class"""
1736 __swig_setmethods__ = {}
1737 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
1738 __swig_getmethods__ = {}
1739 __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
1740 __repr__ = _swig_repr
1741 def __init__(self, *args):
1742 """__init__(self) -> b2StackAllocator"""
1743 this = _Box2D2.new_b2StackAllocator(*args)
1744 try: self.this.append(this)
1745 except: self.this = this
1746 __swig_destroy__ = _Box2D2.delete_b2StackAllocator
1747 __del__ = lambda self : None;
1748 def Allocate(*args):
1749 """Allocate(self, int32 size) -> void"""
1750 return _Box2D2.b2StackAllocator_Allocate(*args)
1751
1752 def Free(*args):
1753 """Free(self, void p)"""
1754 return _Box2D2.b2StackAllocator_Free(*args)
1755
1756 def GetMaxAllocation(*args):
1757 """GetMaxAllocation(self) -> int32"""
1758 return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
1759
1760 b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
1761 b2StackAllocator_swigregister(b2StackAllocator)
1762
1763 class b2ContactRegister(_object):
1764 """Proxy of C++ b2ContactRegister class"""
1765 __swig_setmethods__ = {}
1766 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
1767 __swig_getmethods__ = {}
1768 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
1769 __repr__ = _swig_repr
1770 __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
1771 __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
1772 if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
1773 __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
1774 __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
1775 if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
1776 __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
1777 __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
1778 if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
1779 def __init__(self, *args):
1780 """__init__(self) -> b2ContactRegister"""
1781 this = _Box2D2.new_b2ContactRegister(*args)
1782 try: self.this.append(this)
1783 except: self.this = this
1784 __swig_destroy__ = _Box2D2.delete_b2ContactRegister
1785 __del__ = lambda self : None;
1786 b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
1787 b2ContactRegister_swigregister(b2ContactRegister)
1788
1789 class b2ContactEdge(_object):
1790 """Proxy of C++ b2ContactEdge class"""
1791 __swig_setmethods__ = {}
1792 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
1793 __swig_getmethods__ = {}
1794 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
1795 __repr__ = _swig_repr
1796 __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
1797 __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
1798 if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
1799 __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
1800 __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
1801 if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
1802 __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
1803 __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
1804 if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
1805 __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
1806 __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
1807 if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
1808 def __init__(self, *args):
1809 """__init__(self) -> b2ContactEdge"""
1810 this = _Box2D2.new_b2ContactEdge(*args)
1811 try: self.this.append(this)
1812 except: self.this = this
1813 __swig_destroy__ = _Box2D2.delete_b2ContactEdge
1814 __del__ = lambda self : None;
1815 b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
1816 b2ContactEdge_swigregister(b2ContactEdge)
1817
1818 class b2ContactPoint(_object):
1819 """Proxy of C++ b2ContactPoint class"""
1820 __swig_setmethods__ = {}
1821 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
1822 __swig_getmethods__ = {}
1823 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
1824 __repr__ = _swig_repr
1825 __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
1826 __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
1827 if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
1828 __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
1829 __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
1830 if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
1831 __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
1832 __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
1833 if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
1834 __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
1835 __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
1836 if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
1837 __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
1838 __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
1839 if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
1840 __swig_setmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_set
1841 __swig_getmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_get
1842 if _newclass:normalForce = _swig_property(_Box2D2.b2ContactPoint_normalForce_get, _Box2D2.b2ContactPoint_normalForce_set)
1843 __swig_setmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_set
1844 __swig_getmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_get
1845 if _newclass:tangentForce = _swig_property(_Box2D2.b2ContactPoint_tangentForce_get, _Box2D2.b2ContactPoint_tangentForce_set)
1846 __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
1847 __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
1848 if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
1849 def __repr__(self):
1850 return "b2ContactPoint(\n\tShape1: %s\n\tShape2:%s\n\tPosition: %s\n\tNormal: %s)" % (self.shape1, self.shape2, self.position, self.normal)
1851
1852 def __init__(self, *args):
1853 """__init__(self) -> b2ContactPoint"""
1854 this = _Box2D2.new_b2ContactPoint(*args)
1855 try: self.this.append(this)
1856 except: self.this = this
1857 __swig_destroy__ = _Box2D2.delete_b2ContactPoint
1858 __del__ = lambda self : None;
1859 b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
1860 b2ContactPoint_swigregister(b2ContactPoint)
1861
1862 class b2Contact(_object):
1863 """Proxy of C++ b2Contact class"""
1864 __swig_setmethods__ = {}
1865 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
1866 __swig_getmethods__ = {}
1867 __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
1868 def __init__(self): raise AttributeError, "No constructor defined"
1869 __repr__ = _swig_repr
1870 def GetManifolds(*args):
1871 """GetManifolds(self) -> b2Manifold"""
1872 return _Box2D2.b2Contact_GetManifolds(*args)
1873
1874 def GetManifoldCount(*args):
1875 """GetManifoldCount(self) -> int32"""
1876 return _Box2D2.b2Contact_GetManifoldCount(*args)
1877
1878 def IsSolid(*args):
1879 """IsSolid(self) -> bool"""
1880 return _Box2D2.b2Contact_IsSolid(*args)
1881
1882 def GetNext(*args):
1883 """GetNext(self) -> b2Contact"""
1884 return _Box2D2.b2Contact_GetNext(*args)
1885
1886 def GetShape1(*args):
1887 """GetShape1(self) -> b2Shape"""
1888 return _Box2D2.b2Contact_GetShape1(*args)
1889
1890 def GetShape2(*args):
1891 """GetShape2(self) -> b2Shape"""
1892 return _Box2D2.b2Contact_GetShape2(*args)
1893
1894 e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
1895 e_slowFlag = _Box2D2.b2Contact_e_slowFlag
1896 e_islandFlag = _Box2D2.b2Contact_e_islandFlag
1897 e_toiFlag = _Box2D2.b2Contact_e_toiFlag
1898 def AddType(*args):
1899 """
1900 AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
1901 b2ShapeType type1, b2ShapeType type2)
1902 """
1903 return _Box2D2.b2Contact_AddType(*args)
1904
1905 if _newclass:AddType = staticmethod(AddType)
1906 __swig_getmethods__["AddType"] = lambda x: AddType
1907 def InitializeRegisters(*args):
1908 """InitializeRegisters()"""
1909 return _Box2D2.b2Contact_InitializeRegisters(*args)
1910
1911 if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
1912 __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
1913 def Create(*args):
1914 """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
1915 return _Box2D2.b2Contact_Create(*args)
1916
1917 if _newclass:Create = staticmethod(Create)
1918 __swig_getmethods__["Create"] = lambda x: Create
1919 def Destroy(*args):
1920 """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
1921 return _Box2D2.b2Contact_Destroy(*args)
1922
1923 if _newclass:Destroy = staticmethod(Destroy)
1924 __swig_getmethods__["Destroy"] = lambda x: Destroy
1925 __swig_destroy__ = _Box2D2.delete_b2Contact
1926 __del__ = lambda self : None;
1927 def Update(*args):
1928 """Update(self, b2ContactListener listener)"""
1929 return _Box2D2.b2Contact_Update(*args)
1930
1931 def Evaluate(*args):
1932 """Evaluate(self, b2ContactListener listener)"""
1933 return _Box2D2.b2Contact_Evaluate(*args)
1934
1935 __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
1936 __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
1937 if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
1938 __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
1939 __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
1940 if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
1941 __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
1942 __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
1943 if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
1944 __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
1945 __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
1946 if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
1947 __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
1948 __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
1949 if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
1950 __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
1951 __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
1952 if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
1953 __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
1954 __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
1955 if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
1956 __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
1957 __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
1958 if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
1959 __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
1960 __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
1961 if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
1962 __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
1963 __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
1964 if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
1965 __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
1966 __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
1967 if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
1968 __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
1969 __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
1970 if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
1971 __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
1972 __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
1973 if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
1974 b2Contact_swigregister = _Box2D2.b2Contact_swigregister
1975 b2Contact_swigregister(b2Contact)
1976
1977 def b2Contact_AddType(*args):
1978 """
1979 b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
1980 b2ShapeType type1, b2ShapeType type2)
1981 """
1982 return _Box2D2.b2Contact_AddType(*args)
1983
1984 def b2Contact_InitializeRegisters(*args):
1985 """b2Contact_InitializeRegisters()"""
1986 return _Box2D2.b2Contact_InitializeRegisters(*args)
1987
1988 def b2Contact_Create(*args):
1989 """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
1990 return _Box2D2.b2Contact_Create(*args)
1991
1992 def b2Contact_Destroy(*args):
1993 """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
1994 return _Box2D2.b2Contact_Destroy(*args)
1995
1996 class b2NullContact(b2Contact):
1997 """Proxy of C++ b2NullContact class"""
1998 __swig_setmethods__ = {}
1999 for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2000 __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
2001 __swig_getmethods__ = {}
2002 for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2003 __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
2004 __repr__ = _swig_repr
2005 def __init__(self, *args):
2006 """__init__(self) -> b2NullContact"""
2007 this = _Box2D2.new_b2NullContact(*args)
2008 try: self.this.append(this)
2009 except: self.this = this
2010 def Evaluate(*args):
2011 """Evaluate(self, b2ContactListener ?)"""
2012 return _Box2D2.b2NullContact_Evaluate(*args)
2013
2014 def GetManifolds(*args):
2015 """GetManifolds(self) -> b2Manifold"""
2016 return _Box2D2.b2NullContact_GetManifolds(*args)
2017
2018 __swig_destroy__ = _Box2D2.delete_b2NullContact
2019 __del__ = lambda self : None;
2020 b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
2021 b2NullContact_swigregister(b2NullContact)
2022
2023 class b2ContactManager(b2PairCallback):
2024 """Proxy of C++ b2ContactManager class"""
2025 __swig_setmethods__ = {}
2026 for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2027 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
2028 __swig_getmethods__ = {}
2029 for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2030 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
2031 __repr__ = _swig_repr
2032 def __init__(self, *args):
2033 """__init__(self) -> b2ContactManager"""
2034 this = _Box2D2.new_b2ContactManager(*args)
2035 try: self.this.append(this)
2036 except: self.this = this
2037 def PairAdded(*args):
2038 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
2039 return _Box2D2.b2ContactManager_PairAdded(*args)
2040
2041 def PairRemoved(*args):
2042 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
2043 return _Box2D2.b2ContactManager_PairRemoved(*args)
2044
2045 def Destroy(*args):
2046 """Destroy(self, b2Contact c)"""
2047 return _Box2D2.b2ContactManager_Destroy(*args)
2048
2049 def Collide(*args):
2050 """Collide(self)"""
2051 return _Box2D2.b2ContactManager_Collide(*args)
2052
2053 __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
2054 __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
2055 if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
2056 __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
2057 __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
2058 if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
2059 __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
2060 __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
2061 if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
2062 __swig_destroy__ = _Box2D2.delete_b2ContactManager
2063 __del__ = lambda self : None;
2064 b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
2065 b2ContactManager_swigregister(b2ContactManager)
2066
2067 class b2TimeStep(_object):
2068 """Proxy of C++ b2TimeStep class"""
2069 __swig_setmethods__ = {}
2070 __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
2071 __swig_getmethods__ = {}
2072 __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
2073 __repr__ = _swig_repr
2074 __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
2075 __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
2076 if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
2077 __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
2078 __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
2079 if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
2080 __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
2081 __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
2082 if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
2083 def __init__(self, *args):
2084 """__init__(self) -> b2TimeStep"""
2085 this = _Box2D2.new_b2TimeStep(*args)
2086 try: self.this.append(this)
2087 except: self.this = this
2088 __swig_destroy__ = _Box2D2.delete_b2TimeStep
2089 __del__ = lambda self : None;
2090 b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
2091 b2TimeStep_swigregister(b2TimeStep)
2092
2093 class b2World(_object):
2094 """Proxy of C++ b2World class"""
2095 __swig_setmethods__ = {}
2096 __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
2097 __swig_getmethods__ = {}
2098 __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
2099 __repr__ = _swig_repr
2100 def __init__(self, *args):
2101 """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
2102 this = _Box2D2.new_b2World(*args)
2103 try: self.this.append(this)
2104 except: self.this = this
2105 __swig_destroy__ = _Box2D2.delete_b2World
2106 __del__ = lambda self : None;
2107 def SetFilter(*args):
2108 """SetFilter(self, b2ContactFilter filter)"""
2109 return _Box2D2.b2World_SetFilter(*args)
2110
2111 def SetListener(*args):
2112 """
2113 SetListener(self, b2DestructionListener listener)
2114 SetListener(self, b2BoundaryListener listener)
2115 SetListener(self, b2ContactListener listener)
2116 """
2117 return _Box2D2.b2World_SetListener(*args)
2118
2119 def SetDebugDraw(*args):
2120 """SetDebugDraw(self, b2DebugDraw debugDraw)"""
2121 return _Box2D2.b2World_SetDebugDraw(*args)
2122
2123 def CreateStaticBody(*args):
2124 """CreateStaticBody(self, b2BodyDef def) -> b2Body"""
2125 return _Box2D2.b2World_CreateStaticBody(*args)
2126
2127 def CreateDynamicBody(*args):
2128 """CreateDynamicBody(self, b2BodyDef def) -> b2Body"""
2129 return _Box2D2.b2World_CreateDynamicBody(*args)
2130
2131 def DestroyBody(*args):
2132 """DestroyBody(self, b2Body body)"""
2133 return _Box2D2.b2World_DestroyBody(*args)
2134
2135 def CreateJoint(*args):
2136 """CreateJoint(self, b2JointDef def) -> b2Joint"""
2137 return _Box2D2.b2World_CreateJoint(*args)
2138
2139 def DestroyJoint(*args):
2140 """DestroyJoint(self, b2Joint joint)"""
2141 return _Box2D2.b2World_DestroyJoint(*args)
2142
2143 def GetGroundBody(*args):
2144 """GetGroundBody(self) -> b2Body"""
2145 return _Box2D2.b2World_GetGroundBody(*args)
2146
2147 def Step(*args):
2148 """Step(self, float32 timeStep, int32 iterations)"""
2149 return _Box2D2.b2World_Step(*args)
2150
2151 def Query(*args):
2152 """Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32"""
2153 return _Box2D2.b2World_Query(*args)
2154
2155 def GetBodyList(*args):
2156 """GetBodyList(self) -> b2Body"""
2157 return _Box2D2.b2World_GetBodyList(*args)
2158
2159 def GetJointList(*args):
2160 """GetJointList(self) -> b2Joint"""
2161 return _Box2D2.b2World_GetJointList(*args)
2162
2163 def SetGravity(*args):
2164 """SetGravity(self, b2Vec2 g)"""
2165 return _Box2D2.b2World_SetGravity(*args)
2166
2167 def Solve(*args):
2168 """Solve(self, b2TimeStep step)"""
2169 return _Box2D2.b2World_Solve(*args)
2170
2171 def SolveTOI(*args):
2172 """SolveTOI(self, b2TimeStep step)"""
2173 return _Box2D2.b2World_SolveTOI(*args)
2174
2175 def DrawJoint(*args):
2176 """DrawJoint(self, b2Joint joint)"""
2177 return _Box2D2.b2World_DrawJoint(*args)
2178
2179 def DrawShape(*args):
2180 """DrawShape(self, b2Shape shape, b2XForm xf, b2Color color, bool core)"""
2181 return _Box2D2.b2World_DrawShape(*args)
2182
2183 def DrawDebugData(*args):
2184 """DrawDebugData(self)"""
2185 return _Box2D2.b2World_DrawDebugData(*args)
2186
2187 __swig_setmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_set
2188 __swig_getmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_get
2189 if _newclass:m_blockAllocator = _swig_property(_Box2D2.b2World_m_blockAllocator_get, _Box2D2.b2World_m_blockAllocator_set)
2190 __swig_setmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_set
2191 __swig_getmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_get
2192 if _newclass:m_stackAllocator = _swig_property(_Box2D2.b2World_m_stackAllocator_get, _Box2D2.b2World_m_stackAllocator_set)
2193 __swig_setmethods__["m_lock"] = _Box2D2.b2World_m_lock_set
2194 __swig_getmethods__["m_lock"] = _Box2D2.b2World_m_lock_get
2195 if _newclass:m_lock = _swig_property(_Box2D2.b2World_m_lock_get, _Box2D2.b2World_m_lock_set)
2196 __swig_setmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_set
2197 __swig_getmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_get
2198 if _newclass:m_broadPhase = _swig_property(_Box2D2.b2World_m_broadPhase_get, _Box2D2.b2World_m_broadPhase_set)
2199 __swig_setmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_set
2200 __swig_getmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_get
2201 if _newclass:m_contactManager = _swig_property(_Box2D2.b2World_m_contactManager_get, _Box2D2.b2World_m_contactManager_set)
2202 __swig_setmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_set
2203 __swig_getmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_get
2204 if _newclass:m_bodyList = _swig_property(_Box2D2.b2World_m_bodyList_get, _Box2D2.b2World_m_bodyList_set)
2205 __swig_setmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_set
2206 __swig_getmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_get
2207 if _newclass:m_jointList = _swig_property(_Box2D2.b2World_m_jointList_get, _Box2D2.b2World_m_jointList_set)
2208 __swig_setmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_set
2209 __swig_getmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_get
2210 if _newclass:m_contactList = _swig_property(_Box2D2.b2World_m_contactList_get, _Box2D2.b2World_m_contactList_set)
2211 __swig_setmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_set
2212 __swig_getmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_get
2213 if _newclass:m_bodyCount = _swig_property(_Box2D2.b2World_m_bodyCount_get, _Box2D2.b2World_m_bodyCount_set)
2214 __swig_setmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_set
2215 __swig_getmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_get
2216 if _newclass:m_contactCount = _swig_property(_Box2D2.b2World_m_contactCount_get, _Box2D2.b2World_m_contactCount_set)
2217 __swig_setmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_set
2218 __swig_getmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_get
2219 if _newclass:m_jointCount = _swig_property(_Box2D2.b2World_m_jointCount_get, _Box2D2.b2World_m_jointCount_set)
2220 __swig_setmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_set
2221 __swig_getmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_get
2222 if _newclass:m_gravity = _swig_property(_Box2D2.b2World_m_gravity_get, _Box2D2.b2World_m_gravity_set)
2223 __swig_setmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_set
2224 __swig_getmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_get
2225 if _newclass:m_allowSleep = _swig_property(_Box2D2.b2World_m_allowSleep_get, _Box2D2.b2World_m_allowSleep_set)
2226 __swig_setmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_set
2227 __swig_getmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_get
2228 if _newclass:m_groundBody = _swig_property(_Box2D2.b2World_m_groundBody_get, _Box2D2.b2World_m_groundBody_set)
2229 __swig_setmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_set
2230 __swig_getmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_get
2231 if _newclass:m_destructionListener = _swig_property(_Box2D2.b2World_m_destructionListener_get, _Box2D2.b2World_m_destructionListener_set)
2232 __swig_setmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_set
2233 __swig_getmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_get
2234 if _newclass:m_boundaryListener = _swig_property(_Box2D2.b2World_m_boundaryListener_get, _Box2D2.b2World_m_boundaryListener_set)
2235 __swig_setmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_set
2236 __swig_getmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_get
2237 if _newclass:m_contactFilter = _swig_property(_Box2D2.b2World_m_contactFilter_get, _Box2D2.b2World_m_contactFilter_set)
2238 __swig_setmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_set
2239 __swig_getmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_get
2240 if _newclass:m_contactListener = _swig_property(_Box2D2.b2World_m_contactListener_get, _Box2D2.b2World_m_contactListener_set)
2241 __swig_setmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_set
2242 __swig_getmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_get
2243 if _newclass:m_debugDraw = _swig_property(_Box2D2.b2World_m_debugDraw_get, _Box2D2.b2World_m_debugDraw_set)
2244 __swig_setmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_set
2245 __swig_getmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_get
2246 if _newclass:m_positionIterationCount = _swig_property(_Box2D2.b2World_m_positionIterationCount_get, _Box2D2.b2World_m_positionIterationCount_set)
2247 __swig_setmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_set
2248 __swig_getmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_get
2249 if _newclass:s_enablePositionCorrection = _swig_property(_Box2D2.b2World_s_enablePositionCorrection_get, _Box2D2.b2World_s_enablePositionCorrection_set)
2250 __swig_setmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_set
2251 __swig_getmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_get
2252 if _newclass:s_enableWarmStarting = _swig_property(_Box2D2.b2World_s_enableWarmStarting_get, _Box2D2.b2World_s_enableWarmStarting_set)
2253 __swig_setmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_set
2254 __swig_getmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_get
2255 if _newclass:s_enableTOI = _swig_property(_Box2D2.b2World_s_enableTOI_get, _Box2D2.b2World_s_enableTOI_set)
2256 b2World_swigregister = _Box2D2.b2World_swigregister
2257 b2World_swigregister(b2World)
2258
2259 e_unknownJoint = _Box2D2.e_unknownJoint
2260 e_revoluteJoint = _Box2D2.e_revoluteJoint
2261 e_prismaticJoint = _Box2D2.e_prismaticJoint
2262 e_distanceJoint = _Box2D2.e_distanceJoint
2263 e_pulleyJoint = _Box2D2.e_pulleyJoint
2264 e_mouseJoint = _Box2D2.e_mouseJoint
2265 e_gearJoint = _Box2D2.e_gearJoint
2266 e_inactiveLimit = _Box2D2.e_inactiveLimit
2267 e_atLowerLimit = _Box2D2.e_atLowerLimit
2268 e_atUpperLimit = _Box2D2.e_atUpperLimit
2269 e_equalLimits = _Box2D2.e_equalLimits
2270 class b2Jacobian(_object):
2271 """Proxy of C++ b2Jacobian class"""
2272 __swig_setmethods__ = {}
2273 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
2274 __swig_getmethods__ = {}
2275 __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
2276 __repr__ = _swig_repr
2277 __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
2278 __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
2279 if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
2280 __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
2281 __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
2282 if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
2283 __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
2284 __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
2285 if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
2286 __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
2287 __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
2288 if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
2289 def SetZero(*args):
2290 """SetZero(self)"""
2291 return _Box2D2.b2Jacobian_SetZero(*args)
2292
2293 def Set(*args):
2294 """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
2295 return _Box2D2.b2Jacobian_Set(*args)
2296
2297 def Compute(*args):
2298 """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
2299 return _Box2D2.b2Jacobian_Compute(*args)
2300
2301 def __init__(self, *args):
2302 """__init__(self) -> b2Jacobian"""
2303 this = _Box2D2.new_b2Jacobian(*args)
2304 try: self.this.append(this)
2305 except: self.this = this
2306 __swig_destroy__ = _Box2D2.delete_b2Jacobian
2307 __del__ = lambda self : None;
2308 b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
2309 b2Jacobian_swigregister(b2Jacobian)
2310
2311 class b2JointEdge(_object):
2312 """Proxy of C++ b2JointEdge class"""
2313 __swig_setmethods__ = {}
2314 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
2315 __swig_getmethods__ = {}
2316 __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
2317 __repr__ = _swig_repr
2318 __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
2319 __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
2320 if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
2321 __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
2322 __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
2323 if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
2324 __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
2325 __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
2326 if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
2327 __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
2328 __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
2329 if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
2330 def __init__(self, *args):
2331 """__init__(self) -> b2JointEdge"""
2332 this = _Box2D2.new_b2JointEdge(*args)
2333 try: self.this.append(this)
2334 except: self.this = this
2335 __swig_destroy__ = _Box2D2.delete_b2JointEdge
2336 __del__ = lambda self : None;
2337 b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
2338 b2JointEdge_swigregister(b2JointEdge)
2339
2340 class b2JointDef(_object):
2341 """Proxy of C++ b2JointDef class"""
2342 __swig_setmethods__ = {}
2343 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
2344 __swig_getmethods__ = {}
2345 __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
2346 __repr__ = _swig_repr
2347 def __init__(self, *args):
2348 """__init__(self) -> b2JointDef"""
2349 this = _Box2D2.new_b2JointDef(*args)
2350 try: self.this.append(this)
2351 except: self.this = this
2352 __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
2353 __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
2354 if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
2355 __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
2356 __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
2357 if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
2358 __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
2359 __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
2360 if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
2361 __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
2362 __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
2363 if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
2364 __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
2365 __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
2366 if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
2367 __swig_destroy__ = _Box2D2.delete_b2JointDef
2368 __del__ = lambda self : None;
2369 b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
2370 b2JointDef_swigregister(b2JointDef)
2371
2372 class b2Joint(_object):
2373 """Proxy of C++ b2Joint class"""
2374 __swig_setmethods__ = {}
2375 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
2376 __swig_getmethods__ = {}
2377 __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
2378 def __init__(self): raise AttributeError, "No constructor defined"
2379 __repr__ = _swig_repr
2380 def GetType(*args):
2381 """GetType(self) -> int"""
2382 return _Box2D2.b2Joint_GetType(*args)
2383
2384 def GetBody1(*args):
2385 """GetBody1(self) -> b2Body"""
2386 return _Box2D2.b2Joint_GetBody1(*args)
2387
2388 def GetBody2(*args):
2389 """GetBody2(self) -> b2Body"""
2390 return _Box2D2.b2Joint_GetBody2(*args)
2391
2392 def GetAnchor1(*args):
2393 """GetAnchor1(self) -> b2Vec2"""
2394 return _Box2D2.b2Joint_GetAnchor1(*args)
2395
2396 def GetAnchor2(*args):
2397 """GetAnchor2(self) -> b2Vec2"""
2398 return _Box2D2.b2Joint_GetAnchor2(*args)
2399
2400 def GetReactionForce(*args):
2401 """GetReactionForce(self) -> b2Vec2"""
2402 return _Box2D2.b2Joint_GetReactionForce(*args)
2403
2404 def GetReactionTorque(*args):
2405 """GetReactionTorque(self) -> float32"""
2406 return _Box2D2.b2Joint_GetReactionTorque(*args)
2407
2408 def GetNext(*args):
2409 """GetNext(self) -> b2Joint"""
2410 return _Box2D2.b2Joint_GetNext(*args)
2411
2412 def GetUserData(*args):
2413 """GetUserData(self) -> void"""
2414 return _Box2D2.b2Joint_GetUserData(*args)
2415
2416 def Create(*args):
2417 """Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
2418 return _Box2D2.b2Joint_Create(*args)
2419
2420 if _newclass:Create = staticmethod(Create)
2421 __swig_getmethods__["Create"] = lambda x: Create
2422 def Destroy(*args):
2423 """Destroy(b2Joint joint, b2BlockAllocator allocator)"""
2424 return _Box2D2.b2Joint_Destroy(*args)
2425
2426 if _newclass:Destroy = staticmethod(Destroy)
2427 __swig_getmethods__["Destroy"] = lambda x: Destroy
2428 __swig_destroy__ = _Box2D2.delete_b2Joint
2429 __del__ = lambda self : None;
2430 def InitVelocityConstraints(*args):
2431 """InitVelocityConstraints(self, b2TimeStep step)"""
2432 return _Box2D2.b2Joint_InitVelocityConstraints(*args)
2433
2434 def SolveVelocityConstraints(*args):
2435 """SolveVelocityConstraints(self, b2TimeStep step)"""
2436 return _Box2D2.b2Joint_SolveVelocityConstraints(*args)
2437
2438 def InitPositionConstraints(*args):
2439 """InitPositionConstraints(self)"""
2440 return _Box2D2.b2Joint_InitPositionConstraints(*args)
2441
2442 def SolvePositionConstraints(*args):
2443 """SolvePositionConstraints(self) -> bool"""
2444 return _Box2D2.b2Joint_SolvePositionConstraints(*args)
2445
2446 __swig_setmethods__["m_type"] = _Box2D2.b2Joint_m_type_set
2447 __swig_getmethods__["m_type"] = _Box2D2.b2Joint_m_type_get
2448 if _newclass:m_type = _swig_property(_Box2D2.b2Joint_m_type_get, _Box2D2.b2Joint_m_type_set)
2449 __swig_setmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_set
2450 __swig_getmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_get
2451 if _newclass:m_prev = _swig_property(_Box2D2.b2Joint_m_prev_get, _Box2D2.b2Joint_m_prev_set)
2452 __swig_setmethods__["m_next"] = _Box2D2.b2Joint_m_next_set
2453 __swig_getmethods__["m_next"] = _Box2D2.b2Joint_m_next_get
2454 if _newclass:m_next = _swig_property(_Box2D2.b2Joint_m_next_get, _Box2D2.b2Joint_m_next_set)
2455 __swig_setmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_set
2456 __swig_getmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_get
2457 if _newclass:m_node1 = _swig_property(_Box2D2.b2Joint_m_node1_get, _Box2D2.b2Joint_m_node1_set)
2458 __swig_setmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_set
2459 __swig_getmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_get
2460 if _newclass:m_node2 = _swig_property(_Box2D2.b2Joint_m_node2_get, _Box2D2.b2Joint_m_node2_set)
2461 __swig_setmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_set
2462 __swig_getmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_get
2463 if _newclass:m_body1 = _swig_property(_Box2D2.b2Joint_m_body1_get, _Box2D2.b2Joint_m_body1_set)
2464 __swig_setmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_set
2465 __swig_getmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_get
2466 if _newclass:m_body2 = _swig_property(_Box2D2.b2Joint_m_body2_get, _Box2D2.b2Joint_m_body2_set)
2467 __swig_setmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_set
2468 __swig_getmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_get
2469 if _newclass:m_islandFlag = _swig_property(_Box2D2.b2Joint_m_islandFlag_get, _Box2D2.b2Joint_m_islandFlag_set)
2470 __swig_setmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_set
2471 __swig_getmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_get
2472 if _newclass:m_collideConnected = _swig_property(_Box2D2.b2Joint_m_collideConnected_get, _Box2D2.b2Joint_m_collideConnected_set)
2473 __swig_setmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_set
2474 __swig_getmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_get
2475 if _newclass:m_userData = _swig_property(_Box2D2.b2Joint_m_userData_get, _Box2D2.b2Joint_m_userData_set)
2476 def __repr__(self):
2477 return "b2Joint(body1: %s body2: %s)" % (self.body1, self.body2)
2478 def typeName(self):
2479 types = { e_unknownJoint : "Unknown",
2480 e_mouseJoint : "Mouse",
2481 e_gearJoint : "Gear",
2482 e_distanceJoint : "Distance",
2483 e_prismaticJoint: "Prismatic",
2484 e_pulleyJoint : "Pulley",
2485 e_revoluteJoint : "Revolute" }
2486 return types[self.GetType()]
2487 def getAsType(self):
2488 """Return a typecasted version of the joint"""
2489 return (getattr(self, "as%sJoint" % self.typeName())) ()
2490
2491 def asMouseJoint(*args):
2492 """asMouseJoint(self) -> b2MouseJoint"""
2493 return _Box2D2.b2Joint_asMouseJoint(*args)
2494
2495 def asGearJoint(*args):
2496 """asGearJoint(self) -> b2GearJoint"""
2497 return _Box2D2.b2Joint_asGearJoint(*args)
2498
2499 def asDistanceJoint(*args):
2500 """asDistanceJoint(self) -> b2DistanceJoint"""
2501 return _Box2D2.b2Joint_asDistanceJoint(*args)
2502
2503 def asPrismaticJoint(*args):
2504 """asPrismaticJoint(self) -> b2PrismaticJoint"""
2505 return _Box2D2.b2Joint_asPrismaticJoint(*args)
2506
2507 def asPulleyJoint(*args):
2508 """asPulleyJoint(self) -> b2PulleyJoint"""
2509 return _Box2D2.b2Joint_asPulleyJoint(*args)
2510
2511 def asRevoluteJoint(*args):
2512 """asRevoluteJoint(self) -> b2RevoluteJoint"""
2513 return _Box2D2.b2Joint_asRevoluteJoint(*args)
2514
2515 b2Joint_swigregister = _Box2D2.b2Joint_swigregister
2516 b2Joint_swigregister(b2Joint)
2517
2518 def b2Joint_Create(*args):
2519 """b2Joint_Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
2520 return _Box2D2.b2Joint_Create(*args)
2521
2522 def b2Joint_Destroy(*args):
2523 """b2Joint_Destroy(b2Joint joint, b2BlockAllocator allocator)"""
2524 return _Box2D2.b2Joint_Destroy(*args)
2525
2526 class b2BodyDef(_object):
2527 """Proxy of C++ b2BodyDef class"""
2528 __swig_setmethods__ = {}
2529 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
2530 __swig_getmethods__ = {}
2531 __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
2532 __repr__ = _swig_repr
2533 def __init__(self, *args):
2534 """__init__(self) -> b2BodyDef"""
2535 this = _Box2D2.new_b2BodyDef(*args)
2536 try: self.this.append(this)
2537 except: self.this = this
2538 __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
2539 __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
2540 if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
2541 __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
2542 __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
2543 if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
2544 __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
2545 __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
2546 if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
2547 __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
2548 __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
2549 if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
2550 __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
2551 __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
2552 if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
2553 __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
2554 __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
2555 if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
2556 __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
2557 __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
2558 if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
2559 __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
2560 __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
2561 if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
2562 __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
2563 __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
2564 if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
2565 __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
2566 __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
2567 if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
2568 __swig_destroy__ = _Box2D2.delete_b2BodyDef
2569 __del__ = lambda self : None;
2570 b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
2571 b2BodyDef_swigregister(b2BodyDef)
2572
2573 class b2Body(_object):
2574 """Proxy of C++ b2Body class"""
2575 __swig_setmethods__ = {}
2576 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
2577 __swig_getmethods__ = {}
2578 __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
2579 __repr__ = _swig_repr
2580 def CreateShape(*args):
2581 """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
2582 return _Box2D2.b2Body_CreateShape(*args)
2583
2584 def DestroyShape(*args):
2585 """DestroyShape(self, b2Shape shape)"""
2586 return _Box2D2.b2Body_DestroyShape(*args)
2587
2588 def SetMass(*args):
2589 """SetMass(self, b2MassData massData)"""
2590 return _Box2D2.b2Body_SetMass(*args)
2591
2592 def SetMassFromShapes(*args):
2593 """SetMassFromShapes(self)"""
2594 return _Box2D2.b2Body_SetMassFromShapes(*args)
2595
2596 def SetXForm(*args):
2597 """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
2598 return _Box2D2.b2Body_SetXForm(*args)
2599
2600 def GetXForm(*args):
2601 """GetXForm(self) -> b2XForm"""
2602 return _Box2D2.b2Body_GetXForm(*args)
2603
2604 def GetPosition(*args):
2605 """GetPosition(self) -> b2Vec2"""
2606 return _Box2D2.b2Body_GetPosition(*args)
2607
2608 def GetAngle(*args):
2609 """GetAngle(self) -> float32"""
2610 return _Box2D2.b2Body_GetAngle(*args)
2611
2612 def GetWorldCenter(*args):
2613 """GetWorldCenter(self) -> b2Vec2"""
2614 return _Box2D2.b2Body_GetWorldCenter(*args)
2615
2616 def GetLocalCenter(*args):
2617 """GetLocalCenter(self) -> b2Vec2"""
2618 return _Box2D2.b2Body_GetLocalCenter(*args)
2619
2620 def SetLinearVelocity(*args):
2621 """SetLinearVelocity(self, b2Vec2 v)"""
2622 return _Box2D2.b2Body_SetLinearVelocity(*args)
2623
2624 def GetLinearVelocity(*args):
2625 """GetLinearVelocity(self) -> b2Vec2"""
2626 return _Box2D2.b2Body_GetLinearVelocity(*args)
2627
2628 def SetAngularVelocity(*args):
2629 """SetAngularVelocity(self, float32 omega)"""
2630 return _Box2D2.b2Body_SetAngularVelocity(*args)
2631
2632 def GetAngularVelocity(*args):
2633 """GetAngularVelocity(self) -> float32"""
2634 return _Box2D2.b2Body_GetAngularVelocity(*args)
2635
2636 def ApplyForce(*args):
2637 """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
2638 return _Box2D2.b2Body_ApplyForce(*args)
2639
2640 def ApplyTorque(*args):
2641 """ApplyTorque(self, float32 torque)"""
2642 return _Box2D2.b2Body_ApplyTorque(*args)
2643
2644 def ApplyImpulse(*args):
2645 """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
2646 return _Box2D2.b2Body_ApplyImpulse(*args)
2647
2648 def GetMass(*args):
2649 """GetMass(self) -> float32"""
2650 return _Box2D2.b2Body_GetMass(*args)
2651
2652 def GetInertia(*args):
2653 """GetInertia(self) -> float32"""
2654 return _Box2D2.b2Body_GetInertia(*args)
2655
2656 def GetWorldPoint(*args):
2657 """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
2658 return _Box2D2.b2Body_GetWorldPoint(*args)
2659
2660 def GetWorldVector(*args):
2661 """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
2662 return _Box2D2.b2Body_GetWorldVector(*args)
2663
2664 def GetLocalPoint(*args):
2665 """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
2666 return _Box2D2.b2Body_GetLocalPoint(*args)
2667
2668 def GetLocalVector(*args):
2669 """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
2670 return _Box2D2.b2Body_GetLocalVector(*args)
2671
2672 def IsBullet(*args):
2673 """IsBullet(self) -> bool"""
2674 return _Box2D2.b2Body_IsBullet(*args)
2675
2676 def SetBullet(*args):
2677 """SetBullet(self, bool flag)"""
2678 return _Box2D2.b2Body_SetBullet(*args)
2679
2680 def IsStatic(*args):
2681 """IsStatic(self) -> bool"""
2682 return _Box2D2.b2Body_IsStatic(*args)
2683
2684 def IsDynamic(*args):
2685 """IsDynamic(self) -> bool"""
2686 return _Box2D2.b2Body_IsDynamic(*args)
2687
2688 def IsFrozen(*args):
2689 """IsFrozen(self) -> bool"""
2690 return _Box2D2.b2Body_IsFrozen(*args)
2691
2692 def IsSleeping(*args):
2693 """IsSleeping(self) -> bool"""
2694 return _Box2D2.b2Body_IsSleeping(*args)
2695
2696 def AllowSleeping(*args):
2697 """AllowSleeping(self, bool flag)"""
2698 return _Box2D2.b2Body_AllowSleeping(*args)
2699
2700 def WakeUp(*args):
2701 """WakeUp(self)"""
2702 return _Box2D2.b2Body_WakeUp(*args)
2703
2704 def GetShapeList(*args):
2705 """GetShapeList(self) -> b2Shape"""
2706 return _Box2D2.b2Body_GetShapeList(*args)
2707
2708 def GetJointList(*args):
2709 """GetJointList(self) -> b2JointEdge"""
2710 return _Box2D2.b2Body_GetJointList(*args)
2711
2712 def GetContactList(*args):
2713 """GetContactList(self) -> b2ContactEdge"""
2714 return _Box2D2.b2Body_GetContactList(*args)
2715
2716 def GetNext(*args):
2717 """GetNext(self) -> b2Body"""
2718 return _Box2D2.b2Body_GetNext(*args)
2719
2720 def GetUserData(*args):
2721 """GetUserData(self) -> void"""
2722 return _Box2D2.b2Body_GetUserData(*args)
2723
2724 e_frozenFlag = _Box2D2.b2Body_e_frozenFlag
2725 e_islandFlag = _Box2D2.b2Body_e_islandFlag
2726 e_sleepFlag = _Box2D2.b2Body_e_sleepFlag
2727 e_allowSleepFlag = _Box2D2.b2Body_e_allowSleepFlag
2728 e_bulletFlag = _Box2D2.b2Body_e_bulletFlag
2729 e_fixedRotationFlag = _Box2D2.b2Body_e_fixedRotationFlag
2730 e_staticType = _Box2D2.b2Body_e_staticType
2731 e_dynamicType = _Box2D2.b2Body_e_dynamicType
2732 e_maxTypes = _Box2D2.b2Body_e_maxTypes
2733 def __init__(self, *args):
2734 """__init__(self, b2BodyDef bd, uint16 type, b2World world) -> b2Body"""
2735 this = _Box2D2.new_b2Body(*args)
2736 try: self.this.append(this)
2737 except: self.this = this
2738 __swig_destroy__ = _Box2D2.delete_b2Body
2739 __del__ = lambda self : None;
2740 def ComputeMass(*args):
2741 """ComputeMass(self)"""
2742 return _Box2D2.b2Body_ComputeMass(*args)
2743
2744 def SynchronizeShapes(*args):
2745 """SynchronizeShapes(self) -> bool"""
2746 return _Box2D2.b2Body_SynchronizeShapes(*args)
2747
2748 def SynchronizeTransform(*args):
2749 """SynchronizeTransform(self)"""
2750 return _Box2D2.b2Body_SynchronizeTransform(*args)
2751
2752 def IsConnected(*args):
2753 """IsConnected(self, b2Body other) -> bool"""
2754 return _Box2D2.b2Body_IsConnected(*args)
2755
2756 def Advance(*args):
2757 """Advance(self, float32 t)"""
2758 return _Box2D2.b2Body_Advance(*args)
2759
2760 __swig_setmethods__["m_flags"] = _Box2D2.b2Body_m_flags_set
2761 __swig_getmethods__["m_flags"] = _Box2D2.b2Body_m_flags_get
2762 if _newclass:m_flags = _swig_property(_Box2D2.b2Body_m_flags_get, _Box2D2.b2Body_m_flags_set)
2763 __swig_setmethods__["m_type"] = _Box2D2.b2Body_m_type_set
2764 __swig_getmethods__["m_type"] = _Box2D2.b2Body_m_type_get
2765 if _newclass:m_type = _swig_property(_Box2D2.b2Body_m_type_get, _Box2D2.b2Body_m_type_set)
2766 __swig_setmethods__["m_xf"] = _Box2D2.b2Body_m_xf_set
2767 __swig_getmethods__["m_xf"] = _Box2D2.b2Body_m_xf_get
2768 if _newclass:m_xf = _swig_property(_Box2D2.b2Body_m_xf_get, _Box2D2.b2Body_m_xf_set)
2769 __swig_setmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_set
2770 __swig_getmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_get
2771 if _newclass:m_sweep = _swig_property(_Box2D2.b2Body_m_sweep_get, _Box2D2.b2Body_m_sweep_set)
2772 __swig_setmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_set
2773 __swig_getmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_get
2774 if _newclass:m_linearVelocity = _swig_property(_Box2D2.b2Body_m_linearVelocity_get, _Box2D2.b2Body_m_linearVelocity_set)
2775 __swig_setmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_set
2776 __swig_getmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_get
2777 if _newclass:m_angularVelocity = _swig_property(_Box2D2.b2Body_m_angularVelocity_get, _Box2D2.b2Body_m_angularVelocity_set)
2778 __swig_setmethods__["m_force"] = _Box2D2.b2Body_m_force_set
2779 __swig_getmethods__["m_force"] = _Box2D2.b2Body_m_force_get
2780 if _newclass:m_force = _swig_property(_Box2D2.b2Body_m_force_get, _Box2D2.b2Body_m_force_set)
2781 __swig_setmethods__["m_torque"] = _Box2D2.b2Body_m_torque_set
2782 __swig_getmethods__["m_torque"] = _Box2D2.b2Body_m_torque_get
2783 if _newclass:m_torque = _swig_property(_Box2D2.b2Body_m_torque_get, _Box2D2.b2Body_m_torque_set)
2784 __swig_setmethods__["m_world"] = _Box2D2.b2Body_m_world_set
2785 __swig_getmethods__["m_world"] = _Box2D2.b2Body_m_world_get
2786 if _newclass:m_world = _swig_property(_Box2D2.b2Body_m_world_get, _Box2D2.b2Body_m_world_set)
2787 __swig_setmethods__["m_prev"] = _Box2D2.b2Body_m_prev_set
2788 __swig_getmethods__["m_prev"] = _Box2D2.b2Body_m_prev_get
2789 if _newclass:m_prev = _swig_property(_Box2D2.b2Body_m_prev_get, _Box2D2.b2Body_m_prev_set)
2790 __swig_setmethods__["m_next"] = _Box2D2.b2Body_m_next_set
2791 __swig_getmethods__["m_next"] = _Box2D2.b2Body_m_next_get
2792 if _newclass:m_next = _swig_property(_Box2D2.b2Body_m_next_get, _Box2D2.b2Body_m_next_set)
2793 __swig_setmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_set
2794 __swig_getmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_get
2795 if _newclass:m_shapeList = _swig_property(_Box2D2.b2Body_m_shapeList_get, _Box2D2.b2Body_m_shapeList_set)
2796 __swig_setmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_set
2797 __swig_getmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_get
2798 if _newclass:m_shapeCount = _swig_property(_Box2D2.b2Body_m_shapeCount_get, _Box2D2.b2Body_m_shapeCount_set)
2799 __swig_setmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_set
2800 __swig_getmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_get
2801 if _newclass:m_jointList = _swig_property(_Box2D2.b2Body_m_jointList_get, _Box2D2.b2Body_m_jointList_set)
2802 __swig_setmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_set
2803 __swig_getmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_get
2804 if _newclass:m_contactList = _swig_property(_Box2D2.b2Body_m_contactList_get, _Box2D2.b2Body_m_contactList_set)
2805 __swig_setmethods__["m_mass"] = _Box2D2.b2Body_m_mass_set
2806 __swig_getmethods__["m_mass"] = _Box2D2.b2Body_m_mass_get
2807 if _newclass:m_mass = _swig_property(_Box2D2.b2Body_m_mass_get, _Box2D2.b2Body_m_mass_set)
2808 __swig_setmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_set
2809 __swig_getmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_get
2810 if _newclass:m_invMass = _swig_property(_Box2D2.b2Body_m_invMass_get, _Box2D2.b2Body_m_invMass_set)
2811 __swig_setmethods__["m_I"] = _Box2D2.b2Body_m_I_set
2812 __swig_getmethods__["m_I"] = _Box2D2.b2Body_m_I_get
2813 if _newclass:m_I = _swig_property(_Box2D2.b2Body_m_I_get, _Box2D2.b2Body_m_I_set)
2814 __swig_setmethods__["m_invI"] = _Box2D2.b2Body_m_invI_set
2815 __swig_getmethods__["m_invI"] = _Box2D2.b2Body_m_invI_get
2816 if _newclass:m_invI = _swig_property(_Box2D2.b2Body_m_invI_get, _Box2D2.b2Body_m_invI_set)
2817 __swig_setmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_set
2818 __swig_getmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_get
2819 if _newclass:m_linearDamping = _swig_property(_Box2D2.b2Body_m_linearDamping_get, _Box2D2.b2Body_m_linearDamping_set)
2820 __swig_setmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_set
2821 __swig_getmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_get
2822 if _newclass:m_angularDamping = _swig_property(_Box2D2.b2Body_m_angularDamping_get, _Box2D2.b2Body_m_angularDamping_set)
2823 __swig_setmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_set
2824 __swig_getmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_get
2825 if _newclass:m_sleepTime = _swig_property(_Box2D2.b2Body_m_sleepTime_get, _Box2D2.b2Body_m_sleepTime_set)
2826 __swig_setmethods__["m_userData"] = _Box2D2.b2Body_m_userData_set
2827 __swig_getmethods__["m_userData"] = _Box2D2.b2Body_m_userData_get
2828 if _newclass:m_userData = _swig_property(_Box2D2.b2Body_m_userData_get, _Box2D2.b2Body_m_userData_set)
2829 def __repr__(self):
2830 return "b2Body(Position: %s)" % (self.GetPosition())
2831
2832 b2Body_swigregister = _Box2D2.b2Body_swigregister
2833 b2Body_swigregister(b2Body)
2834
2835 class b2DistanceJointDef(b2JointDef):
2836 """Proxy of C++ b2DistanceJointDef class"""
2837 __swig_setmethods__ = {}
2838 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2839 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
2840 __swig_getmethods__ = {}
2841 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2842 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
2843 __repr__ = _swig_repr
2844 def __init__(self, *args):
2845 """__init__(self) -> b2DistanceJointDef"""
2846 this = _Box2D2.new_b2DistanceJointDef(*args)
2847 try: self.this.append(this)
2848 except: self.this = this
2849 def Initialize(*args):
2850 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
2851 return _Box2D2.b2DistanceJointDef_Initialize(*args)
2852
2853 __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
2854 __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
2855 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
2856 __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
2857 __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
2858 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
2859 __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
2860 __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
2861 if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
2862 __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
2863 __del__ = lambda self : None;
2864 b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
2865 b2DistanceJointDef_swigregister(b2DistanceJointDef)
2866
2867 class b2DistanceJoint(b2Joint):
2868 """Proxy of C++ b2DistanceJoint class"""
2869 __swig_setmethods__ = {}
2870 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2871 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
2872 __swig_getmethods__ = {}
2873 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2874 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
2875 __repr__ = _swig_repr
2876 def GetAnchor1(*args):
2877 """GetAnchor1(self) -> b2Vec2"""
2878 return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
2879
2880 def GetAnchor2(*args):
2881 """GetAnchor2(self) -> b2Vec2"""
2882 return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
2883
2884 def GetReactionForce(*args):
2885 """GetReactionForce(self) -> b2Vec2"""
2886 return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
2887
2888 def GetReactionTorque(*args):
2889 """GetReactionTorque(self) -> float32"""
2890 return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
2891
2892 def __init__(self, *args):
2893 """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
2894 this = _Box2D2.new_b2DistanceJoint(*args)
2895 try: self.this.append(this)
2896 except: self.this = this
2897 def InitVelocityConstraints(*args):
2898 """InitVelocityConstraints(self, b2TimeStep step)"""
2899 return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
2900
2901 def SolveVelocityConstraints(*args):
2902 """SolveVelocityConstraints(self, b2TimeStep step)"""
2903 return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
2904
2905 def SolvePositionConstraints(*args):
2906 """SolvePositionConstraints(self) -> bool"""
2907 return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
2908
2909 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
2910 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
2911 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
2912 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
2913 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
2914 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
2915 __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
2916 __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
2917 if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
2918 __swig_setmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_set
2919 __swig_getmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_get
2920 if _newclass:m_force = _swig_property(_Box2D2.b2DistanceJoint_m_force_get, _Box2D2.b2DistanceJoint_m_force_set)
2921 __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
2922 __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
2923 if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
2924 __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
2925 __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
2926 if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
2927 __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
2928 __del__ = lambda self : None;
2929 b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
2930 b2DistanceJoint_swigregister(b2DistanceJoint)
2931
2932 class b2MouseJointDef(b2JointDef):
2933 """Proxy of C++ b2MouseJointDef class"""
2934 __swig_setmethods__ = {}
2935 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2936 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
2937 __swig_getmethods__ = {}
2938 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2939 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
2940 __repr__ = _swig_repr
2941 def __init__(self, *args):
2942 """__init__(self) -> b2MouseJointDef"""
2943 this = _Box2D2.new_b2MouseJointDef(*args)
2944 try: self.this.append(this)
2945 except: self.this = this
2946 __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
2947 __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
2948 if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
2949 __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
2950 __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
2951 if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
2952 __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
2953 __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
2954 if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
2955 __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
2956 __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
2957 if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
2958 __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
2959 __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
2960 if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
2961 __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
2962 __del__ = lambda self : None;
2963 b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
2964 b2MouseJointDef_swigregister(b2MouseJointDef)
2965
2966 class b2MouseJoint(b2Joint):
2967 """Proxy of C++ b2MouseJoint class"""
2968 __swig_setmethods__ = {}
2969 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2970 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
2971 __swig_getmethods__ = {}
2972 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2973 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
2974 __repr__ = _swig_repr
2975 def GetAnchor1(*args):
2976 """GetAnchor1(self) -> b2Vec2"""
2977 return _Box2D2.b2MouseJoint_GetAnchor1(*args)
2978
2979 def GetAnchor2(*args):
2980 """GetAnchor2(self) -> b2Vec2"""
2981 return _Box2D2.b2MouseJoint_GetAnchor2(*args)
2982
2983 def GetReactionForce(*args):
2984 """GetReactionForce(self) -> b2Vec2"""
2985 return _Box2D2.b2MouseJoint_GetReactionForce(*args)
2986
2987 def GetReactionTorque(*args):
2988 """GetReactionTorque(self) -> float32"""
2989 return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
2990
2991 def SetTarget(*args):
2992 """SetTarget(self, b2Vec2 target)"""
2993 return _Box2D2.b2MouseJoint_SetTarget(*args)
2994
2995 def __init__(self, *args):
2996 """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
2997 this = _Box2D2.new_b2MouseJoint(*args)
2998 try: self.this.append(this)
2999 except: self.this = this
3000 def InitVelocityConstraints(*args):
3001 """InitVelocityConstraints(self, b2TimeStep step)"""
3002 return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
3003
3004 def SolveVelocityConstraints(*args):
3005 """SolveVelocityConstraints(self, b2TimeStep step)"""
3006 return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
3007
3008 def SolvePositionConstraints(*args):
3009 """SolvePositionConstraints(self) -> bool"""
3010 return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
3011
3012 __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
3013 __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
3014 if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
3015 __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
3016 __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
3017 if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
3018 __swig_setmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_set
3019 __swig_getmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_get
3020 if _newclass:m_force = _swig_property(_Box2D2.b2MouseJoint_m_force_get, _Box2D2.b2MouseJoint_m_force_set)
3021 __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
3022 __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
3023 if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
3024 __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
3025 __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
3026 if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
3027 __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
3028 __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
3029 if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
3030 __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
3031 __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
3032 if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
3033 __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
3034 __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
3035 if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
3036 __swig_destroy__ = _Box2D2.delete_b2MouseJoint
3037 __del__ = lambda self : None;
3038 b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
3039 b2MouseJoint_swigregister(b2MouseJoint)
3040
3041 class b2PrismaticJointDef(b2JointDef):
3042 """Proxy of C++ b2PrismaticJointDef class"""
3043 __swig_setmethods__ = {}
3044 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3045 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
3046 __swig_getmethods__ = {}
3047 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3048 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
3049 __repr__ = _swig_repr
3050 def __init__(self, *args):
3051 """__init__(self) -> b2PrismaticJointDef"""
3052 this = _Box2D2.new_b2PrismaticJointDef(*args)
3053 try: self.this.append(this)
3054 except: self.this = this
3055 def Initialize(*args):
3056 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
3057 return _Box2D2.b2PrismaticJointDef_Initialize(*args)
3058
3059 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
3060 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
3061 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
3062 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
3063 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
3064 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
3065 __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
3066 __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
3067 if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
3068 __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
3069 __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
3070 if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
3071 __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
3072 __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
3073 if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
3074 __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
3075 __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
3076 if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
3077 __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
3078 __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
3079 if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
3080 __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
3081 __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
3082 if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
3083 __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
3084 __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
3085 if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
3086 __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
3087 __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
3088 if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
3089 __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
3090 __del__ = lambda self : None;
3091 b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
3092 b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
3093
3094 class b2PrismaticJoint(b2Joint):
3095 """Proxy of C++ b2PrismaticJoint class"""
3096 __swig_setmethods__ = {}
3097 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3098 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
3099 __swig_getmethods__ = {}
3100 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3101 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
3102 __repr__ = _swig_repr
3103 def GetAnchor1(*args):
3104 """GetAnchor1(self) -> b2Vec2"""
3105 return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
3106
3107 def GetAnchor2(*args):
3108 """GetAnchor2(self) -> b2Vec2"""
3109 return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
3110
3111 def GetReactionForce(*args):
3112 """GetReactionForce(self) -> b2Vec2"""
3113 return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
3114
3115 def GetReactionTorque(*args):
3116 """GetReactionTorque(self) -> float32"""
3117 return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
3118
3119 def GetJointTranslation(*args):
3120 """GetJointTranslation(self) -> float32"""
3121 return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
3122
3123 def GetJointSpeed(*args):
3124 """GetJointSpeed(self) -> float32"""
3125 return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
3126
3127 def IsLimitEnabled(*args):
3128 """IsLimitEnabled(self) -> bool"""
3129 return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
3130
3131 def EnableLimit(*args):
3132 """EnableLimit(self, bool flag)"""
3133 return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
3134
3135 def GetLowerLimit(*args):
3136 """GetLowerLimit(self) -> float32"""
3137 return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
3138
3139 def GetUpperLimit(*args):
3140 """GetUpperLimit(self) -> float32"""
3141 return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
3142
3143 def SetLimits(*args):
3144 """SetLimits(self, float32 lower, float32 upper)"""
3145 return _Box2D2.b2PrismaticJoint_SetLimits(*args)
3146
3147 def IsMotorEnabled(*args):
3148 """IsMotorEnabled(self) -> bool"""
3149 return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
3150
3151 def EnableMotor(*args):
3152 """EnableMotor(self, bool flag)"""
3153 return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
3154
3155 def SetMotorSpeed(*args):
3156 """SetMotorSpeed(self, float32 speed)"""
3157 return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
3158
3159 def GetMotorSpeed(*args):
3160 """GetMotorSpeed(self) -> float32"""
3161 return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
3162
3163 def SetMaxMotorForce(*args):
3164 """SetMaxMotorForce(self, float32 force)"""
3165 return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
3166
3167 def GetMotorForce(*args):
3168 """GetMotorForce(self) -> float32"""
3169 return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
3170
3171 def __init__(self, *args):
3172 """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
3173 this = _Box2D2.new_b2PrismaticJoint(*args)
3174 try: self.this.append(this)
3175 except: self.this = this
3176 def InitVelocityConstraints(*args):
3177 """InitVelocityConstraints(self, b2TimeStep step)"""
3178 return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
3179
3180 def SolveVelocityConstraints(*args):
3181 """SolveVelocityConstraints(self, b2TimeStep step)"""
3182 return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
3183
3184 def SolvePositionConstraints(*args):
3185 """SolvePositionConstraints(self) -> bool"""
3186 return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
3187
3188 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
3189 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
3190 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
3191 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
3192 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
3193 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
3194 __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
3195 __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
3196 if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
3197 __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
3198 __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
3199 if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
3200 __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
3201 __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
3202 if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
3203 __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
3204 __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
3205 if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
3206 __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
3207 __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
3208 if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
3209 __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
3210 __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
3211 if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
3212 __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
3213 __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
3214 if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
3215 __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
3216 __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
3217 if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
3218 __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
3219 __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
3220 if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
3221 __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
3222 __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
3223 if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
3224 __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
3225 __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
3226 if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
3227 __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
3228 __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
3229 if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
3230 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
3231 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
3232 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
3233 __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
3234 __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
3235 if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
3236 __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
3237 __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
3238 if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
3239 __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
3240 __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
3241 if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
3242 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
3243 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
3244 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
3245 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
3246 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
3247 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
3248 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
3249 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
3250 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
3251 __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
3252 __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
3253 if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
3254 __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
3255 __del__ = lambda self : None;
3256 b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
3257 b2PrismaticJoint_swigregister(b2PrismaticJoint)
3258
3259 class b2RevoluteJointDef(b2JointDef):
3260 """Proxy of C++ b2RevoluteJointDef class"""
3261 __swig_setmethods__ = {}
3262 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3263 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
3264 __swig_getmethods__ = {}
3265 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3266 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
3267 __repr__ = _swig_repr
3268 def __init__(self, *args):
3269 """__init__(self) -> b2RevoluteJointDef"""
3270 this = _Box2D2.new_b2RevoluteJointDef(*args)
3271 try: self.this.append(this)
3272 except: self.this = this
3273 def Initialize(*args):
3274 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
3275 return _Box2D2.b2RevoluteJointDef_Initialize(*args)
3276
3277 __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
3278 __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
3279 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
3280 __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
3281 __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
3282 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
3283 __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
3284 __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
3285 if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
3286 __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
3287 __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
3288 if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
3289 __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
3290 __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
3291 if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
3292 __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
3293 __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
3294 if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
3295 __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
3296 __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
3297 if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
3298 __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
3299 __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
3300 if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
3301 __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
3302 __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
3303 if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
3304 __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
3305 __del__ = lambda self : None;
3306 b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
3307 b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
3308
3309 class b2RevoluteJoint(b2Joint):
3310 """Proxy of C++ b2RevoluteJoint class"""
3311 __swig_setmethods__ = {}
3312 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3313 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
3314 __swig_getmethods__ = {}
3315 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3316 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
3317 __repr__ = _swig_repr
3318 def GetAnchor1(*args):
3319 """GetAnchor1(self) -> b2Vec2"""
3320 return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
3321
3322 def GetAnchor2(*args):
3323 """GetAnchor2(self) -> b2Vec2"""
3324 return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
3325
3326 def GetReactionForce(*args):
3327 """GetReactionForce(self) -> b2Vec2"""
3328 return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
3329
3330 def GetReactionTorque(*args):
3331 """GetReactionTorque(self) -> float32"""
3332 return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
3333
3334 def GetJointAngle(*args):
3335 """GetJointAngle(self) -> float32"""
3336 return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
3337
3338 def GetJointSpeed(*args):
3339 """GetJointSpeed(self) -> float32"""
3340 return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
3341
3342 def IsLimitEnabled(*args):
3343 """IsLimitEnabled(self) -> bool"""
3344 return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
3345
3346 def EnableLimit(*args):
3347 """EnableLimit(self, bool flag)"""
3348 return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
3349
3350 def GetLowerLimit(*args):
3351 """GetLowerLimit(self) -> float32"""
3352 return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
3353
3354 def GetUpperLimit(*args):
3355 """GetUpperLimit(self) -> float32"""
3356 return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
3357
3358 def SetLimits(*args):
3359 """SetLimits(self, float32 lower, float32 upper)"""
3360 return _Box2D2.b2RevoluteJoint_SetLimits(*args)
3361
3362 def IsMotorEnabled(*args):
3363 """IsMotorEnabled(self) -> bool"""
3364 return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
3365
3366 def EnableMotor(*args):
3367 """EnableMotor(self, bool flag)"""
3368 return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
3369
3370 def SetMotorSpeed(*args):
3371 """SetMotorSpeed(self, float32 speed)"""
3372 return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
3373
3374 def GetMotorSpeed(*args):
3375 """GetMotorSpeed(self) -> float32"""
3376 return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
3377
3378 def SetMaxMotorTorque(*args):
3379 """SetMaxMotorTorque(self, float32 torque)"""
3380 return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
3381
3382 def GetMotorTorque(*args):
3383 """GetMotorTorque(self) -> float32"""
3384 return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
3385
3386 def __init__(self, *args):
3387 """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
3388 this = _Box2D2.new_b2RevoluteJoint(*args)
3389 try: self.this.append(this)
3390 except: self.this = this
3391 def InitVelocityConstraints(*args):
3392 """InitVelocityConstraints(self, b2TimeStep step)"""
3393 return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
3394
3395 def SolveVelocityConstraints(*args):
3396 """SolveVelocityConstraints(self, b2TimeStep step)"""
3397 return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
3398
3399 def SolvePositionConstraints(*args):
3400 """SolvePositionConstraints(self) -> bool"""
3401 return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
3402
3403 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
3404 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
3405 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
3406 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
3407 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
3408 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
3409 __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
3410 __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
3411 if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
3412 __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
3413 __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
3414 if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
3415 __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
3416 __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
3417 if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
3418 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
3419 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
3420 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
3421 __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
3422 __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
3423 if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
3424 __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
3425 __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
3426 if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
3427 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
3428 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
3429 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
3430 __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
3431 __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
3432 if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
3433 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
3434 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
3435 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
3436 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
3437 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
3438 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
3439 __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
3440 __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
3441 if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
3442 __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
3443 __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
3444 if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
3445 __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
3446 __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
3447 if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
3448 __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
3449 __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
3450 if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
3451 __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
3452 __del__ = lambda self : None;
3453 b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
3454 b2RevoluteJoint_swigregister(b2RevoluteJoint)
3455
3456 class b2PulleyJointDef(b2JointDef):
3457 """Proxy of C++ b2PulleyJointDef class"""
3458 __swig_setmethods__ = {}
3459 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3460 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
3461 __swig_getmethods__ = {}
3462 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3463 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
3464 __repr__ = _swig_repr
3465 def __init__(self, *args):
3466 """__init__(self) -> b2PulleyJointDef"""
3467 this = _Box2D2.new_b2PulleyJointDef(*args)
3468 try: self.this.append(this)
3469 except: self.this = this
3470 def Initialize(*args):
3471 """
3472 Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
3473 b2Vec2 anchor1, b2Vec2 anchor2,
3474 float32 ratio)
3475 """
3476 return _Box2D2.b2PulleyJointDef_Initialize(*args)
3477
3478 __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
3479 __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
3480 if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
3481 __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
3482 __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
3483 if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
3484 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
3485 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
3486 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
3487 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
3488 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
3489 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
3490 __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
3491 __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
3492 if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
3493 __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
3494 __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
3495 if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
3496 __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
3497 __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
3498 if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
3499 __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
3500 __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
3501 if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
3502 __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
3503 __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
3504 if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
3505 __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
3506 __del__ = lambda self : None;
3507 b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
3508 b2PulleyJointDef_swigregister(b2PulleyJointDef)
3509 b2_minPulleyLength = cvar.b2_minPulleyLength
3510
3511 class b2PulleyJoint(b2Joint):
3512 """Proxy of C++ b2PulleyJoint class"""
3513 __swig_setmethods__ = {}
3514 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3515 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
3516 __swig_getmethods__ = {}
3517 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3518 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
3519 __repr__ = _swig_repr
3520 def GetAnchor1(*args):
3521 """GetAnchor1(self) -> b2Vec2"""
3522 return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
3523
3524 def GetAnchor2(*args):
3525 """GetAnchor2(self) -> b2Vec2"""
3526 return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
3527
3528 def GetReactionForce(*args):
3529 """GetReactionForce(self) -> b2Vec2"""
3530 return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
3531
3532 def GetReactionTorque(*args):
3533 """GetReactionTorque(self) -> float32"""
3534 return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
3535
3536 def GetGroundAnchor1(*args):
3537 """GetGroundAnchor1(self) -> b2Vec2"""
3538 return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
3539
3540 def GetGroundAnchor2(*args):
3541 """GetGroundAnchor2(self) -> b2Vec2"""
3542 return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
3543
3544 def GetLength1(*args):
3545 """GetLength1(self) -> float32"""
3546 return _Box2D2.b2PulleyJoint_GetLength1(*args)
3547
3548 def GetLength2(*args):
3549 """GetLength2(self) -> float32"""
3550 return _Box2D2.b2PulleyJoint_GetLength2(*args)
3551
3552 def GetRatio(*args):
3553 """GetRatio(self) -> float32"""
3554 return _Box2D2.b2PulleyJoint_GetRatio(*args)
3555
3556 def __init__(self, *args):
3557 """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
3558 this = _Box2D2.new_b2PulleyJoint(*args)
3559 try: self.this.append(this)
3560 except: self.this = this
3561 def InitVelocityConstraints(*args):
3562 """InitVelocityConstraints(self, b2TimeStep step)"""
3563 return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
3564
3565 def SolveVelocityConstraints(*args):
3566 """SolveVelocityConstraints(self, b2TimeStep step)"""
3567 return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
3568
3569 def SolvePositionConstraints(*args):
3570 """SolvePositionConstraints(self) -> bool"""
3571 return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
3572
3573 __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
3574 __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
3575 if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
3576 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
3577 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
3578 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
3579 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
3580 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
3581 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
3582 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
3583 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
3584 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
3585 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
3586 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
3587 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
3588 __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
3589 __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
3590 if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
3591 __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
3592 __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
3593 if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
3594 __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
3595 __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
3596 if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
3597 __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
3598 __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
3599 if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
3600 __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
3601 __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
3602 if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
3603 __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
3604 __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
3605 if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
3606 __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
3607 __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
3608 if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
3609 __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
3610 __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
3611 if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
3612 __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
3613 __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
3614 if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
3615 __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
3616 __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
3617 if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
3618 __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
3619 __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
3620 if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
3621 __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
3622 __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
3623 if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
3624 __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
3625 __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
3626 if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
3627 __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
3628 __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
3629 if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
3630 __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
3631 __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
3632 if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
3633 __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
3634 __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
3635 if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
3636 __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
3637 __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
3638 if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
3639 __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
3640 __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
3641 if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
3642 __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
3643 __del__ = lambda self : None;
3644 b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
3645 b2PulleyJoint_swigregister(b2PulleyJoint)
3646
3647 class b2GearJointDef(b2JointDef):
3648 """Proxy of C++ b2GearJointDef class"""
3649 __swig_setmethods__ = {}
3650 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3651 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
3652 __swig_getmethods__ = {}
3653 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3654 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
3655 __repr__ = _swig_repr
3656 def __init__(self, *args):
3657 """__init__(self) -> b2GearJointDef"""
3658 this = _Box2D2.new_b2GearJointDef(*args)
3659 try: self.this.append(this)
3660 except: self.this = this
3661 __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
3662 __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
3663 if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
3664 __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
3665 __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
3666 if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
3667 __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
3668 __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
3669 if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
3670 __swig_destroy__ = _Box2D2.delete_b2GearJointDef
3671 __del__ = lambda self : None;
3672 b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
3673 b2GearJointDef_swigregister(b2GearJointDef)
3674
3675 class b2GearJoint(b2Joint):
3676 """Proxy of C++ b2GearJoint class"""
3677 __swig_setmethods__ = {}
3678 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3679 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
3680 __swig_getmethods__ = {}
3681 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3682 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
3683 __repr__ = _swig_repr
3684 def GetAnchor1(*args):
3685 """GetAnchor1(self) -> b2Vec2"""
3686 return _Box2D2.b2GearJoint_GetAnchor1(*args)
3687
3688 def GetAnchor2(*args):
3689 """GetAnchor2(self) -> b2Vec2"""
3690 return _Box2D2.b2GearJoint_GetAnchor2(*args)
3691
3692 def GetReactionForce(*args):
3693 """GetReactionForce(self) -> b2Vec2"""
3694 return _Box2D2.b2GearJoint_GetReactionForce(*args)
3695
3696 def GetReactionTorque(*args):
3697 """GetReactionTorque(self) -> float32"""
3698 return _Box2D2.b2GearJoint_GetReactionTorque(*args)
3699
3700 def GetRatio(*args):
3701 """GetRatio(self) -> float32"""
3702 return _Box2D2.b2GearJoint_GetRatio(*args)
3703
3704 def __init__(self, *args):
3705 """__init__(self, b2GearJointDef data) -> b2GearJoint"""
3706 this = _Box2D2.new_b2GearJoint(*args)
3707 try: self.this.append(this)
3708 except: self.this = this
3709 def InitVelocityConstraints(*args):
3710 """InitVelocityConstraints(self, b2TimeStep step)"""
3711 return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
3712
3713 def SolveVelocityConstraints(*args):
3714 """SolveVelocityConstraints(self, b2TimeStep step)"""
3715 return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
3716
3717 def SolvePositionConstraints(*args):
3718 """SolvePositionConstraints(self) -> bool"""
3719 return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
3720
3721 __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
3722 __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
3723 if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
3724 __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
3725 __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
3726 if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
3727 __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
3728 __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
3729 if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
3730 __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
3731 __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
3732 if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
3733 __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
3734 __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
3735 if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
3736 __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
3737 __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
3738 if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
3739 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
3740 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
3741 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
3742 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
3743 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
3744 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
3745 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
3746 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
3747 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
3748 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
3749 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
3750 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
3751 __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
3752 __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
3753 if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
3754 __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
3755 __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
3756 if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
3757 __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
3758 __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
3759 if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
3760 __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
3761 __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
3762 if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
3763 __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
3764 __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
3765 if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
3766 __swig_destroy__ = _Box2D2.delete_b2GearJoint
3767 __del__ = lambda self : None;
3768 b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
3769 b2GearJoint_swigregister(b2GearJoint)
3770
3771
3772
0 __all__ = ['locals', 'menu']
1 from elements import Elements
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 from locals import *
27 from elements import box2d
28
29 # Imports
30 from math import pi
31 from math import sqrt
32 from math import asin
33
34 import tools_poly
35
36 class Add:
37 element_count = 0
38
39 def __init__(self, parent):
40 self.parent = parent
41
42 def ground(self):
43 """ Add a static ground to the scene
44
45 Return: box2d.b2Body
46 """
47 return self._rect((-10.0, 0.0), 50.0, .1, dynamic=False)
48
49 def triangle(self, pos, sidelength, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
50 """ Add a triangle | pos & a in the current input unit system (meters or pixels)
51
52 Parameters:
53 pos .... position (x,y)
54 sidelength ...... sidelength
55 other .. see [physics parameters]
56
57 Return: box2d.b2Body
58 """
59 vertices = [(-sidelength, 0.0), (sidelength, 0.0), (0.0, 2*sidelength)]
60 return self.poly(pos, vertices, dynamic, density, restitution, friction, screenCoord)
61
62 def ball(self, pos, radius, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
63 """ Add a dynamic ball at pos after correcting the positions and legths to the internal
64 meter system if neccessary (if INPUT_PIXELS), then call self._add_ball(...)
65
66 Parameters:
67 pos ..... position (x,y)
68 radius .. circle radius
69 other ... see [physics parameters]
70
71 Return: box2d.b2Body
72 """
73 # Bring coordinates into the world coordinate system (flip, camera offset, ...)
74 if screenCoord: x, y = self.parent.to_world(pos)
75 else: x, y = pos
76
77
78 if self.parent.input == INPUT_PIXELS:
79 x /= self.parent.ppm
80 y /= self.parent.ppm
81 radius /= self.parent.ppm
82
83 return self._ball((x,y), radius, dynamic, density, restitution, friction)
84
85 def _ball(self, pos, radius, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
86 # Add a ball without correcting any settings
87 # meaning, pos and vertices are in meters
88 # Define the body
89 x, y = pos
90 bodyDef = box2d.b2BodyDef()
91 bodyDef.position.Set(x, y)
92 bodyDef.sleepFlag = True
93 # bodyDef.allowSleep(True)
94
95 userData = { 'color' : self.parent.get_color() }
96 bodyDef.userData = userData
97
98 # Create the Body
99 if not dynamic:
100 density = 0
101
102 body = self.parent.world.CreateBody(bodyDef)
103
104 self.parent.element_count += 1
105
106 # Add a shape to the Body
107 circleDef = box2d.b2CircleDef()
108 circleDef.density = density
109 circleDef.radius = radius
110 circleDef.restitution = restitution
111 circleDef.friction = friction
112
113 body.CreateShape(circleDef)
114 body.SetMassFromShapes();
115
116 return body
117
118 def rect(self, pos, width, height, angle=0, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
119 """ Add a dynamic rectangle with input unit according to self.input (INPUT_PIXELS or INPUT_METERS)
120 Correcting the positions to meters and calling self._add_rect()
121
122 Parameters:
123 pos ..... position (x,y)
124 width ....... horizontal line
125 height ....... vertical line
126 angle ........ in degrees (0 .. 360)
127 other ... see [physics parameters]
128
129 Return: box2d.b2Body
130 """
131 # Bring coordinates into the world coordinate system (flip, camera offset, ...)
132 if screenCoord: x, y = self.parent.to_world(pos)
133 else: x, y = pos
134
135 # If required, translate pixel -> meters
136 if self.parent.input == INPUT_PIXELS:
137 x /= self.parent.ppm
138 y /= self.parent.ppm
139 width /= self.parent.ppm
140 height /= self.parent.ppm
141
142 # grad -> radians
143 angle = (angle * pi) / 180
144
145 return self._rect((x,y), width, height, angle, dynamic, density, restitution, friction)
146
147
148 def wall(self, pos1, pos2, width=5, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
149 """ Add a static rectangle between two arbitrary points with input unit according to self.input
150 (INPUT_PIXELS or INPUT_METERS) Correcting the positions to meters and calling self._add_rect()
151
152 Return: box2d.b2Body
153 """
154 if width < 5: width = 5
155
156 if (pos1[0] < pos2[0]):
157 x1, y1 = pos1
158 x2, y2 = pos2
159 else:
160 x1, y1 = pos2
161 x2, y2 = pos1
162
163 # Bring coordinates into the world coordinate system (flip, camera offset, ...)
164 if screenCoord:
165 x1, y1 = self.parent.to_world((x1, y1))
166 x2, y2 = self.parent.to_world((x2, y2))
167
168 # If required, translate pixel -> meters
169 if self.parent.input == INPUT_PIXELS:
170 x1 /= self.parent.ppm
171 y1 /= self.parent.ppm
172 x2 /= self.parent.ppm
173 y2 /= self.parent.ppm
174 width /= self.parent.ppm
175
176 length = sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) )*0.5
177
178 if width > 0:
179 halfX = x1 + (x2-x1)*0.5
180 halfY = y1 + (y2-y1)*0.5
181
182 angle = asin( (y2-halfY)/length )
183 return self._rect((halfX, halfY), length, width, angle, False, density, restitution, friction)
184
185 def _rect(self, pos, width, height, angle=0, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
186 # Add a rect without correcting any settings
187 # meaning, pos and vertices are in meters
188 # angle is now in radians ((degrees * pi) / 180))
189 x, y = pos
190 bodyDef = box2d.b2BodyDef()
191 bodyDef.position.Set(x, y)
192
193 userData = { 'color' : self.parent.get_color() }
194 bodyDef.userData = userData
195
196 # Create the Body
197 if not dynamic:
198 density = 0
199
200 bodyDef.sleepFlag = True
201
202 body = self.parent.world.CreateBody(bodyDef)
203
204 self.parent.element_count += 1
205
206 # Add a shape to the Body
207 boxDef = box2d.b2PolygonDef()
208
209 boxDef.SetAsBox(width, height, box2d.b2Vec2(0,0), angle)
210 boxDef.density = density
211 boxDef.restitution = restitution
212 boxDef.friction = friction
213 body.CreateShape(boxDef)
214
215 body.SetMassFromShapes()
216
217 return body
218
219 def poly(self, pos, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
220 """ Add a dynamic polygon, which has the vertices arranged around the poly's center at pos
221 Correcting the positions to meters if INPUT_PIXELS, and calling self._add_poly()
222
223 Parameters:
224 pos ....... position (x,y)
225 vertices .. vertices arranged around the center
226 other ... see [physics parameters]
227
228 Return: box2d.b2Body
229 """
230 # Bring coordinates into the world coordinate system (flip, camera offset, ...)
231 if screenCoord: x, y = self.parent.to_world(pos)
232 else: x, y = pos
233 #pos, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.
234 #5, screenCoord=True
235 print "self.world.add.poly((", x,",", y, "), ", vertices, ", dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True)"
236 #"x = " x "y = " y "vertices = "
237 # If required, translate pixel -> meters
238 if self.parent.input == INPUT_PIXELS:
239 # translate pixel -> meters
240 x /= self.parent.ppm
241 y /= self.parent.ppm
242
243 # Translate vertices from pixels to meters
244 v_new = []
245 for v in vertices:
246 vx, vy = v
247 v_new.append((vx/self.parent.ppm, vy/self.parent.ppm))
248 vertices = v_new
249
250 return self._poly((x,y), vertices, dynamic, density, restitution, friction)
251
252 def _poly(self, pos, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
253 # add a centered poly at pos without correcting any settings
254 # meaning, pos and vertices are in meters
255 x, y = pos
256 bodyDef = box2d.b2BodyDef()
257 bodyDef.position.Set(x, y)
258 bodyDef.sleepFlag = True
259
260 userData = { 'color' : self.parent.get_color() }
261 bodyDef.userData = userData
262
263 # Create the Body
264 if not dynamic:
265 density = 0
266
267 body = self.parent.world.CreateBody(bodyDef)
268
269 self.parent.element_count += 1
270
271 # Add a shape to the Body
272 polyDef = box2d.b2PolygonDef()
273 polyDef.vertexCount = len(vertices)
274 for i in range(len(vertices)):
275 vx, vy = vertices[i]
276 polyDef.setVertex(i, box2d.b2Vec2(vx, vy))
277
278 polyDef.density = density
279 polyDef.restitution = restitution
280 polyDef.friction = friction
281
282 body.CreateShape(polyDef)
283 body.SetMassFromShapes()
284
285 return body
286
287 def concavePoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
288 # 1. Step: Reduce
289 # Detect if the polygon is closed or open
290 if vertices[0] != vertices[-1]:
291 is_closed = False
292 else:
293 is_closed = True
294
295 # Continue reducing the vertecs
296 x, y = c = tools_poly.calc_center(vertices)
297 vertices = tools_poly.poly_center_vertices(vertices)
298
299 # Bring coordinates into the world coordinate system (flip, camera offset, ...)
300 if screenCoord: x, y = self.parent.to_world(c)
301 else: x, y = c
302
303 # If required, translate pixel -> meters
304 if self.parent.input == INPUT_PIXELS:
305 # translate pixel -> meters
306 x /= self.parent.ppm
307 y /= self.parent.ppm
308
309 # Let's add the body
310 bodyDef = box2d.b2BodyDef()
311 bodyDef.position.Set(x, y)
312 bodyDef.sleepFlag = True
313
314 userData = { 'color' : self.parent.get_color() }
315 bodyDef.userData = userData
316
317 # Create the Body
318 if not dynamic:
319 density = 0
320
321 body = self.parent.world.CreateBody(bodyDef)
322
323 self.parent.element_count += 1
324
325 # Create the reusable Box2D polygon and circle definitions
326 polyDef = box2d.b2PolygonDef()
327 polyDef.vertexCount = 4 # rectangle
328 polyDef.density = density
329 polyDef.restitution = restitution
330 polyDef.friction = friction
331
332 circleDef = box2d.b2CircleDef()
333 circleDef.density = density
334 circleDef.radius = 0.086
335 circleDef.restitution = restitution
336 circleDef.friction = friction
337
338 # Set the scale factor
339 factor = 8.0
340
341 v2 = box2d.b2Vec2().fromTuple(vertices[0])
342 for v in vertices[1:]:
343 v1 = v2.copy()
344 v2 = box2d.b2Vec2().fromTuple(v)
345
346 vdir = v2-v1 # (v2x-v1x, v2y-v1y)
347 vdir.Normalize()
348
349 # we need a little size for the end part
350 vn = box2d.b2Vec2(-vdir.y*factor, vdir.x*factor)
351
352 v = [ v1+vn, v1-vn, v2-vn, v2+vn ]
353
354 # Create a line (rect) for each part of the polygon,
355 # and attach it to the body
356 for i in range(len(v)):
357 polyDef.setVertex(i, v[i] / self.parent.ppm)
358
359 if not tools_poly.checkDef(polyDef):
360 print "concavePoly: Created an invalid polygon!"
361 return [], 0
362
363 body.CreateShape(polyDef)
364
365 # Now add a circle to the points between the rects
366 # to avoid sharp edges and gaps
367 if not is_closed and v2.tuple() == vertices[-1]:
368 # Don't add a circle at the end
369 break
370
371 circleDef.localPosition = v2 / self.parent.ppm
372 body.CreateShape(circleDef)
373
374 # Now, all shapes have been attached
375 body.SetMassFromShapes()
376
377 # Return hard and soft reduced vertices
378 return body
379
380 def complexPoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
381 # 1. Step: Reduce
382 # 2. Step: See if start and end are close, if so then close the polygon
383 # 3. Step: Detect if convex or concave
384 # 4. Step: Start self.convexPoly or self.concavePoly
385 vertices, is_convex = tools_poly.reduce_poly_by_angle(vertices)
386 #print "->", is_convex
387
388 # If start and endpoints are close to each other, close polygon
389 x1, y1 = vertices[0]
390 x2, y2 = vertices[-1]
391 dx = x2 - x1
392 dy = y2 - y1
393 l = sqrt((dx*dx)+(dy*dy))
394
395 if l < 50:
396 vertices[-1] = vertices[0]
397 else:
398 # Never convex if open (we decide so :)
399 is_convex = False
400
401 if tools_poly.is_line(vertices):
402 # Lines shall be drawn by self.concavePoly(...)
403 print "is line"
404 is_convex = False
405
406 if is_convex:
407 print "convex"
408 return self.convexPoly(vertices, dynamic, density, restitution, friction), vertices
409 else:
410 print "concave"
411 return self.concavePoly(vertices, dynamic, density, restitution, friction), vertices
412
413
414 def convexPoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
415 """ Add a complex polygon with vertices in absolute positions (meters or pixels, according
416 to INPUT_PIXELS or INPUT_METERS). This function does the reduction and convec hulling
417 of the poly, and calls add_poly(...)
418
419 Parameters:
420 vertices .. absolute vertices positions
421 other ..... see [physics parameters]
422
423 Return: box2d.b2Body
424 """
425 # NOTE: Box2D has a maximum poly vertex count, defined in Common/box2d.b2Settings.h (box2d.b2_maxPolygonVertices)
426 # We need to make sure, that we reach that by reducing the poly with increased tolerance
427 # Reduce Polygon
428 tolerance = 10 #5
429 v_new = vertices
430 while len(v_new) > box2d.b2_maxPolygonVertices:
431 tolerance += 1
432 v_new = tools_poly.reduce_poly(vertices, tolerance)
433
434 print "convexPoly: Polygon reduced from %i to %i vertices | tolerance: %i" % (len(vertices), len(v_new), tolerance)
435 vertices = v_new
436
437 # So poly should be alright now
438 # Continue reducing the vertecs
439 vertices_orig_reduced = vertices
440 vertices = tools_poly.poly_center_vertices(vertices)
441
442 vertices = tools_poly.convex_hull(vertices)
443
444 if len(vertices) < 3:
445 return
446
447 # Define the body
448 x, y = c = tools_poly.calc_center(vertices_orig_reduced)
449 return self.poly((x,y), vertices, dynamic, density, restitution, friction)
450
451 def to_b2vec(self,pt):
452 pt = self.parent.to_world(pt)
453 ptx, pty = pt
454 ptx /= self.parent.ppm
455 pty /= self.parent.ppm
456 pt = box2d.b2Vec2(ptx, pty)
457 return pt
458 # Alex Levenson's added joint methods:
459 def distanceJoint(self,b1,b2,p1,p2):
460 # Distance Joint
461 p1 = self.to_b2vec(p1)
462 p2 = self.to_b2vec(p2)
463
464 jointDef = box2d.b2DistanceJointDef()
465 jointDef.Initialize(b1, b2, p1, p2)
466 jointDef.collideConnected = True
467 self.parent.world.CreateJoint(jointDef)
468
469 def fixedJoint(self, *args):
470 if len(args) == 2:
471 # Fixed Joint to the Background, don't assume the center of the body
472 b1 = self.parent.world.GetGroundBody()
473 b2 = args[0]
474 p1 = self.to_b2vec(args[1])
475
476 jointDef = box2d.b2RevoluteJointDef()
477 jointDef.Initialize(b1, b2, p1)
478 self.parent.world.CreateJoint(jointDef)
479 elif len(args) == 1:
480 # Fixed Joint to the Background, assume the center of the body
481 b1 = self.parent.world.GetGroundBody()
482 b2 = args[0]
483 p1 = b2.GetWorldCenter()
484
485 jointDef = box2d.b2RevoluteJointDef()
486 jointDef.Initialize(b1, b2, p1)
487
488 self.parent.world.CreateJoint(jointDef)
489
490 def revoluteJoint(self,b1,b2,p1):
491 # revolute joint between to bodies
492 p1 = self.to_b2vec(p1)
493
494 jointDef = box2d.b2RevoluteJointDef()
495 jointDef.Initialize(b1, b2, p1)
496
497 self.parent.world.CreateJoint(jointDef)
498
499 # prismatic joint + pully not fully functional at this point
500 def prismaticJoint(self,b1,b2,Axis=(0.0,1.0),lower=-2,upper=2):
501 jointDef = box2d.b2PrismaticJointDef()
502 worldAxis = box2d.b2Vec2(Axis[0],Axis[1])
503 jointDef.Initialize(b1, b2, b1.GetWorldCenter(), worldAxis)
504 jointDef.lowerTranslation = lower
505 jointDef.upperTranslation = upper
506 jointDef.enableLimit = True
507
508 self.parent.world.CreateJoint(jointDef)
509
510 def pully(self,b1,b2,p1,p2,g1,g2,ratio=1.0,maxLength1=5,maxLength2=5):
511 p1 = self.to_b2vec(p1)
512 p2 = self.to_b2vec(p2)
513 g1 = self.to_b2vec(g1)
514 g2 = self.to_b2vec(g2)
515
516 jointDef = box2d.b2PulleyJointDef()
517 jointDef.Initialize(b1, b2, g1, g2, p1, p2, ratio)
518 jointDef.maxLength1 = maxLength1
519 jointDef.maxLength2 = maxLength2
520
521 self.parent.world.CreateJoint(jointDef)
522
523 def motor(self, body,pt,torque=900,speed=-10):
524 # Fixed Joint to the Background with a motor on it
525 b1 = self.parent.world.GetGroundBody()
526 pt = self.to_b2vec(pt)
527
528 jointDef = box2d.b2RevoluteJointDef()
529 jointDef.Initialize(b1, body, pt)
530 jointDef.maxMotorTorque = torque
531 jointDef.motorSpeed = speed
532 jointDef.enableMotor = True
533 self.parent.world.CreateJoint(jointDef)
534 #def jointMotor(self,b1,b2,p1,speed):
535 # p1 = self.tob2vec(p1)
536 # jointDef = box2d.b2RevoluteJointDef()
537 # jointDef.Initialize(b1, b2, p1)
538 # jointDef.
539 #
540 def joint(self, *args):
541 print "* Add Joint:", args
542
543 if len(args) == 4:
544 # Distance Joint
545 b1, b2, p1, p2 = args
546
547 p1 = self.parent.to_world(p1)
548 p2 = self.parent.to_world(p2)
549
550 p1x, p1y = p1
551 p2x, p2y = p2
552
553 p1x /= self.parent.ppm
554 p1y /= self.parent.ppm
555 p2x /= self.parent.ppm
556 p2y /= self.parent.ppm
557
558 p1 = box2d.b2Vec2(p1x, p1y)
559 p2 = box2d.b2Vec2(p2x, p2y)
560
561 jointDef = box2d.b2DistanceJointDef()
562 jointDef.Initialize(b1, b2, p1, p2)
563 jointDef.collideConnected = True
564
565 self.parent.world.CreateJoint(jointDef)
566
567 elif len(args) == 3:
568 # Revolute Joint
569 pass
570
571 elif len(args) == 1:
572 # Fixed Joint to the Background, assume the center of the body
573 b1 = self.parent.world.GetGroundBody()
574 b2 = args[0]
575 p1 = b2.GetWorldCenter()
576
577 jointDef = box2d.b2RevoluteJointDef()
578 jointDef.Initialize(b1, b2, p1)
579
580 self.parent.world.CreateJoint(jointDef)
581
582 def mouseJoint(self, body, pos):
583 pos = self.parent.to_world(pos)
584 x, y = pos
585 x /= self.parent.ppm
586 y /= self.parent.ppm
587
588 mj = box2d.b2MouseJointDef()
589 mj.body1 = self.parent.world.GetGroundBody()
590 mj.body2 = body
591 mj.target = box2d.b2Vec2(x, y)
592 mj.maxForce = 100.0 * body.GetMass() # give humans POWER!
593 self.parent.mouseJoint = self.parent.world.CreateJoint(mj).getAsType()
594 body.WakeUp()
595
596 def remove_mouseJoint(self):
597 if self.parent.mouseJoint:
598 self.parent.world.DestroyJoint(self.parent.mouseJoint)
599 self.parent.mouseJoint = None
600
0 from platform import architecture
1 from platform import system as platformsystem
2
3 s = platformsystem()
4 arch, arch2 = architecture()
5
6 print "Loading box2d for %s (%s)" % (s, arch)
7
8 if s == 'Linux':
9 if arch == "64bit":
10 from box2d_linux64 import *
11 else:
12 # try:
13 from box2d_linux32 import *
14 # except:
15 # from box2d_linux32ppc import *
16 #
17 #elif s == 'Windows':
18 # from box2d_win import *
19 #
20 #elif s == 'Darwin':
21 # from box2d_macosx import *
0 # This file was automatically generated by SWIG (http://www.swig.org).
1 # Version 1.3.31
2 #
3 # Don't modify this file, modify the SWIG interface instead.
4 # This file is compatible with both classic and new-style classes.
5
6 import _Box2D2
7 import new
8 new_instancemethod = new.instancemethod
9 try:
10 _swig_property = property
11 except NameError:
12 pass # Python < 2.2 doesn't have 'property'.
13 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14 if (name == "thisown"): return self.this.own(value)
15 if (name == "this"):
16 if type(value).__name__ == 'PySwigObject':
17 self.__dict__[name] = value
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
25
26 def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29 def _swig_getattr(self,class_type,name):
30 if (name == "thisown"): return self.this.own()
31 method = class_type.__swig_getmethods__.get(name,None)
32 if method: return method(self)
33 raise AttributeError,name
34
35 def _swig_repr(self):
36 try: strthis = "proxy of " + self.this.__repr__()
37 except: strthis = ""
38 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
39
40 import types
41 try:
42 _object = types.ObjectType
43 _newclass = 1
44 except AttributeError:
45 class _object : pass
46 _newclass = 0
47 del types
48
49
50 try:
51 import weakref
52 weakref_proxy = weakref.proxy
53 except:
54 weakref_proxy = lambda x: x
55
56
57
58 def b2Alloc(*args):
59 """b2Alloc(int32 size) -> void"""
60 return _Box2D2.b2Alloc(*args)
61
62 def b2Free(*args):
63 """b2Free(void mem)"""
64 return _Box2D2.b2Free(*args)
65 class b2Version(_object):
66 """Proxy of C++ b2Version class"""
67 __swig_setmethods__ = {}
68 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
69 __swig_getmethods__ = {}
70 __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
71 __repr__ = _swig_repr
72 __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
73 __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
74 if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
75 __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
76 __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
77 if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
78 __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
79 __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
80 if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
81 def __init__(self, *args):
82 """__init__(self) -> b2Version"""
83 this = _Box2D2.new_b2Version(*args)
84 try: self.this.append(this)
85 except: self.this = this
86 __swig_destroy__ = _Box2D2.delete_b2Version
87 __del__ = lambda self : None;
88 b2Version_swigregister = _Box2D2.b2Version_swigregister
89 b2Version_swigregister(b2Version)
90 cvar = _Box2D2.cvar
91 b2_pi = cvar.b2_pi
92 b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
93 b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
94 b2_maxProxies = cvar.b2_maxProxies
95 b2_maxPairs = cvar.b2_maxPairs
96 b2_linearSlop = cvar.b2_linearSlop
97 b2_angularSlop = cvar.b2_angularSlop
98 b2_toiSlop = cvar.b2_toiSlop
99 b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
100 b2_velocityThreshold = cvar.b2_velocityThreshold
101 b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
102 b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
103 b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
104 b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
105 b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
106 b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
107 b2_contactBaumgarte = cvar.b2_contactBaumgarte
108 b2_timeToSleep = cvar.b2_timeToSleep
109 b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
110 b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
111
112
113 def b2MixFriction(*args):
114 """b2MixFriction(float32 friction1, float32 friction2) -> float32"""
115 return _Box2D2.b2MixFriction(*args)
116
117 def b2MixRestitution(*args):
118 """b2MixRestitution(float32 restitution1, float32 restitution2) -> float32"""
119 return _Box2D2.b2MixRestitution(*args)
120
121 def b2IsValid(*args):
122 """b2IsValid(float32 x) -> bool"""
123 return _Box2D2.b2IsValid(*args)
124
125 def b2InvSqrt(*args):
126 """b2InvSqrt(float32 x) -> float32"""
127 return _Box2D2.b2InvSqrt(*args)
128 class b2Vec2(_object):
129 """Proxy of C++ b2Vec2 class"""
130 __swig_setmethods__ = {}
131 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
132 __swig_getmethods__ = {}
133 __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
134 __repr__ = _swig_repr
135 def __init__(self, *args):
136 """
137 __init__(self) -> b2Vec2
138 __init__(self, float32 x, float32 y) -> b2Vec2
139 """
140 this = _Box2D2.new_b2Vec2(*args)
141 try: self.this.append(this)
142 except: self.this = this
143 def SetZero(*args):
144 """SetZero(self)"""
145 return _Box2D2.b2Vec2_SetZero(*args)
146
147 def Set(*args):
148 """Set(self, float32 x_, float32 y_)"""
149 return _Box2D2.b2Vec2_Set(*args)
150
151 def __neg__(*args):
152 """__neg__(self) -> b2Vec2"""
153 return _Box2D2.b2Vec2___neg__(*args)
154
155 def add_vector(*args):
156 """add_vector(self, b2Vec2 v)"""
157 return _Box2D2.b2Vec2_add_vector(*args)
158
159 def sub_vector(*args):
160 """sub_vector(self, b2Vec2 v)"""
161 return _Box2D2.b2Vec2_sub_vector(*args)
162
163 def mul_float(*args):
164 """mul_float(self, float32 a)"""
165 return _Box2D2.b2Vec2_mul_float(*args)
166
167 def Length(*args):
168 """Length(self) -> float32"""
169 return _Box2D2.b2Vec2_Length(*args)
170
171 def LengthSquared(*args):
172 """LengthSquared(self) -> float32"""
173 return _Box2D2.b2Vec2_LengthSquared(*args)
174
175 def Normalize(*args):
176 """Normalize(self) -> float32"""
177 return _Box2D2.b2Vec2_Normalize(*args)
178
179 def IsValid(*args):
180 """IsValid(self) -> bool"""
181 return _Box2D2.b2Vec2_IsValid(*args)
182
183 __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
184 __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
185 if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
186 __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
187 __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
188 if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
189 def __repr__(self):
190 return "b2Vec2(%g,%g)" % (self.x, self.y)
191 def tuple(self):
192 return (self.x, self.y)
193 def fromTuple(self, tuple):
194 self.x, self.y = tuple
195 return self
196 def copy(self):
197 return b2Vec2(self.x, self.y)
198 def __iadd__(self, other):
199 self.add_vector(other)
200 return self
201 def __isub__(self, other):
202 self.sub_vector(other)
203 return self
204 def __imul__(self, a):
205 self.mul_float(a)
206 return self
207 def __idiv__(self, a):
208 self.div_float(a)
209 return self
210
211
212 def __div__(*args):
213 """__div__(self, float32 a) -> b2Vec2"""
214 return _Box2D2.b2Vec2___div__(*args)
215
216 def __mul__(*args):
217 """__mul__(self, float32 a) -> b2Vec2"""
218 return _Box2D2.b2Vec2___mul__(*args)
219
220 def __add__(*args):
221 """__add__(self, b2Vec2 other) -> b2Vec2"""
222 return _Box2D2.b2Vec2___add__(*args)
223
224 def __sub__(*args):
225 """__sub__(self, b2Vec2 other) -> b2Vec2"""
226 return _Box2D2.b2Vec2___sub__(*args)
227
228 def __rmul__(*args):
229 """__rmul__(self, float32 a) -> b2Vec2"""
230 return _Box2D2.b2Vec2___rmul__(*args)
231
232 def __rdiv__(*args):
233 """__rdiv__(self, float32 a) -> b2Vec2"""
234 return _Box2D2.b2Vec2___rdiv__(*args)
235
236 def div_float(*args):
237 """div_float(self, float32 a)"""
238 return _Box2D2.b2Vec2_div_float(*args)
239
240 __swig_destroy__ = _Box2D2.delete_b2Vec2
241 __del__ = lambda self : None;
242 b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
243 b2Vec2_swigregister(b2Vec2)
244
245 class b2Mat22(_object):
246 """Proxy of C++ b2Mat22 class"""
247 __swig_setmethods__ = {}
248 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
249 __swig_getmethods__ = {}
250 __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
251 __repr__ = _swig_repr
252 def __init__(self, *args):
253 """
254 __init__(self) -> b2Mat22
255 __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
256 __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
257 __init__(self, float32 angle) -> b2Mat22
258 """
259 this = _Box2D2.new_b2Mat22(*args)
260 try: self.this.append(this)
261 except: self.this = this
262 def Set(*args):
263 """
264 Set(self, b2Vec2 c1, b2Vec2 c2)
265 Set(self, float32 angle)
266 """
267 return _Box2D2.b2Mat22_Set(*args)
268
269 def SetIdentity(*args):
270 """SetIdentity(self)"""
271 return _Box2D2.b2Mat22_SetIdentity(*args)
272
273 def SetZero(*args):
274 """SetZero(self)"""
275 return _Box2D2.b2Mat22_SetZero(*args)
276
277 def GetAngle(*args):
278 """GetAngle(self) -> float32"""
279 return _Box2D2.b2Mat22_GetAngle(*args)
280
281 def Invert(*args):
282 """Invert(self) -> b2Mat22"""
283 return _Box2D2.b2Mat22_Invert(*args)
284
285 def Solve(*args):
286 """Solve(self, b2Vec2 b) -> b2Vec2"""
287 return _Box2D2.b2Mat22_Solve(*args)
288
289 __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
290 __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
291 if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
292 __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
293 __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
294 if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
295 def __repr__(self):
296 return "b2Mat22(col1: %s col2: %s)" % (self.col1, self.col2)
297
298 __swig_destroy__ = _Box2D2.delete_b2Mat22
299 __del__ = lambda self : None;
300 b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
301 b2Mat22_swigregister(b2Mat22)
302
303 class b2XForm(_object):
304 """Proxy of C++ b2XForm class"""
305 __swig_setmethods__ = {}
306 __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
307 __swig_getmethods__ = {}
308 __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
309 __repr__ = _swig_repr
310 def __init__(self, *args):
311 """
312 __init__(self) -> b2XForm
313 __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
314 """
315 this = _Box2D2.new_b2XForm(*args)
316 try: self.this.append(this)
317 except: self.this = this
318 def SetIdentity(*args):
319 """SetIdentity(self)"""
320 return _Box2D2.b2XForm_SetIdentity(*args)
321
322 __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
323 __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
324 if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
325 __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
326 __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
327 if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
328 __swig_destroy__ = _Box2D2.delete_b2XForm
329 __del__ = lambda self : None;
330 b2XForm_swigregister = _Box2D2.b2XForm_swigregister
331 b2XForm_swigregister(b2XForm)
332
333 class b2Sweep(_object):
334 """Proxy of C++ b2Sweep class"""
335 __swig_setmethods__ = {}
336 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
337 __swig_getmethods__ = {}
338 __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
339 __repr__ = _swig_repr
340 def GetXForm(*args):
341 """GetXForm(self, b2XForm xf, float32 t)"""
342 return _Box2D2.b2Sweep_GetXForm(*args)
343
344 def Advance(*args):
345 """Advance(self, float32 t)"""
346 return _Box2D2.b2Sweep_Advance(*args)
347
348 __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
349 __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
350 if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
351 __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
352 __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
353 if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
354 __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
355 __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
356 if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
357 __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
358 __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
359 if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
360 __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
361 __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
362 if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
363 __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
364 __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
365 if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
366 def __init__(self, *args):
367 """__init__(self) -> b2Sweep"""
368 this = _Box2D2.new_b2Sweep(*args)
369 try: self.this.append(this)
370 except: self.this = this
371 __swig_destroy__ = _Box2D2.delete_b2Sweep
372 __del__ = lambda self : None;
373 b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
374 b2Sweep_swigregister(b2Sweep)
375
376
377 def b2Dot(*args):
378 """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
379 return _Box2D2.b2Dot(*args)
380
381 def b2sub(*args):
382 """b2sub(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
383 return _Box2D2.b2sub(*args)
384
385 def b2mul(*args):
386 """b2mul(float32 s, b2Vec2 a) -> b2Vec2"""
387 return _Box2D2.b2mul(*args)
388
389 def b2equ(*args):
390 """b2equ(b2Vec2 a, b2Vec2 b) -> bool"""
391 return _Box2D2.b2equ(*args)
392
393 def b2DistanceSquared(*args):
394 """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
395 return _Box2D2.b2DistanceSquared(*args)
396
397 def b2Min(*args):
398 """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
399 return _Box2D2.b2Min(*args)
400
401 def b2Max(*args):
402 """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
403 return _Box2D2.b2Max(*args)
404
405 def b2Clamp(*args):
406 """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
407 return _Box2D2.b2Clamp(*args)
408 RAND_LIMIT = _Box2D2.RAND_LIMIT
409
410 def b2NextPowerOfTwo(*args):
411 """b2NextPowerOfTwo(uint32 x) -> uint32"""
412 return _Box2D2.b2NextPowerOfTwo(*args)
413
414 def b2IsPowerOfTwo(*args):
415 """b2IsPowerOfTwo(uint32 x) -> bool"""
416 return _Box2D2.b2IsPowerOfTwo(*args)
417 class b2ContactID(_object):
418 """Proxy of C++ b2ContactID class"""
419 __swig_setmethods__ = {}
420 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
421 __swig_getmethods__ = {}
422 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
423 __repr__ = _swig_repr
424 __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
425 __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
426 if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
427 __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
428 if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
429 def __repr__(self):
430 return "b2ContactID(key: %d Features: \n\t%s)" % \
431 (self.key, self.features)
432
433 def __init__(self, *args):
434 """__init__(self) -> b2ContactID"""
435 this = _Box2D2.new_b2ContactID(*args)
436 try: self.this.append(this)
437 except: self.this = this
438 __swig_destroy__ = _Box2D2.delete_b2ContactID
439 __del__ = lambda self : None;
440 b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
441 b2ContactID_swigregister(b2ContactID)
442 b2Vec2_zero = cvar.b2Vec2_zero
443 b2Mat22_identity = cvar.b2Mat22_identity
444 b2XForm_identity = cvar.b2XForm_identity
445
446 def b2Cross(*args):
447 """
448 b2Cross(b2Vec2 a, b2Vec2 b) -> float32
449 b2Cross(b2Vec2 a, float32 s) -> b2Vec2
450 b2Cross(float32 s, b2Vec2 a) -> b2Vec2
451 """
452 return _Box2D2.b2Cross(*args)
453
454 def b2add(*args):
455 """
456 b2add(b2Vec2 a, b2Vec2 b) -> b2Vec2
457 b2add(b2Mat22 A, b2Mat22 B) -> b2Mat22
458 """
459 return _Box2D2.b2add(*args)
460
461 def b2Mul(*args):
462 """
463 b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
464 b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
465 b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
466 """
467 return _Box2D2.b2Mul(*args)
468
469 def b2MulT(*args):
470 """
471 b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
472 b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
473 b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
474 """
475 return _Box2D2.b2MulT(*args)
476
477 def b2Abs(*args):
478 """
479 b2Abs(float32 a) -> float32
480 b2Abs(b2Vec2 a) -> b2Vec2
481 b2Abs(b2Mat22 A) -> b2Mat22
482 """
483 return _Box2D2.b2Abs(*args)
484
485 def b2Random(*args):
486 """
487 b2Random() -> float32
488 b2Random(float32 lo, float32 hi) -> float32
489 """
490 return _Box2D2.b2Random(*args)
491 b2_nullFeature = cvar.b2_nullFeature
492
493 class b2ContactID_features(_object):
494 """Proxy of C++ b2ContactID_features class"""
495 __swig_setmethods__ = {}
496 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
497 __swig_getmethods__ = {}
498 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
499 __repr__ = _swig_repr
500 __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
501 __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
502 if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
503 __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
504 __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
505 if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
506 __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
507 __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
508 if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
509 __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
510 __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
511 if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
512 def __repr__(self):
513 return "b2ContactID::Features(\n\treferenceFace: %d incidentEdge: %d incidentVertex: %d flip: %d)" % \
514 (self.referenceFace, self.incidentEdge, self.incidentVertex, self.flip)
515
516 def __init__(self, *args):
517 """__init__(self) -> b2ContactID_features"""
518 this = _Box2D2.new_b2ContactID_features(*args)
519 try: self.this.append(this)
520 except: self.this = this
521 __swig_destroy__ = _Box2D2.delete_b2ContactID_features
522 __del__ = lambda self : None;
523 b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
524 b2ContactID_features_swigregister(b2ContactID_features)
525
526 class b2ManifoldPoint(_object):
527 """Proxy of C++ b2ManifoldPoint class"""
528 __swig_setmethods__ = {}
529 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
530 __swig_getmethods__ = {}
531 __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
532 __repr__ = _swig_repr
533 __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
534 __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
535 if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
536 __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
537 __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
538 if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
539 __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
540 __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
541 if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
542 __swig_setmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_set
543 __swig_getmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_get
544 if _newclass:normalImpulse = _swig_property(_Box2D2.b2ManifoldPoint_normalImpulse_get, _Box2D2.b2ManifoldPoint_normalImpulse_set)
545 __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_set
546 __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_get
547 if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ManifoldPoint_tangentImpulse_get, _Box2D2.b2ManifoldPoint_tangentImpulse_set)
548 __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
549 __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
550 if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
551 def __init__(self, *args):
552 """__init__(self) -> b2ManifoldPoint"""
553 this = _Box2D2.new_b2ManifoldPoint(*args)
554 try: self.this.append(this)
555 except: self.this = this
556 __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
557 __del__ = lambda self : None;
558 b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
559 b2ManifoldPoint_swigregister(b2ManifoldPoint)
560
561 class b2Manifold(_object):
562 """Proxy of C++ b2Manifold class"""
563 __swig_setmethods__ = {}
564 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
565 __swig_getmethods__ = {}
566 __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
567 __repr__ = _swig_repr
568 __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
569 __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
570 if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
571 __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
572 __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
573 if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
574 __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
575 __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
576 if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
577 def __init__(self, *args):
578 """__init__(self) -> b2Manifold"""
579 this = _Box2D2.new_b2Manifold(*args)
580 try: self.this.append(this)
581 except: self.this = this
582 __swig_destroy__ = _Box2D2.delete_b2Manifold
583 __del__ = lambda self : None;
584 b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
585 b2Manifold_swigregister(b2Manifold)
586
587 class b2Segment(_object):
588 """Proxy of C++ b2Segment class"""
589 __swig_setmethods__ = {}
590 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
591 __swig_getmethods__ = {}
592 __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
593 __repr__ = _swig_repr
594 def TestSegment(*args):
595 """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
596 return _Box2D2.b2Segment_TestSegment(*args)
597
598 __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
599 __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
600 if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
601 __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
602 __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
603 if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
604 def __init__(self, *args):
605 """__init__(self) -> b2Segment"""
606 this = _Box2D2.new_b2Segment(*args)
607 try: self.this.append(this)
608 except: self.this = this
609 __swig_destroy__ = _Box2D2.delete_b2Segment
610 __del__ = lambda self : None;
611 b2Segment_swigregister = _Box2D2.b2Segment_swigregister
612 b2Segment_swigregister(b2Segment)
613
614 class b2AABB(_object):
615 """Proxy of C++ b2AABB class"""
616 __swig_setmethods__ = {}
617 __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
618 __swig_getmethods__ = {}
619 __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
620 __repr__ = _swig_repr
621 def IsValid(*args):
622 """IsValid(self) -> bool"""
623 return _Box2D2.b2AABB_IsValid(*args)
624
625 __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
626 __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
627 if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
628 __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
629 __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
630 if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
631 def __init__(self, *args):
632 """__init__(self) -> b2AABB"""
633 this = _Box2D2.new_b2AABB(*args)
634 try: self.this.append(this)
635 except: self.this = this
636 __swig_destroy__ = _Box2D2.delete_b2AABB
637 __del__ = lambda self : None;
638 b2AABB_swigregister = _Box2D2.b2AABB_swigregister
639 b2AABB_swigregister(b2AABB)
640
641 class b2OBB(_object):
642 """Proxy of C++ b2OBB class"""
643 __swig_setmethods__ = {}
644 __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
645 __swig_getmethods__ = {}
646 __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
647 __repr__ = _swig_repr
648 __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
649 __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
650 if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
651 __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
652 __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
653 if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
654 __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
655 __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
656 if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
657 def __init__(self, *args):
658 """__init__(self) -> b2OBB"""
659 this = _Box2D2.new_b2OBB(*args)
660 try: self.this.append(this)
661 except: self.this = this
662 __swig_destroy__ = _Box2D2.delete_b2OBB
663 __del__ = lambda self : None;
664 b2OBB_swigregister = _Box2D2.b2OBB_swigregister
665 b2OBB_swigregister(b2OBB)
666
667
668 def b2CollideCircles(*args):
669 """
670 b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
671 b2CircleShape circle2, b2XForm xf2)
672 """
673 return _Box2D2.b2CollideCircles(*args)
674
675 def b2CollidePolygonAndCircle(*args):
676 """
677 b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
678 b2CircleShape circle, b2XForm xf2)
679 """
680 return _Box2D2.b2CollidePolygonAndCircle(*args)
681
682 def b2CollidePolygons(*args):
683 """
684 b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
685 b2PolygonShape polygon2, b2XForm xf2)
686 """
687 return _Box2D2.b2CollidePolygons(*args)
688
689 def b2TimeOfImpact(*args):
690 """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
691 return _Box2D2.b2TimeOfImpact(*args)
692
693 def b2TestOverlap(*args):
694 """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
695 return _Box2D2.b2TestOverlap(*args)
696 class b2MassData(_object):
697 """Proxy of C++ b2MassData class"""
698 __swig_setmethods__ = {}
699 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
700 __swig_getmethods__ = {}
701 __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
702 __repr__ = _swig_repr
703 __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
704 __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
705 if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
706 __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
707 __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
708 if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
709 __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
710 __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
711 if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
712 def __init__(self, *args):
713 """__init__(self) -> b2MassData"""
714 this = _Box2D2.new_b2MassData(*args)
715 try: self.this.append(this)
716 except: self.this = this
717 __swig_destroy__ = _Box2D2.delete_b2MassData
718 __del__ = lambda self : None;
719 b2MassData_swigregister = _Box2D2.b2MassData_swigregister
720 b2MassData_swigregister(b2MassData)
721
722 def b2Distance(*args):
723 """
724 b2Distance(b2Vec2 a, b2Vec2 b) -> float32
725 b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
726 b2Shape shape2, b2XForm xf2) -> float32
727 """
728 return _Box2D2.b2Distance(*args)
729
730 class b2FilterData(_object):
731 """Proxy of C++ b2FilterData class"""
732 __swig_setmethods__ = {}
733 __setattr__ = lambda self, name, value: _swig_setattr(self, b2FilterData, name, value)
734 __swig_getmethods__ = {}
735 __getattr__ = lambda self, name: _swig_getattr(self, b2FilterData, name)
736 __repr__ = _swig_repr
737 __swig_setmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_set
738 __swig_getmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_get
739 if _newclass:categoryBits = _swig_property(_Box2D2.b2FilterData_categoryBits_get, _Box2D2.b2FilterData_categoryBits_set)
740 __swig_setmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_set
741 __swig_getmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_get
742 if _newclass:maskBits = _swig_property(_Box2D2.b2FilterData_maskBits_get, _Box2D2.b2FilterData_maskBits_set)
743 __swig_setmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_set
744 __swig_getmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_get
745 if _newclass:groupIndex = _swig_property(_Box2D2.b2FilterData_groupIndex_get, _Box2D2.b2FilterData_groupIndex_set)
746 def __init__(self, *args):
747 """__init__(self) -> b2FilterData"""
748 this = _Box2D2.new_b2FilterData(*args)
749 try: self.this.append(this)
750 except: self.this = this
751 __swig_destroy__ = _Box2D2.delete_b2FilterData
752 __del__ = lambda self : None;
753 b2FilterData_swigregister = _Box2D2.b2FilterData_swigregister
754 b2FilterData_swigregister(b2FilterData)
755
756 e_unknownShape = _Box2D2.e_unknownShape
757 e_circleShape = _Box2D2.e_circleShape
758 e_polygonShape = _Box2D2.e_polygonShape
759 e_shapeTypeCount = _Box2D2.e_shapeTypeCount
760 class b2ShapeDef(_object):
761 """Proxy of C++ b2ShapeDef class"""
762 __swig_setmethods__ = {}
763 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
764 __swig_getmethods__ = {}
765 __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
766 __repr__ = _swig_repr
767 def __init__(self, *args):
768 """__init__(self) -> b2ShapeDef"""
769 this = _Box2D2.new_b2ShapeDef(*args)
770 try: self.this.append(this)
771 except: self.this = this
772 __swig_destroy__ = _Box2D2.delete_b2ShapeDef
773 __del__ = lambda self : None;
774 __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
775 __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
776 if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
777 __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
778 __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
779 if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
780 __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
781 __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
782 if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
783 __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
784 __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
785 if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
786 __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
787 __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
788 if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
789 __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
790 __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
791 if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
792 __swig_setmethods__["filter"] = _Box2D2.b2ShapeDef_filter_set
793 __swig_getmethods__["filter"] = _Box2D2.b2ShapeDef_filter_get
794 if _newclass:filter = _swig_property(_Box2D2.b2ShapeDef_filter_get, _Box2D2.b2ShapeDef_filter_set)
795 b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
796 b2ShapeDef_swigregister(b2ShapeDef)
797
798 class b2Shape(_object):
799 """Proxy of C++ b2Shape class"""
800 __swig_setmethods__ = {}
801 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
802 __swig_getmethods__ = {}
803 __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
804 def __init__(self): raise AttributeError, "No constructor defined"
805 __repr__ = _swig_repr
806 def GetType(*args):
807 """GetType(self) -> int"""
808 return _Box2D2.b2Shape_GetType(*args)
809
810 def IsSensor(*args):
811 """IsSensor(self) -> bool"""
812 return _Box2D2.b2Shape_IsSensor(*args)
813
814 def SetFilterData(*args):
815 """SetFilterData(self, b2FilterData filter)"""
816 return _Box2D2.b2Shape_SetFilterData(*args)
817
818 def GetFilterData(*args):
819 """GetFilterData(self) -> b2FilterData"""
820 return _Box2D2.b2Shape_GetFilterData(*args)
821
822 def GetBody(*args):
823 """GetBody(self) -> b2Body"""
824 return _Box2D2.b2Shape_GetBody(*args)
825
826 def GetNext(*args):
827 """GetNext(self) -> b2Shape"""
828 return _Box2D2.b2Shape_GetNext(*args)
829
830 def GetUserData(self): # override the C++ version as it does not work.
831 """Get the specified userData (m_userData)"""
832 return self.pyGetUserData()
833
834
835 def SetUserData(*args):
836 """SetUserData(self, void data)"""
837 return _Box2D2.b2Shape_SetUserData(*args)
838
839 def TestPoint(*args):
840 """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
841 return _Box2D2.b2Shape_TestPoint(*args)
842
843 def TestSegment(*args):
844 """
845 TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
846 float32 maxLambda) -> bool
847 """
848 return _Box2D2.b2Shape_TestSegment(*args)
849
850 def ComputeAABB(*args):
851 """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
852 return _Box2D2.b2Shape_ComputeAABB(*args)
853
854 def ComputeSweptAABB(*args):
855 """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
856 return _Box2D2.b2Shape_ComputeSweptAABB(*args)
857
858 def ComputeMass(*args):
859 """ComputeMass(self, b2MassData massData)"""
860 return _Box2D2.b2Shape_ComputeMass(*args)
861
862 def GetSweepRadius(*args):
863 """GetSweepRadius(self) -> float32"""
864 return _Box2D2.b2Shape_GetSweepRadius(*args)
865
866 def GetFriction(*args):
867 """GetFriction(self) -> float32"""
868 return _Box2D2.b2Shape_GetFriction(*args)
869
870 def GetRestitution(*args):
871 """GetRestitution(self) -> float32"""
872 return _Box2D2.b2Shape_GetRestitution(*args)
873
874 def __repr__(self):
875 return "b2Shape(from Body %s )" % (self.GetBody())
876 def typeName(self):
877 types = { e_unknownShape : "Unknown",
878 e_circleShape : "Circle",
879 e_polygonShape : "Polygon",
880 e_shapeTypeCount: "ShapeType" }
881 return types[self.GetType()]
882 def getAsType(self):
883 """Return a typecasted version of the shape"""
884 return (getattr(self, "as%s" % self.typeName())) ()
885
886 def asCircle(*args):
887 """asCircle(self) -> b2CircleShape"""
888 return _Box2D2.b2Shape_asCircle(*args)
889
890 def asPolygon(*args):
891 """asPolygon(self) -> b2PolygonShape"""
892 return _Box2D2.b2Shape_asPolygon(*args)
893
894 def pyGetUserData(*args):
895 """pyGetUserData(self) -> PyObject"""
896 return _Box2D2.b2Shape_pyGetUserData(*args)
897
898 b2Shape_swigregister = _Box2D2.b2Shape_swigregister
899 b2Shape_swigregister(b2Shape)
900
901 def b2JointInfo(self):
902 """Return a rather verbose string representation of a joint"""
903 props = dir(self)
904 ignoreList = ('this', 'thisown', 'next', 'prev', 'm_next', 'm_prev')
905 info = []
906 for prop in dir(self):
907 if prop[:2]=='__' or prop in ignoreList: continue
908 if not callable(getattr(self, prop)):
909 info.append(prop + ":")
910 info.append(str(getattr(self, prop)))
911 return "%s(%s)" % (self.__class__.__name__, " ".join(info))
912
913 e_unknownJoint = _Box2D2.e_unknownJoint
914 e_revoluteJoint = _Box2D2.e_revoluteJoint
915 e_prismaticJoint = _Box2D2.e_prismaticJoint
916 e_distanceJoint = _Box2D2.e_distanceJoint
917 e_pulleyJoint = _Box2D2.e_pulleyJoint
918 e_mouseJoint = _Box2D2.e_mouseJoint
919 e_gearJoint = _Box2D2.e_gearJoint
920 e_inactiveLimit = _Box2D2.e_inactiveLimit
921 e_atLowerLimit = _Box2D2.e_atLowerLimit
922 e_atUpperLimit = _Box2D2.e_atUpperLimit
923 e_equalLimits = _Box2D2.e_equalLimits
924 class b2Jacobian(_object):
925 """Proxy of C++ b2Jacobian class"""
926 __swig_setmethods__ = {}
927 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
928 __swig_getmethods__ = {}
929 __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
930 __repr__ = _swig_repr
931 __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
932 __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
933 if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
934 __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
935 __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
936 if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
937 __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
938 __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
939 if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
940 __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
941 __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
942 if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
943 def SetZero(*args):
944 """SetZero(self)"""
945 return _Box2D2.b2Jacobian_SetZero(*args)
946
947 def Set(*args):
948 """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
949 return _Box2D2.b2Jacobian_Set(*args)
950
951 def Compute(*args):
952 """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
953 return _Box2D2.b2Jacobian_Compute(*args)
954
955 def __repr__(self):
956 return "b2Jacobian(linear1: %s: linear2: %s angular1: %s angular2: %s)" %\
957 (self.linear1, self.linear2, self.angular1, self.angular2)
958
959 def __init__(self, *args):
960 """__init__(self) -> b2Jacobian"""
961 this = _Box2D2.new_b2Jacobian(*args)
962 try: self.this.append(this)
963 except: self.this = this
964 __swig_destroy__ = _Box2D2.delete_b2Jacobian
965 __del__ = lambda self : None;
966 b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
967 b2Jacobian_swigregister(b2Jacobian)
968
969 class b2JointEdge(_object):
970 """Proxy of C++ b2JointEdge class"""
971 __swig_setmethods__ = {}
972 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
973 __swig_getmethods__ = {}
974 __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
975 __repr__ = _swig_repr
976 __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
977 __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
978 if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
979 __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
980 __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
981 if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
982 __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
983 __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
984 if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
985 __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
986 __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
987 if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
988 def __repr__(self):
989 return "b2JointEdge(other: %s)" % (self.other)
990
991 def __init__(self, *args):
992 """__init__(self) -> b2JointEdge"""
993 this = _Box2D2.new_b2JointEdge(*args)
994 try: self.this.append(this)
995 except: self.this = this
996 __swig_destroy__ = _Box2D2.delete_b2JointEdge
997 __del__ = lambda self : None;
998 b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
999 b2JointEdge_swigregister(b2JointEdge)
1000
1001 class b2JointDef(_object):
1002 """Proxy of C++ b2JointDef class"""
1003 __swig_setmethods__ = {}
1004 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
1005 __swig_getmethods__ = {}
1006 __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
1007 __repr__ = _swig_repr
1008 def __init__(self, *args):
1009 """__init__(self) -> b2JointDef"""
1010 this = _Box2D2.new_b2JointDef(*args)
1011 try: self.this.append(this)
1012 except: self.this = this
1013 __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
1014 __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
1015 if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
1016 __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
1017 __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
1018 if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
1019 __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
1020 __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
1021 if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
1022 __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
1023 __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
1024 if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
1025 __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
1026 __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
1027 if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
1028 def __repr__(self):
1029 return "b2JointDef(body1: %s body2: %s)" % (self.body1, self.body2)
1030 def typeName(self):
1031 types = { e_unknownJoint : "Unknown",
1032 e_mouseJoint : "Mouse",
1033 e_gearJoint : "Gear",
1034 e_distanceJoint : "Distance",
1035 e_prismaticJoint: "Prismatic",
1036 e_pulleyJoint : "Pulley",
1037 e_revoluteJoint : "Revolute" }
1038 return types[self.GetType()]
1039
1040 __swig_destroy__ = _Box2D2.delete_b2JointDef
1041 __del__ = lambda self : None;
1042 b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
1043 b2JointDef_swigregister(b2JointDef)
1044
1045 class b2Joint(_object):
1046 """Proxy of C++ b2Joint class"""
1047 __swig_setmethods__ = {}
1048 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
1049 __swig_getmethods__ = {}
1050 __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
1051 def __init__(self): raise AttributeError, "No constructor defined"
1052 __repr__ = _swig_repr
1053 def GetType(*args):
1054 """GetType(self) -> int"""
1055 return _Box2D2.b2Joint_GetType(*args)
1056
1057 def GetBody1(*args):
1058 """GetBody1(self) -> b2Body"""
1059 return _Box2D2.b2Joint_GetBody1(*args)
1060
1061 def GetBody2(*args):
1062 """GetBody2(self) -> b2Body"""
1063 return _Box2D2.b2Joint_GetBody2(*args)
1064
1065 def GetAnchor1(*args):
1066 """GetAnchor1(self) -> b2Vec2"""
1067 return _Box2D2.b2Joint_GetAnchor1(*args)
1068
1069 def GetAnchor2(*args):
1070 """GetAnchor2(self) -> b2Vec2"""
1071 return _Box2D2.b2Joint_GetAnchor2(*args)
1072
1073 def GetReactionForce(*args):
1074 """GetReactionForce(self) -> b2Vec2"""
1075 return _Box2D2.b2Joint_GetReactionForce(*args)
1076
1077 def GetReactionTorque(*args):
1078 """GetReactionTorque(self) -> float32"""
1079 return _Box2D2.b2Joint_GetReactionTorque(*args)
1080
1081 def GetNext(*args):
1082 """GetNext(self) -> b2Joint"""
1083 return _Box2D2.b2Joint_GetNext(*args)
1084
1085 def GetUserData(self): # override the C++ version as it does not work.
1086 """Get the specified userData (m_userData)"""
1087 return self.pyGetUserData()
1088
1089
1090 def SetUserData(*args):
1091 """SetUserData(self, void data)"""
1092 return _Box2D2.b2Joint_SetUserData(*args)
1093
1094 def __repr__(self):
1095 return "b2Joint(m_body1: %s m_body2: %s getAsType(): %s)" % (self.m_body1, self.m_body2, self.getAsType())
1096 def typeName(self):
1097 types = { e_unknownJoint : "Unknown",
1098 e_mouseJoint : "Mouse",
1099 e_gearJoint : "Gear",
1100 e_distanceJoint : "Distance",
1101 e_prismaticJoint: "Prismatic",
1102 e_pulleyJoint : "Pulley",
1103 e_revoluteJoint : "Revolute" }
1104 return types[self.GetType()]
1105 def getAsType(self):
1106 """Return a typecasted version of the joint"""
1107 return (getattr(self, "as%sJoint" % self.typeName())) ()
1108
1109 def pyGetUserData(*args):
1110 """pyGetUserData(self) -> PyObject"""
1111 return _Box2D2.b2Joint_pyGetUserData(*args)
1112
1113 def asMouseJoint(*args):
1114 """asMouseJoint(self) -> b2MouseJoint"""
1115 return _Box2D2.b2Joint_asMouseJoint(*args)
1116
1117 def asGearJoint(*args):
1118 """asGearJoint(self) -> b2GearJoint"""
1119 return _Box2D2.b2Joint_asGearJoint(*args)
1120
1121 def asDistanceJoint(*args):
1122 """asDistanceJoint(self) -> b2DistanceJoint"""
1123 return _Box2D2.b2Joint_asDistanceJoint(*args)
1124
1125 def asPrismaticJoint(*args):
1126 """asPrismaticJoint(self) -> b2PrismaticJoint"""
1127 return _Box2D2.b2Joint_asPrismaticJoint(*args)
1128
1129 def asPulleyJoint(*args):
1130 """asPulleyJoint(self) -> b2PulleyJoint"""
1131 return _Box2D2.b2Joint_asPulleyJoint(*args)
1132
1133 def asRevoluteJoint(*args):
1134 """asRevoluteJoint(self) -> b2RevoluteJoint"""
1135 return _Box2D2.b2Joint_asRevoluteJoint(*args)
1136
1137 b2Joint_swigregister = _Box2D2.b2Joint_swigregister
1138 b2Joint_swigregister(b2Joint)
1139
1140 class b2CircleDef(b2ShapeDef):
1141 """Proxy of C++ b2CircleDef class"""
1142 __swig_setmethods__ = {}
1143 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1144 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
1145 __swig_getmethods__ = {}
1146 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1147 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
1148 __repr__ = _swig_repr
1149 def __init__(self, *args):
1150 """__init__(self) -> b2CircleDef"""
1151 this = _Box2D2.new_b2CircleDef(*args)
1152 try: self.this.append(this)
1153 except: self.this = this
1154 __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
1155 __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
1156 if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
1157 __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
1158 __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
1159 if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
1160 __swig_destroy__ = _Box2D2.delete_b2CircleDef
1161 __del__ = lambda self : None;
1162 b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
1163 b2CircleDef_swigregister(b2CircleDef)
1164
1165 class b2CircleShape(b2Shape):
1166 """Proxy of C++ b2CircleShape class"""
1167 __swig_setmethods__ = {}
1168 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1169 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
1170 __swig_getmethods__ = {}
1171 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1172 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
1173 def __init__(self): raise AttributeError, "No constructor defined"
1174 __repr__ = _swig_repr
1175 def TestPoint(*args):
1176 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
1177 return _Box2D2.b2CircleShape_TestPoint(*args)
1178
1179 def TestSegment(*args):
1180 """
1181 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
1182 float32 maxLambda) -> bool
1183 """
1184 return _Box2D2.b2CircleShape_TestSegment(*args)
1185
1186 def ComputeAABB(*args):
1187 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
1188 return _Box2D2.b2CircleShape_ComputeAABB(*args)
1189
1190 def ComputeSweptAABB(*args):
1191 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
1192 return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
1193
1194 def ComputeMass(*args):
1195 """ComputeMass(self, b2MassData massData)"""
1196 return _Box2D2.b2CircleShape_ComputeMass(*args)
1197
1198 def GetLocalPosition(*args):
1199 """GetLocalPosition(self) -> b2Vec2"""
1200 return _Box2D2.b2CircleShape_GetLocalPosition(*args)
1201
1202 def GetRadius(*args):
1203 """GetRadius(self) -> float32"""
1204 return _Box2D2.b2CircleShape_GetRadius(*args)
1205
1206 __swig_destroy__ = _Box2D2.delete_b2CircleShape
1207 __del__ = lambda self : None;
1208 b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
1209 b2CircleShape_swigregister(b2CircleShape)
1210
1211 class b2PolygonDef(b2ShapeDef):
1212 """Proxy of C++ b2PolygonDef class"""
1213 __swig_setmethods__ = {}
1214 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1215 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
1216 __swig_getmethods__ = {}
1217 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1218 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
1219 __repr__ = _swig_repr
1220 def __init__(self, *args):
1221 """__init__(self) -> b2PolygonDef"""
1222 this = _Box2D2.new_b2PolygonDef(*args)
1223 try: self.this.append(this)
1224 except: self.this = this
1225 def SetAsBox(*args):
1226 """
1227 SetAsBox(self, float32 hx, float32 hy)
1228 SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
1229 """
1230 return _Box2D2.b2PolygonDef_SetAsBox(*args)
1231
1232 __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
1233 __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
1234 if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
1235 __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
1236 __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
1237 if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
1238 def __repr__(self):
1239 return "b2PolygonDef(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
1240 def getVertices_tuple(self):
1241 """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1242 vertices = []
1243 for i in range(0, self.vertexCount):
1244 vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
1245 return vertices
1246 def getVertices_b2Vec2(self):
1247 """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1248 vertices = []
1249 for i in range(0, self.vertexCount):
1250 vertices.append(self.getVertex(i))
1251 return vertices
1252 def setVertices_tuple(self, vertices):
1253 """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
1254 in the format ( (x1,y1), (x2,y2) ... (xN,yN) )"""
1255 if len(vertices) > b2_maxPolygonVertices:
1256 raise ValueError
1257 self.vertexCount = len(vertices)
1258 for i in range(0, self.vertexCount):
1259 self.setVertex(i, vertices[i][0], vertices[i][1])
1260 def setVertices_b2Vec2(self, vertices):
1261 """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
1262 in the format ( (x1,y1), (x2,y2) ... (xN,yN) ) where each vertex
1263 is a b2Vec2"""
1264 if len(vertices) > b2_maxPolygonVertices:
1265 raise ValueError
1266 self.vertexCount = len(vertices)
1267 for i in range(0, self.vertexCount):
1268 self.setVertex(i, vertices[i])
1269
1270 def getVertex(*args):
1271 """getVertex(self, uint16 vnum) -> b2Vec2"""
1272 return _Box2D2.b2PolygonDef_getVertex(*args)
1273
1274 def setVertex(*args):
1275 """
1276 setVertex(self, uint16 vnum, b2Vec2 value)
1277 setVertex(self, uint16 vnum, float32 x, float32 y)
1278 """
1279 return _Box2D2.b2PolygonDef_setVertex(*args)
1280
1281 __swig_destroy__ = _Box2D2.delete_b2PolygonDef
1282 __del__ = lambda self : None;
1283 b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
1284 b2PolygonDef_swigregister(b2PolygonDef)
1285
1286 class b2PolygonShape(b2Shape):
1287 """Proxy of C++ b2PolygonShape class"""
1288 __swig_setmethods__ = {}
1289 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1290 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
1291 __swig_getmethods__ = {}
1292 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1293 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
1294 def __init__(self): raise AttributeError, "No constructor defined"
1295 __repr__ = _swig_repr
1296 def TestPoint(*args):
1297 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
1298 return _Box2D2.b2PolygonShape_TestPoint(*args)
1299
1300 def TestSegment(*args):
1301 """
1302 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
1303 float32 maxLambda) -> bool
1304 """
1305 return _Box2D2.b2PolygonShape_TestSegment(*args)
1306
1307 def ComputeAABB(*args):
1308 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
1309 return _Box2D2.b2PolygonShape_ComputeAABB(*args)
1310
1311 def ComputeSweptAABB(*args):
1312 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
1313 return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
1314
1315 def ComputeMass(*args):
1316 """ComputeMass(self, b2MassData massData)"""
1317 return _Box2D2.b2PolygonShape_ComputeMass(*args)
1318
1319 def GetOBB(*args):
1320 """GetOBB(self) -> b2OBB"""
1321 return _Box2D2.b2PolygonShape_GetOBB(*args)
1322
1323 def GetCentroid(*args):
1324 """GetCentroid(self) -> b2Vec2"""
1325 return _Box2D2.b2PolygonShape_GetCentroid(*args)
1326
1327 def GetVertexCount(*args):
1328 """GetVertexCount(self) -> int32"""
1329 return _Box2D2.b2PolygonShape_GetVertexCount(*args)
1330
1331 def GetCoreVertices(*args):
1332 """GetCoreVertices(self) -> b2Vec2"""
1333 return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
1334
1335 def GetNormals(*args):
1336 """GetNormals(self) -> b2Vec2"""
1337 return _Box2D2.b2PolygonShape_GetNormals(*args)
1338
1339 def GetFirstVertex(*args):
1340 """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
1341 return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
1342
1343 def Centroid(*args):
1344 """Centroid(self, b2XForm xf) -> b2Vec2"""
1345 return _Box2D2.b2PolygonShape_Centroid(*args)
1346
1347 def Support(*args):
1348 """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
1349 return _Box2D2.b2PolygonShape_Support(*args)
1350
1351 def __repr__(self):
1352 return "b2PolygonShape(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
1353 def getVertices_tuple(self):
1354 """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1355 vertices = []
1356 for i in range(0, self.vertexCount):
1357 vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
1358 return vertices
1359 def getVertices_b2Vec2(self):
1360 """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1361 vertices = []
1362 for i in range(0, self.GetVertexCount()):
1363 vertices.append(self.getVertex(i))
1364 return vertices
1365
1366 def getVertex(*args):
1367 """getVertex(self, uint16 vnum) -> b2Vec2"""
1368 return _Box2D2.b2PolygonShape_getVertex(*args)
1369
1370 __swig_destroy__ = _Box2D2.delete_b2PolygonShape
1371 __del__ = lambda self : None;
1372 b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
1373 b2PolygonShape_swigregister(b2PolygonShape)
1374
1375 class b2Pair(_object):
1376 """Proxy of C++ b2Pair class"""
1377 __swig_setmethods__ = {}
1378 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
1379 __swig_getmethods__ = {}
1380 __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
1381 __repr__ = _swig_repr
1382 e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
1383 e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
1384 e_pairFinal = _Box2D2.b2Pair_e_pairFinal
1385 def SetBuffered(*args):
1386 """SetBuffered(self)"""
1387 return _Box2D2.b2Pair_SetBuffered(*args)
1388
1389 def ClearBuffered(*args):
1390 """ClearBuffered(self)"""
1391 return _Box2D2.b2Pair_ClearBuffered(*args)
1392
1393 def IsBuffered(*args):
1394 """IsBuffered(self) -> bool"""
1395 return _Box2D2.b2Pair_IsBuffered(*args)
1396
1397 def SetRemoved(*args):
1398 """SetRemoved(self)"""
1399 return _Box2D2.b2Pair_SetRemoved(*args)
1400
1401 def ClearRemoved(*args):
1402 """ClearRemoved(self)"""
1403 return _Box2D2.b2Pair_ClearRemoved(*args)
1404
1405 def IsRemoved(*args):
1406 """IsRemoved(self) -> bool"""
1407 return _Box2D2.b2Pair_IsRemoved(*args)
1408
1409 def SetFinal(*args):
1410 """SetFinal(self)"""
1411 return _Box2D2.b2Pair_SetFinal(*args)
1412
1413 def IsFinal(*args):
1414 """IsFinal(self) -> bool"""
1415 return _Box2D2.b2Pair_IsFinal(*args)
1416
1417 __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
1418 __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
1419 if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
1420 __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
1421 __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
1422 if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
1423 __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
1424 __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
1425 if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
1426 __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
1427 __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
1428 if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
1429 __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
1430 __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
1431 if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
1432 def __init__(self, *args):
1433 """__init__(self) -> b2Pair"""
1434 this = _Box2D2.new_b2Pair(*args)
1435 try: self.this.append(this)
1436 except: self.this = this
1437 __swig_destroy__ = _Box2D2.delete_b2Pair
1438 __del__ = lambda self : None;
1439 b2Pair_swigregister = _Box2D2.b2Pair_swigregister
1440 b2Pair_swigregister(b2Pair)
1441 b2_nullPair = cvar.b2_nullPair
1442 b2_nullProxy = cvar.b2_nullProxy
1443 b2_tableCapacity = cvar.b2_tableCapacity
1444 b2_tableMask = cvar.b2_tableMask
1445
1446 class b2BufferedPair(_object):
1447 """Proxy of C++ b2BufferedPair class"""
1448 __swig_setmethods__ = {}
1449 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
1450 __swig_getmethods__ = {}
1451 __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
1452 __repr__ = _swig_repr
1453 __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
1454 __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
1455 if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
1456 __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
1457 __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
1458 if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
1459 def __init__(self, *args):
1460 """__init__(self) -> b2BufferedPair"""
1461 this = _Box2D2.new_b2BufferedPair(*args)
1462 try: self.this.append(this)
1463 except: self.this = this
1464 __swig_destroy__ = _Box2D2.delete_b2BufferedPair
1465 __del__ = lambda self : None;
1466 b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
1467 b2BufferedPair_swigregister(b2BufferedPair)
1468
1469 class b2PairCallback(_object):
1470 """Proxy of C++ b2PairCallback class"""
1471 __swig_setmethods__ = {}
1472 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
1473 __swig_getmethods__ = {}
1474 __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
1475 def __init__(self): raise AttributeError, "No constructor defined"
1476 __repr__ = _swig_repr
1477 __swig_destroy__ = _Box2D2.delete_b2PairCallback
1478 __del__ = lambda self : None;
1479 def PairAdded(*args):
1480 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
1481 return _Box2D2.b2PairCallback_PairAdded(*args)
1482
1483 def PairRemoved(*args):
1484 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
1485 return _Box2D2.b2PairCallback_PairRemoved(*args)
1486
1487 b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
1488 b2PairCallback_swigregister(b2PairCallback)
1489
1490 class b2PairManager(_object):
1491 """Proxy of C++ b2PairManager class"""
1492 __swig_setmethods__ = {}
1493 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
1494 __swig_getmethods__ = {}
1495 __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
1496 __repr__ = _swig_repr
1497 def __init__(self, *args):
1498 """__init__(self) -> b2PairManager"""
1499 this = _Box2D2.new_b2PairManager(*args)
1500 try: self.this.append(this)
1501 except: self.this = this
1502 def Initialize(*args):
1503 """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
1504 return _Box2D2.b2PairManager_Initialize(*args)
1505
1506 def AddBufferedPair(*args):
1507 """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1508 return _Box2D2.b2PairManager_AddBufferedPair(*args)
1509
1510 def RemoveBufferedPair(*args):
1511 """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1512 return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
1513
1514 def Commit(*args):
1515 """Commit(self)"""
1516 return _Box2D2.b2PairManager_Commit(*args)
1517
1518 __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
1519 __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
1520 if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
1521 __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
1522 __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
1523 if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
1524 __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
1525 __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
1526 if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
1527 __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
1528 __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
1529 if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
1530 __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
1531 __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
1532 if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
1533 __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
1534 __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
1535 if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
1536 __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
1537 __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
1538 if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
1539 __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
1540 __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
1541 if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
1542 __swig_destroy__ = _Box2D2.delete_b2PairManager
1543 __del__ = lambda self : None;
1544 b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
1545 b2PairManager_swigregister(b2PairManager)
1546
1547 class b2Bound(_object):
1548 """Proxy of C++ b2Bound class"""
1549 __swig_setmethods__ = {}
1550 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
1551 __swig_getmethods__ = {}
1552 __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
1553 __repr__ = _swig_repr
1554 def IsLower(*args):
1555 """IsLower(self) -> bool"""
1556 return _Box2D2.b2Bound_IsLower(*args)
1557
1558 def IsUpper(*args):
1559 """IsUpper(self) -> bool"""
1560 return _Box2D2.b2Bound_IsUpper(*args)
1561
1562 __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
1563 __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
1564 if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
1565 __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
1566 __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
1567 if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
1568 __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
1569 __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
1570 if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
1571 def __init__(self, *args):
1572 """__init__(self) -> b2Bound"""
1573 this = _Box2D2.new_b2Bound(*args)
1574 try: self.this.append(this)
1575 except: self.this = this
1576 __swig_destroy__ = _Box2D2.delete_b2Bound
1577 __del__ = lambda self : None;
1578 b2Bound_swigregister = _Box2D2.b2Bound_swigregister
1579 b2Bound_swigregister(b2Bound)
1580 b2_invalid = cvar.b2_invalid
1581 b2_nullEdge = cvar.b2_nullEdge
1582
1583 class b2Proxy(_object):
1584 """Proxy of C++ b2Proxy class"""
1585 __swig_setmethods__ = {}
1586 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
1587 __swig_getmethods__ = {}
1588 __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
1589 __repr__ = _swig_repr
1590 def GetNext(*args):
1591 """GetNext(self) -> uint16"""
1592 return _Box2D2.b2Proxy_GetNext(*args)
1593
1594 def SetNext(*args):
1595 """SetNext(self, uint16 next)"""
1596 return _Box2D2.b2Proxy_SetNext(*args)
1597
1598 def IsValid(*args):
1599 """IsValid(self) -> bool"""
1600 return _Box2D2.b2Proxy_IsValid(*args)
1601
1602 __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
1603 __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
1604 if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
1605 __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
1606 __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
1607 if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
1608 __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
1609 __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
1610 if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
1611 __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
1612 __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
1613 if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
1614 __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
1615 __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
1616 if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
1617 def __init__(self, *args):
1618 """__init__(self) -> b2Proxy"""
1619 this = _Box2D2.new_b2Proxy(*args)
1620 try: self.this.append(this)
1621 except: self.this = this
1622 __swig_destroy__ = _Box2D2.delete_b2Proxy
1623 __del__ = lambda self : None;
1624 b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
1625 b2Proxy_swigregister(b2Proxy)
1626
1627 class b2BroadPhase(_object):
1628 """Proxy of C++ b2BroadPhase class"""
1629 __swig_setmethods__ = {}
1630 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
1631 __swig_getmethods__ = {}
1632 __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
1633 __repr__ = _swig_repr
1634 def __init__(self, *args):
1635 """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
1636 this = _Box2D2.new_b2BroadPhase(*args)
1637 try: self.this.append(this)
1638 except: self.this = this
1639 __swig_destroy__ = _Box2D2.delete_b2BroadPhase
1640 __del__ = lambda self : None;
1641 def InRange(*args):
1642 """InRange(self, b2AABB aabb) -> bool"""
1643 return _Box2D2.b2BroadPhase_InRange(*args)
1644
1645 def CreateProxy(*args):
1646 """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
1647 return _Box2D2.b2BroadPhase_CreateProxy(*args)
1648
1649 def DestroyProxy(*args):
1650 """DestroyProxy(self, int32 proxyId)"""
1651 return _Box2D2.b2BroadPhase_DestroyProxy(*args)
1652
1653 def MoveProxy(*args):
1654 """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
1655 return _Box2D2.b2BroadPhase_MoveProxy(*args)
1656
1657 def Commit(*args):
1658 """Commit(self)"""
1659 return _Box2D2.b2BroadPhase_Commit(*args)
1660
1661 def GetProxy(*args):
1662 """GetProxy(self, int32 proxyId) -> b2Proxy"""
1663 return _Box2D2.b2BroadPhase_GetProxy(*args)
1664
1665 def Query(*args):
1666 """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
1667 return _Box2D2.b2BroadPhase_Query(*args)
1668
1669 def Validate(*args):
1670 """Validate(self)"""
1671 return _Box2D2.b2BroadPhase_Validate(*args)
1672
1673 def ValidatePairs(*args):
1674 """ValidatePairs(self)"""
1675 return _Box2D2.b2BroadPhase_ValidatePairs(*args)
1676
1677 __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
1678 __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
1679 if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
1680 __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
1681 __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
1682 if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
1683 __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
1684 __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
1685 if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
1686 __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
1687 __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
1688 if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
1689 __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
1690 __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
1691 if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
1692 __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
1693 __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
1694 if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
1695 __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
1696 __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
1697 if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
1698 __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
1699 __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
1700 if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
1701 __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
1702 __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
1703 if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
1704 __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
1705 __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
1706 if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
1707 __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
1708 __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
1709 if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
1710 b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
1711 b2BroadPhase_swigregister(b2BroadPhase)
1712
1713 class b2DestructionListener(_object):
1714 """Proxy of C++ b2DestructionListener class"""
1715 __swig_setmethods__ = {}
1716 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
1717 __swig_getmethods__ = {}
1718 __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
1719 __repr__ = _swig_repr
1720 __swig_destroy__ = _Box2D2.delete_b2DestructionListener
1721 __del__ = lambda self : None;
1722 def SayGoodbye(*args):
1723 """
1724 SayGoodbye(self, b2Joint joint)
1725 SayGoodbye(self, b2Shape shape)
1726 """
1727 return _Box2D2.b2DestructionListener_SayGoodbye(*args)
1728
1729 def __init__(self, *args):
1730 """__init__(self) -> b2DestructionListener"""
1731 if self.__class__ == b2DestructionListener:
1732 args = (None,) + args
1733 else:
1734 args = (self,) + args
1735 this = _Box2D2.new_b2DestructionListener(*args)
1736 try: self.this.append(this)
1737 except: self.this = this
1738 def __disown__(self):
1739 self.this.disown()
1740 _Box2D2.disown_b2DestructionListener(self)
1741 return weakref_proxy(self)
1742 b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
1743 b2DestructionListener_swigregister(b2DestructionListener)
1744
1745 class b2BoundaryListener(_object):
1746 """Proxy of C++ b2BoundaryListener class"""
1747 __swig_setmethods__ = {}
1748 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
1749 __swig_getmethods__ = {}
1750 __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
1751 __repr__ = _swig_repr
1752 __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
1753 __del__ = lambda self : None;
1754 def Violation(*args):
1755 """Violation(self, b2Body body)"""
1756 return _Box2D2.b2BoundaryListener_Violation(*args)
1757
1758 def __init__(self, *args):
1759 """__init__(self) -> b2BoundaryListener"""
1760 if self.__class__ == b2BoundaryListener:
1761 args = (None,) + args
1762 else:
1763 args = (self,) + args
1764 this = _Box2D2.new_b2BoundaryListener(*args)
1765 try: self.this.append(this)
1766 except: self.this = this
1767 def __disown__(self):
1768 self.this.disown()
1769 _Box2D2.disown_b2BoundaryListener(self)
1770 return weakref_proxy(self)
1771 b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
1772 b2BoundaryListener_swigregister(b2BoundaryListener)
1773
1774 class b2ContactFilter(_object):
1775 """Proxy of C++ b2ContactFilter class"""
1776 __swig_setmethods__ = {}
1777 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
1778 __swig_getmethods__ = {}
1779 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
1780 __repr__ = _swig_repr
1781 __swig_destroy__ = _Box2D2.delete_b2ContactFilter
1782 __del__ = lambda self : None;
1783 def ShouldCollide(*args):
1784 """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
1785 return _Box2D2.b2ContactFilter_ShouldCollide(*args)
1786
1787 def __init__(self, *args):
1788 """__init__(self) -> b2ContactFilter"""
1789 this = _Box2D2.new_b2ContactFilter(*args)
1790 try: self.this.append(this)
1791 except: self.this = this
1792 b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
1793 b2ContactFilter_swigregister(b2ContactFilter)
1794
1795 class b2ContactListener(_object):
1796 """Proxy of C++ b2ContactListener class"""
1797 __swig_setmethods__ = {}
1798 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
1799 __swig_getmethods__ = {}
1800 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
1801 __repr__ = _swig_repr
1802 __swig_destroy__ = _Box2D2.delete_b2ContactListener
1803 __del__ = lambda self : None;
1804 def Add(*args):
1805 """Add(self, b2ContactPoint point)"""
1806 return _Box2D2.b2ContactListener_Add(*args)
1807
1808 def Persist(*args):
1809 """Persist(self, b2ContactPoint point)"""
1810 return _Box2D2.b2ContactListener_Persist(*args)
1811
1812 def Remove(*args):
1813 """Remove(self, b2ContactPoint point)"""
1814 return _Box2D2.b2ContactListener_Remove(*args)
1815
1816 def Result(*args):
1817 """Result(self, b2ContactResult point)"""
1818 return _Box2D2.b2ContactListener_Result(*args)
1819
1820 def __init__(self, *args):
1821 """__init__(self) -> b2ContactListener"""
1822 if self.__class__ == b2ContactListener:
1823 args = (None,) + args
1824 else:
1825 args = (self,) + args
1826 this = _Box2D2.new_b2ContactListener(*args)
1827 try: self.this.append(this)
1828 except: self.this = this
1829 def __disown__(self):
1830 self.this.disown()
1831 _Box2D2.disown_b2ContactListener(self)
1832 return weakref_proxy(self)
1833 b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
1834 b2ContactListener_swigregister(b2ContactListener)
1835
1836 class b2Color(_object):
1837 """Proxy of C++ b2Color class"""
1838 __swig_setmethods__ = {}
1839 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
1840 __swig_getmethods__ = {}
1841 __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
1842 __repr__ = _swig_repr
1843 def __init__(self, *args):
1844 """
1845 __init__(self) -> b2Color
1846 __init__(self, float32 r, float32 g, float32 b) -> b2Color
1847 """
1848 this = _Box2D2.new_b2Color(*args)
1849 try: self.this.append(this)
1850 except: self.this = this
1851 __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
1852 __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
1853 if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
1854 __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
1855 __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
1856 if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
1857 __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
1858 __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
1859 if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
1860 __swig_destroy__ = _Box2D2.delete_b2Color
1861 __del__ = lambda self : None;
1862 b2Color_swigregister = _Box2D2.b2Color_swigregister
1863 b2Color_swigregister(b2Color)
1864
1865 class b2DebugDraw(_object):
1866 """Proxy of C++ b2DebugDraw class"""
1867 __swig_setmethods__ = {}
1868 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
1869 __swig_getmethods__ = {}
1870 __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
1871 __repr__ = _swig_repr
1872 def __init__(self, *args):
1873 """__init__(self) -> b2DebugDraw"""
1874 if self.__class__ == b2DebugDraw:
1875 args = (None,) + args
1876 else:
1877 args = (self,) + args
1878 this = _Box2D2.new_b2DebugDraw(*args)
1879 try: self.this.append(this)
1880 except: self.this = this
1881 __swig_destroy__ = _Box2D2.delete_b2DebugDraw
1882 __del__ = lambda self : None;
1883 e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
1884 e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
1885 e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
1886 e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
1887 e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
1888 e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
1889 e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
1890 def SetFlags(*args):
1891 """SetFlags(self, uint32 flags)"""
1892 return _Box2D2.b2DebugDraw_SetFlags(*args)
1893
1894 def GetFlags(*args):
1895 """GetFlags(self) -> uint32"""
1896 return _Box2D2.b2DebugDraw_GetFlags(*args)
1897
1898 def AppendFlags(*args):
1899 """AppendFlags(self, uint32 flags)"""
1900 return _Box2D2.b2DebugDraw_AppendFlags(*args)
1901
1902 def ClearFlags(*args):
1903 """ClearFlags(self, uint32 flags)"""
1904 return _Box2D2.b2DebugDraw_ClearFlags(*args)
1905
1906 def DrawPolygon(*args):
1907 """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1908 return _Box2D2.b2DebugDraw_DrawPolygon(*args)
1909
1910 def DrawSolidPolygon(*args):
1911 """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1912 return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
1913
1914 def DrawCircle(*args):
1915 """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
1916 return _Box2D2.b2DebugDraw_DrawCircle(*args)
1917
1918 def DrawSolidCircle(*args):
1919 """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
1920 return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
1921
1922 def DrawSegment(*args):
1923 """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
1924 return _Box2D2.b2DebugDraw_DrawSegment(*args)
1925
1926 def DrawXForm(*args):
1927 """DrawXForm(self, b2XForm xf)"""
1928 return _Box2D2.b2DebugDraw_DrawXForm(*args)
1929
1930 def __disown__(self):
1931 self.this.disown()
1932 _Box2D2.disown_b2DebugDraw(self)
1933 return weakref_proxy(self)
1934 b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
1935 b2DebugDraw_swigregister(b2DebugDraw)
1936
1937 class b2BlockAllocator(_object):
1938 """Proxy of C++ b2BlockAllocator class"""
1939 __swig_setmethods__ = {}
1940 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
1941 __swig_getmethods__ = {}
1942 __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
1943 __repr__ = _swig_repr
1944 def __init__(self, *args):
1945 """__init__(self) -> b2BlockAllocator"""
1946 this = _Box2D2.new_b2BlockAllocator(*args)
1947 try: self.this.append(this)
1948 except: self.this = this
1949 __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
1950 __del__ = lambda self : None;
1951 def Allocate(*args):
1952 """Allocate(self, int32 size) -> void"""
1953 return _Box2D2.b2BlockAllocator_Allocate(*args)
1954
1955 def Free(*args):
1956 """Free(self, void p, int32 size)"""
1957 return _Box2D2.b2BlockAllocator_Free(*args)
1958
1959 def Clear(*args):
1960 """Clear(self)"""
1961 return _Box2D2.b2BlockAllocator_Clear(*args)
1962
1963 b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
1964 b2BlockAllocator_swigregister(b2BlockAllocator)
1965 b2_chunkSize = cvar.b2_chunkSize
1966 b2_maxBlockSize = cvar.b2_maxBlockSize
1967 b2_blockSizes = cvar.b2_blockSizes
1968 b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
1969
1970 class b2StackEntry(_object):
1971 """Proxy of C++ b2StackEntry class"""
1972 __swig_setmethods__ = {}
1973 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
1974 __swig_getmethods__ = {}
1975 __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
1976 __repr__ = _swig_repr
1977 __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
1978 __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
1979 if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
1980 __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
1981 __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
1982 if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
1983 __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
1984 __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
1985 if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
1986 def __init__(self, *args):
1987 """__init__(self) -> b2StackEntry"""
1988 this = _Box2D2.new_b2StackEntry(*args)
1989 try: self.this.append(this)
1990 except: self.this = this
1991 __swig_destroy__ = _Box2D2.delete_b2StackEntry
1992 __del__ = lambda self : None;
1993 b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
1994 b2StackEntry_swigregister(b2StackEntry)
1995 b2_stackSize = cvar.b2_stackSize
1996 b2_maxStackEntries = cvar.b2_maxStackEntries
1997
1998 class b2StackAllocator(_object):
1999 """Proxy of C++ b2StackAllocator class"""
2000 __swig_setmethods__ = {}
2001 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
2002 __swig_getmethods__ = {}
2003 __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
2004 __repr__ = _swig_repr
2005 def __init__(self, *args):
2006 """__init__(self) -> b2StackAllocator"""
2007 this = _Box2D2.new_b2StackAllocator(*args)
2008 try: self.this.append(this)
2009 except: self.this = this
2010 __swig_destroy__ = _Box2D2.delete_b2StackAllocator
2011 __del__ = lambda self : None;
2012 def Allocate(*args):
2013 """Allocate(self, int32 size) -> void"""
2014 return _Box2D2.b2StackAllocator_Allocate(*args)
2015
2016 def Free(*args):
2017 """Free(self, void p)"""
2018 return _Box2D2.b2StackAllocator_Free(*args)
2019
2020 def GetMaxAllocation(*args):
2021 """GetMaxAllocation(self) -> int32"""
2022 return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
2023
2024 b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
2025 b2StackAllocator_swigregister(b2StackAllocator)
2026
2027 class b2ContactRegister(_object):
2028 """Proxy of C++ b2ContactRegister class"""
2029 __swig_setmethods__ = {}
2030 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
2031 __swig_getmethods__ = {}
2032 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
2033 __repr__ = _swig_repr
2034 __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
2035 __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
2036 if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
2037 __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
2038 __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
2039 if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
2040 __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
2041 __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
2042 if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
2043 def __init__(self, *args):
2044 """__init__(self) -> b2ContactRegister"""
2045 this = _Box2D2.new_b2ContactRegister(*args)
2046 try: self.this.append(this)
2047 except: self.this = this
2048 __swig_destroy__ = _Box2D2.delete_b2ContactRegister
2049 __del__ = lambda self : None;
2050 b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
2051 b2ContactRegister_swigregister(b2ContactRegister)
2052
2053 class b2ContactEdge(_object):
2054 """Proxy of C++ b2ContactEdge class"""
2055 __swig_setmethods__ = {}
2056 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
2057 __swig_getmethods__ = {}
2058 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
2059 __repr__ = _swig_repr
2060 __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
2061 __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
2062 if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
2063 __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
2064 __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
2065 if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
2066 __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
2067 __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
2068 if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
2069 __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
2070 __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
2071 if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
2072 def __init__(self, *args):
2073 """__init__(self) -> b2ContactEdge"""
2074 this = _Box2D2.new_b2ContactEdge(*args)
2075 try: self.this.append(this)
2076 except: self.this = this
2077 __swig_destroy__ = _Box2D2.delete_b2ContactEdge
2078 __del__ = lambda self : None;
2079 b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
2080 b2ContactEdge_swigregister(b2ContactEdge)
2081
2082 class b2ContactPoint(_object):
2083 """Proxy of C++ b2ContactPoint class"""
2084 __swig_setmethods__ = {}
2085 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
2086 __swig_getmethods__ = {}
2087 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
2088 __repr__ = _swig_repr
2089 __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
2090 __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
2091 if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
2092 __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
2093 __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
2094 if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
2095 __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
2096 __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
2097 if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
2098 __swig_setmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_set
2099 __swig_getmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_get
2100 if _newclass:velocity = _swig_property(_Box2D2.b2ContactPoint_velocity_get, _Box2D2.b2ContactPoint_velocity_set)
2101 __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
2102 __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
2103 if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
2104 __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
2105 __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
2106 if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
2107 __swig_setmethods__["friction"] = _Box2D2.b2ContactPoint_friction_set
2108 __swig_getmethods__["friction"] = _Box2D2.b2ContactPoint_friction_get
2109 if _newclass:friction = _swig_property(_Box2D2.b2ContactPoint_friction_get, _Box2D2.b2ContactPoint_friction_set)
2110 __swig_setmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_set
2111 __swig_getmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_get
2112 if _newclass:restitution = _swig_property(_Box2D2.b2ContactPoint_restitution_get, _Box2D2.b2ContactPoint_restitution_set)
2113 __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
2114 __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
2115 if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
2116 def __repr__(self):
2117 return "b2ContactPoint(\n\tid: %s\n\tshape1: %s\n\tshape2: %s\n\tposition: %s\n\tnormal: %s\n\tseparation: %f normalForce: %f tangentForce: %f)" % \
2118 (self.id, self.shape1, self.shape2, self.position, self.normal, self.separation, self.normalForce, self.tangentForce)
2119
2120 def __init__(self, *args):
2121 """__init__(self) -> b2ContactPoint"""
2122 this = _Box2D2.new_b2ContactPoint(*args)
2123 try: self.this.append(this)
2124 except: self.this = this
2125 __swig_destroy__ = _Box2D2.delete_b2ContactPoint
2126 __del__ = lambda self : None;
2127 b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
2128 b2ContactPoint_swigregister(b2ContactPoint)
2129
2130 class b2ContactResult(_object):
2131 """Proxy of C++ b2ContactResult class"""
2132 __swig_setmethods__ = {}
2133 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactResult, name, value)
2134 __swig_getmethods__ = {}
2135 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactResult, name)
2136 __repr__ = _swig_repr
2137 __swig_setmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_set
2138 __swig_getmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_get
2139 if _newclass:shape1 = _swig_property(_Box2D2.b2ContactResult_shape1_get, _Box2D2.b2ContactResult_shape1_set)
2140 __swig_setmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_set
2141 __swig_getmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_get
2142 if _newclass:shape2 = _swig_property(_Box2D2.b2ContactResult_shape2_get, _Box2D2.b2ContactResult_shape2_set)
2143 __swig_setmethods__["position"] = _Box2D2.b2ContactResult_position_set
2144 __swig_getmethods__["position"] = _Box2D2.b2ContactResult_position_get
2145 if _newclass:position = _swig_property(_Box2D2.b2ContactResult_position_get, _Box2D2.b2ContactResult_position_set)
2146 __swig_setmethods__["normal"] = _Box2D2.b2ContactResult_normal_set
2147 __swig_getmethods__["normal"] = _Box2D2.b2ContactResult_normal_get
2148 if _newclass:normal = _swig_property(_Box2D2.b2ContactResult_normal_get, _Box2D2.b2ContactResult_normal_set)
2149 __swig_setmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_set
2150 __swig_getmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_get
2151 if _newclass:normalImpulse = _swig_property(_Box2D2.b2ContactResult_normalImpulse_get, _Box2D2.b2ContactResult_normalImpulse_set)
2152 __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_set
2153 __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_get
2154 if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ContactResult_tangentImpulse_get, _Box2D2.b2ContactResult_tangentImpulse_set)
2155 __swig_setmethods__["id"] = _Box2D2.b2ContactResult_id_set
2156 __swig_getmethods__["id"] = _Box2D2.b2ContactResult_id_get
2157 if _newclass:id = _swig_property(_Box2D2.b2ContactResult_id_get, _Box2D2.b2ContactResult_id_set)
2158 def __init__(self, *args):
2159 """__init__(self) -> b2ContactResult"""
2160 this = _Box2D2.new_b2ContactResult(*args)
2161 try: self.this.append(this)
2162 except: self.this = this
2163 __swig_destroy__ = _Box2D2.delete_b2ContactResult
2164 __del__ = lambda self : None;
2165 b2ContactResult_swigregister = _Box2D2.b2ContactResult_swigregister
2166 b2ContactResult_swigregister(b2ContactResult)
2167
2168 class b2Contact(_object):
2169 """Proxy of C++ b2Contact class"""
2170 __swig_setmethods__ = {}
2171 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
2172 __swig_getmethods__ = {}
2173 __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
2174 def __init__(self): raise AttributeError, "No constructor defined"
2175 __repr__ = _swig_repr
2176 def GetManifolds(*args):
2177 """GetManifolds(self) -> b2Manifold"""
2178 return _Box2D2.b2Contact_GetManifolds(*args)
2179
2180 def GetManifoldCount(*args):
2181 """GetManifoldCount(self) -> int32"""
2182 return _Box2D2.b2Contact_GetManifoldCount(*args)
2183
2184 def IsSolid(*args):
2185 """IsSolid(self) -> bool"""
2186 return _Box2D2.b2Contact_IsSolid(*args)
2187
2188 def GetNext(*args):
2189 """GetNext(self) -> b2Contact"""
2190 return _Box2D2.b2Contact_GetNext(*args)
2191
2192 def GetShape1(*args):
2193 """GetShape1(self) -> b2Shape"""
2194 return _Box2D2.b2Contact_GetShape1(*args)
2195
2196 def GetShape2(*args):
2197 """GetShape2(self) -> b2Shape"""
2198 return _Box2D2.b2Contact_GetShape2(*args)
2199
2200 e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
2201 e_slowFlag = _Box2D2.b2Contact_e_slowFlag
2202 e_islandFlag = _Box2D2.b2Contact_e_islandFlag
2203 e_toiFlag = _Box2D2.b2Contact_e_toiFlag
2204 def AddType(*args):
2205 """
2206 AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
2207 b2ShapeType type1, b2ShapeType type2)
2208 """
2209 return _Box2D2.b2Contact_AddType(*args)
2210
2211 if _newclass:AddType = staticmethod(AddType)
2212 __swig_getmethods__["AddType"] = lambda x: AddType
2213 def InitializeRegisters(*args):
2214 """InitializeRegisters()"""
2215 return _Box2D2.b2Contact_InitializeRegisters(*args)
2216
2217 if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
2218 __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
2219 def Create(*args):
2220 """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
2221 return _Box2D2.b2Contact_Create(*args)
2222
2223 if _newclass:Create = staticmethod(Create)
2224 __swig_getmethods__["Create"] = lambda x: Create
2225 def Destroy(*args):
2226 """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
2227 return _Box2D2.b2Contact_Destroy(*args)
2228
2229 if _newclass:Destroy = staticmethod(Destroy)
2230 __swig_getmethods__["Destroy"] = lambda x: Destroy
2231 __swig_destroy__ = _Box2D2.delete_b2Contact
2232 __del__ = lambda self : None;
2233 def Update(*args):
2234 """Update(self, b2ContactListener listener)"""
2235 return _Box2D2.b2Contact_Update(*args)
2236
2237 def Evaluate(*args):
2238 """Evaluate(self, b2ContactListener listener)"""
2239 return _Box2D2.b2Contact_Evaluate(*args)
2240
2241 __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
2242 __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
2243 if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
2244 __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
2245 __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
2246 if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
2247 __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
2248 __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
2249 if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
2250 __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
2251 __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
2252 if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
2253 __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
2254 __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
2255 if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
2256 __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
2257 __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
2258 if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
2259 __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
2260 __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
2261 if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
2262 __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
2263 __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
2264 if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
2265 __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
2266 __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
2267 if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
2268 __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
2269 __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
2270 if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
2271 __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
2272 __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
2273 if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
2274 __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
2275 __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
2276 if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
2277 __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
2278 __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
2279 if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
2280 b2Contact_swigregister = _Box2D2.b2Contact_swigregister
2281 b2Contact_swigregister(b2Contact)
2282
2283 def b2Contact_AddType(*args):
2284 """
2285 b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
2286 b2ShapeType type1, b2ShapeType type2)
2287 """
2288 return _Box2D2.b2Contact_AddType(*args)
2289
2290 def b2Contact_InitializeRegisters(*args):
2291 """b2Contact_InitializeRegisters()"""
2292 return _Box2D2.b2Contact_InitializeRegisters(*args)
2293
2294 def b2Contact_Create(*args):
2295 """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
2296 return _Box2D2.b2Contact_Create(*args)
2297
2298 def b2Contact_Destroy(*args):
2299 """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
2300 return _Box2D2.b2Contact_Destroy(*args)
2301
2302 class b2NullContact(b2Contact):
2303 """Proxy of C++ b2NullContact class"""
2304 __swig_setmethods__ = {}
2305 for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2306 __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
2307 __swig_getmethods__ = {}
2308 for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2309 __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
2310 __repr__ = _swig_repr
2311 def __init__(self, *args):
2312 """__init__(self) -> b2NullContact"""
2313 this = _Box2D2.new_b2NullContact(*args)
2314 try: self.this.append(this)
2315 except: self.this = this
2316 def Evaluate(*args):
2317 """Evaluate(self, b2ContactListener ?)"""
2318 return _Box2D2.b2NullContact_Evaluate(*args)
2319
2320 def GetManifolds(*args):
2321 """GetManifolds(self) -> b2Manifold"""
2322 return _Box2D2.b2NullContact_GetManifolds(*args)
2323
2324 __swig_destroy__ = _Box2D2.delete_b2NullContact
2325 __del__ = lambda self : None;
2326 b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
2327 b2NullContact_swigregister(b2NullContact)
2328
2329 class b2ContactManager(b2PairCallback):
2330 """Proxy of C++ b2ContactManager class"""
2331 __swig_setmethods__ = {}
2332 for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2333 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
2334 __swig_getmethods__ = {}
2335 for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2336 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
2337 __repr__ = _swig_repr
2338 def __init__(self, *args):
2339 """__init__(self) -> b2ContactManager"""
2340 this = _Box2D2.new_b2ContactManager(*args)
2341 try: self.this.append(this)
2342 except: self.this = this
2343 def PairAdded(*args):
2344 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
2345 return _Box2D2.b2ContactManager_PairAdded(*args)
2346
2347 def PairRemoved(*args):
2348 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
2349 return _Box2D2.b2ContactManager_PairRemoved(*args)
2350
2351 def Destroy(*args):
2352 """Destroy(self, b2Contact c)"""
2353 return _Box2D2.b2ContactManager_Destroy(*args)
2354
2355 def Collide(*args):
2356 """Collide(self)"""
2357 return _Box2D2.b2ContactManager_Collide(*args)
2358
2359 __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
2360 __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
2361 if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
2362 __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
2363 __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
2364 if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
2365 __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
2366 __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
2367 if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
2368 __swig_destroy__ = _Box2D2.delete_b2ContactManager
2369 __del__ = lambda self : None;
2370 b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
2371 b2ContactManager_swigregister(b2ContactManager)
2372
2373 class b2TimeStep(_object):
2374 """Proxy of C++ b2TimeStep class"""
2375 __swig_setmethods__ = {}
2376 __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
2377 __swig_getmethods__ = {}
2378 __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
2379 __repr__ = _swig_repr
2380 __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
2381 __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
2382 if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
2383 __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
2384 __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
2385 if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
2386 __swig_setmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_set
2387 __swig_getmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_get
2388 if _newclass:dtRatio = _swig_property(_Box2D2.b2TimeStep_dtRatio_get, _Box2D2.b2TimeStep_dtRatio_set)
2389 __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
2390 __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
2391 if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
2392 __swig_setmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_set
2393 __swig_getmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_get
2394 if _newclass:warmStarting = _swig_property(_Box2D2.b2TimeStep_warmStarting_get, _Box2D2.b2TimeStep_warmStarting_set)
2395 __swig_setmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_set
2396 __swig_getmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_get
2397 if _newclass:positionCorrection = _swig_property(_Box2D2.b2TimeStep_positionCorrection_get, _Box2D2.b2TimeStep_positionCorrection_set)
2398 def __init__(self, *args):
2399 """__init__(self) -> b2TimeStep"""
2400 this = _Box2D2.new_b2TimeStep(*args)
2401 try: self.this.append(this)
2402 except: self.this = this
2403 __swig_destroy__ = _Box2D2.delete_b2TimeStep
2404 __del__ = lambda self : None;
2405 b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
2406 b2TimeStep_swigregister(b2TimeStep)
2407
2408 class b2World(_object):
2409 """Proxy of C++ b2World class"""
2410 __swig_setmethods__ = {}
2411 __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
2412 __swig_getmethods__ = {}
2413 __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
2414 __repr__ = _swig_repr
2415 def __init__(self, *args):
2416 """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
2417 this = _Box2D2.new_b2World(*args)
2418 try: self.this.append(this)
2419 except: self.this = this
2420 __swig_destroy__ = _Box2D2.delete_b2World
2421 __del__ = lambda self : None;
2422 def SetDestructionListener(*args):
2423 """SetDestructionListener(self, b2DestructionListener listener)"""
2424 return _Box2D2.b2World_SetDestructionListener(*args)
2425
2426 def SetBoundaryListener(*args):
2427 """SetBoundaryListener(self, b2BoundaryListener listener)"""
2428 return _Box2D2.b2World_SetBoundaryListener(*args)
2429
2430 def SetContactFilter(*args):
2431 """SetContactFilter(self, b2ContactFilter filter)"""
2432 return _Box2D2.b2World_SetContactFilter(*args)
2433
2434 def SetContactListener(*args):
2435 """SetContactListener(self, b2ContactListener listener)"""
2436 return _Box2D2.b2World_SetContactListener(*args)
2437
2438 def SetDebugDraw(*args):
2439 """SetDebugDraw(self, b2DebugDraw debugDraw)"""
2440 return _Box2D2.b2World_SetDebugDraw(*args)
2441
2442 def CreateBody(*args):
2443 """CreateBody(self, b2BodyDef def) -> b2Body"""
2444 return _Box2D2.b2World_CreateBody(*args)
2445
2446 def DestroyBody(*args):
2447 """DestroyBody(self, b2Body body)"""
2448 return _Box2D2.b2World_DestroyBody(*args)
2449
2450 def CreateJoint(*args):
2451 """CreateJoint(self, b2JointDef def) -> b2Joint"""
2452 return _Box2D2.b2World_CreateJoint(*args)
2453
2454 def DestroyJoint(*args):
2455 """DestroyJoint(self, b2Joint joint)"""
2456 return _Box2D2.b2World_DestroyJoint(*args)
2457
2458 def GetGroundBody(*args):
2459 """GetGroundBody(self) -> b2Body"""
2460 return _Box2D2.b2World_GetGroundBody(*args)
2461
2462 def Step(*args):
2463 """Step(self, float32 timeStep, int32 iterations)"""
2464 return _Box2D2.b2World_Step(*args)
2465
2466 def GetBodyList(*args):
2467 """GetBodyList(self) -> b2Body"""
2468 return _Box2D2.b2World_GetBodyList(*args)
2469
2470 def GetJointList(*args):
2471 """GetJointList(self) -> b2Joint"""
2472 return _Box2D2.b2World_GetJointList(*args)
2473
2474 def Refilter(*args):
2475 """Refilter(self, b2Shape shape)"""
2476 return _Box2D2.b2World_Refilter(*args)
2477
2478 def SetWarmStarting(*args):
2479 """SetWarmStarting(self, bool flag)"""
2480 return _Box2D2.b2World_SetWarmStarting(*args)
2481
2482 def SetPositionCorrection(*args):
2483 """SetPositionCorrection(self, bool flag)"""
2484 return _Box2D2.b2World_SetPositionCorrection(*args)
2485
2486 def SetContinuousPhysics(*args):
2487 """SetContinuousPhysics(self, bool flag)"""
2488 return _Box2D2.b2World_SetContinuousPhysics(*args)
2489
2490 def Validate(*args):
2491 """Validate(self)"""
2492 return _Box2D2.b2World_Validate(*args)
2493
2494 def GetProxyCount(*args):
2495 """GetProxyCount(self) -> int32"""
2496 return _Box2D2.b2World_GetProxyCount(*args)
2497
2498 def GetPairCount(*args):
2499 """GetPairCount(self) -> int32"""
2500 return _Box2D2.b2World_GetPairCount(*args)
2501
2502 def GetBodyCount(*args):
2503 """GetBodyCount(self) -> int32"""
2504 return _Box2D2.b2World_GetBodyCount(*args)
2505
2506 def GetJointCount(*args):
2507 """GetJointCount(self) -> int32"""
2508 return _Box2D2.b2World_GetJointCount(*args)
2509
2510 def GetContactCount(*args):
2511 """GetContactCount(self) -> int32"""
2512 return _Box2D2.b2World_GetContactCount(*args)
2513
2514 def SetGravity(*args):
2515 """SetGravity(self, b2Vec2 gravity)"""
2516 return _Box2D2.b2World_SetGravity(*args)
2517
2518 def Query(*args):
2519 """
2520 Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32
2521 Query(self, b2AABB aabb, uint32 maxCount) -> PyObject
2522 """
2523 return _Box2D2.b2World_Query(*args)
2524
2525 b2World_swigregister = _Box2D2.b2World_swigregister
2526 b2World_swigregister(b2World)
2527
2528 class b2BodyDef(_object):
2529 """Proxy of C++ b2BodyDef class"""
2530 __swig_setmethods__ = {}
2531 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
2532 __swig_getmethods__ = {}
2533 __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
2534 __repr__ = _swig_repr
2535 def __init__(self, *args):
2536 """__init__(self) -> b2BodyDef"""
2537 this = _Box2D2.new_b2BodyDef(*args)
2538 try: self.this.append(this)
2539 except: self.this = this
2540 __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
2541 __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
2542 if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
2543 __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
2544 __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
2545 if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
2546 __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
2547 __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
2548 if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
2549 __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
2550 __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
2551 if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
2552 __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
2553 __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
2554 if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
2555 __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
2556 __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
2557 if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
2558 __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
2559 __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
2560 if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
2561 __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
2562 __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
2563 if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
2564 __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
2565 __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
2566 if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
2567 __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
2568 __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
2569 if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
2570 __swig_destroy__ = _Box2D2.delete_b2BodyDef
2571 __del__ = lambda self : None;
2572 b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
2573 b2BodyDef_swigregister(b2BodyDef)
2574
2575 class b2Body(_object):
2576 """Proxy of C++ b2Body class"""
2577 __swig_setmethods__ = {}
2578 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
2579 __swig_getmethods__ = {}
2580 __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
2581 def __init__(self): raise AttributeError, "No constructor defined"
2582 __repr__ = _swig_repr
2583 def CreateShape(*args):
2584 """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
2585 return _Box2D2.b2Body_CreateShape(*args)
2586
2587 def DestroyShape(*args):
2588 """DestroyShape(self, b2Shape shape)"""
2589 return _Box2D2.b2Body_DestroyShape(*args)
2590
2591 def SetMass(*args):
2592 """SetMass(self, b2MassData massData)"""
2593 return _Box2D2.b2Body_SetMass(*args)
2594
2595 def SetMassFromShapes(*args):
2596 """SetMassFromShapes(self)"""
2597 return _Box2D2.b2Body_SetMassFromShapes(*args)
2598
2599 def SetXForm(*args):
2600 """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
2601 return _Box2D2.b2Body_SetXForm(*args)
2602
2603 def GetXForm(*args):
2604 """GetXForm(self) -> b2XForm"""
2605 return _Box2D2.b2Body_GetXForm(*args)
2606
2607 def GetPosition(*args):
2608 """GetPosition(self) -> b2Vec2"""
2609 return _Box2D2.b2Body_GetPosition(*args)
2610
2611 def GetAngle(*args):
2612 """GetAngle(self) -> float32"""
2613 return _Box2D2.b2Body_GetAngle(*args)
2614
2615 def GetWorldCenter(*args):
2616 """GetWorldCenter(self) -> b2Vec2"""
2617 return _Box2D2.b2Body_GetWorldCenter(*args)
2618
2619 def GetLocalCenter(*args):
2620 """GetLocalCenter(self) -> b2Vec2"""
2621 return _Box2D2.b2Body_GetLocalCenter(*args)
2622
2623 def SetLinearVelocity(*args):
2624 """SetLinearVelocity(self, b2Vec2 v)"""
2625 return _Box2D2.b2Body_SetLinearVelocity(*args)
2626
2627 def GetLinearVelocity(*args):
2628 """GetLinearVelocity(self) -> b2Vec2"""
2629 return _Box2D2.b2Body_GetLinearVelocity(*args)
2630
2631 def SetAngularVelocity(*args):
2632 """SetAngularVelocity(self, float32 omega)"""
2633 return _Box2D2.b2Body_SetAngularVelocity(*args)
2634
2635 def GetAngularVelocity(*args):
2636 """GetAngularVelocity(self) -> float32"""
2637 return _Box2D2.b2Body_GetAngularVelocity(*args)
2638
2639 def ApplyForce(*args):
2640 """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
2641 return _Box2D2.b2Body_ApplyForce(*args)
2642
2643 def ApplyTorque(*args):
2644 """ApplyTorque(self, float32 torque)"""
2645 return _Box2D2.b2Body_ApplyTorque(*args)
2646
2647 def ApplyImpulse(*args):
2648 """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
2649 return _Box2D2.b2Body_ApplyImpulse(*args)
2650
2651 def GetMass(*args):
2652 """GetMass(self) -> float32"""
2653 return _Box2D2.b2Body_GetMass(*args)
2654
2655 def GetInertia(*args):
2656 """GetInertia(self) -> float32"""
2657 return _Box2D2.b2Body_GetInertia(*args)
2658
2659 def GetWorldPoint(*args):
2660 """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
2661 return _Box2D2.b2Body_GetWorldPoint(*args)
2662
2663 def GetWorldVector(*args):
2664 """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
2665 return _Box2D2.b2Body_GetWorldVector(*args)
2666
2667 def GetLocalPoint(*args):
2668 """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
2669 return _Box2D2.b2Body_GetLocalPoint(*args)
2670
2671 def GetLocalVector(*args):
2672 """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
2673 return _Box2D2.b2Body_GetLocalVector(*args)
2674
2675 def GetLinearVelocityFromWorldPoint(*args):
2676 """GetLinearVelocityFromWorldPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
2677 return _Box2D2.b2Body_GetLinearVelocityFromWorldPoint(*args)
2678
2679 def GetLinearVelocityFromLocalPoint(*args):
2680 """GetLinearVelocityFromLocalPoint(self, b2Vec2 localPoint) -> b2Vec2"""
2681 return _Box2D2.b2Body_GetLinearVelocityFromLocalPoint(*args)
2682
2683 def IsBullet(*args):
2684 """IsBullet(self) -> bool"""
2685 return _Box2D2.b2Body_IsBullet(*args)
2686
2687 def SetBullet(*args):
2688 """SetBullet(self, bool flag)"""
2689 return _Box2D2.b2Body_SetBullet(*args)
2690
2691 def IsStatic(*args):
2692 """IsStatic(self) -> bool"""
2693 return _Box2D2.b2Body_IsStatic(*args)
2694
2695 def IsDynamic(*args):
2696 """IsDynamic(self) -> bool"""
2697 return _Box2D2.b2Body_IsDynamic(*args)
2698
2699 def IsFrozen(*args):
2700 """IsFrozen(self) -> bool"""
2701 return _Box2D2.b2Body_IsFrozen(*args)
2702
2703 def IsSleeping(*args):
2704 """IsSleeping(self) -> bool"""
2705 return _Box2D2.b2Body_IsSleeping(*args)
2706
2707 def AllowSleeping(*args):
2708 """AllowSleeping(self, bool flag)"""
2709 return _Box2D2.b2Body_AllowSleeping(*args)
2710
2711 def WakeUp(*args):
2712 """WakeUp(self)"""
2713 return _Box2D2.b2Body_WakeUp(*args)
2714
2715 def PutToSleep(*args):
2716 """PutToSleep(self)"""
2717 return _Box2D2.b2Body_PutToSleep(*args)
2718
2719 def GetShapeList(*args):
2720 """GetShapeList(self) -> b2Shape"""
2721 return _Box2D2.b2Body_GetShapeList(*args)
2722
2723 def GetJointList(*args):
2724 """GetJointList(self) -> b2JointEdge"""
2725 return _Box2D2.b2Body_GetJointList(*args)
2726
2727 def GetNext(*args):
2728 """GetNext(self) -> b2Body"""
2729 return _Box2D2.b2Body_GetNext(*args)
2730
2731 def GetUserData(self): # override the C++ version as it does not work.
2732 """Get the specified userData (m_userData)"""
2733 return self.pyGetUserData()
2734
2735
2736 def SetUserData(*args):
2737 """SetUserData(self, void data)"""
2738 return _Box2D2.b2Body_SetUserData(*args)
2739
2740 def GetWorld(*args):
2741 """GetWorld(self) -> b2World"""
2742 return _Box2D2.b2Body_GetWorld(*args)
2743
2744 def __repr__(self):
2745 return "b2Body(Position: %s)" % (self.GetPosition())
2746
2747 def pyGetUserData(*args):
2748 """pyGetUserData(self) -> PyObject"""
2749 return _Box2D2.b2Body_pyGetUserData(*args)
2750
2751 b2Body_swigregister = _Box2D2.b2Body_swigregister
2752 b2Body_swigregister(b2Body)
2753
2754 class b2DistanceJointDef(b2JointDef):
2755 """Proxy of C++ b2DistanceJointDef class"""
2756 __swig_setmethods__ = {}
2757 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2758 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
2759 __swig_getmethods__ = {}
2760 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2761 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
2762 __repr__ = _swig_repr
2763 def __init__(self, *args):
2764 """__init__(self) -> b2DistanceJointDef"""
2765 this = _Box2D2.new_b2DistanceJointDef(*args)
2766 try: self.this.append(this)
2767 except: self.this = this
2768 def Initialize(*args):
2769 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
2770 return _Box2D2.b2DistanceJointDef_Initialize(*args)
2771
2772 __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
2773 __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
2774 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
2775 __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
2776 __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
2777 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
2778 __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
2779 __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
2780 if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
2781 __swig_setmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_set
2782 __swig_getmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_get
2783 if _newclass:frequencyHz = _swig_property(_Box2D2.b2DistanceJointDef_frequencyHz_get, _Box2D2.b2DistanceJointDef_frequencyHz_set)
2784 __swig_setmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_set
2785 __swig_getmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_get
2786 if _newclass:dampingRatio = _swig_property(_Box2D2.b2DistanceJointDef_dampingRatio_get, _Box2D2.b2DistanceJointDef_dampingRatio_set)
2787 __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
2788 __del__ = lambda self : None;
2789 b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
2790 b2DistanceJointDef_swigregister(b2DistanceJointDef)
2791
2792 class b2DistanceJoint(b2Joint):
2793 """Proxy of C++ b2DistanceJoint class"""
2794 __swig_setmethods__ = {}
2795 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2796 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
2797 __swig_getmethods__ = {}
2798 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2799 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
2800 __repr__ = _swig_repr
2801 def GetAnchor1(*args):
2802 """GetAnchor1(self) -> b2Vec2"""
2803 return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
2804
2805 def GetAnchor2(*args):
2806 """GetAnchor2(self) -> b2Vec2"""
2807 return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
2808
2809 def GetReactionForce(*args):
2810 """GetReactionForce(self) -> b2Vec2"""
2811 return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
2812
2813 def GetReactionTorque(*args):
2814 """GetReactionTorque(self) -> float32"""
2815 return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
2816
2817 def __init__(self, *args):
2818 """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
2819 this = _Box2D2.new_b2DistanceJoint(*args)
2820 try: self.this.append(this)
2821 except: self.this = this
2822 def InitVelocityConstraints(*args):
2823 """InitVelocityConstraints(self, b2TimeStep step)"""
2824 return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
2825
2826 def SolveVelocityConstraints(*args):
2827 """SolveVelocityConstraints(self, b2TimeStep step)"""
2828 return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
2829
2830 def SolvePositionConstraints(*args):
2831 """SolvePositionConstraints(self) -> bool"""
2832 return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
2833
2834 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
2835 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
2836 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
2837 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
2838 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
2839 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
2840 __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
2841 __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
2842 if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
2843 __swig_setmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_set
2844 __swig_getmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_get
2845 if _newclass:m_frequencyHz = _swig_property(_Box2D2.b2DistanceJoint_m_frequencyHz_get, _Box2D2.b2DistanceJoint_m_frequencyHz_set)
2846 __swig_setmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_set
2847 __swig_getmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_get
2848 if _newclass:m_dampingRatio = _swig_property(_Box2D2.b2DistanceJoint_m_dampingRatio_get, _Box2D2.b2DistanceJoint_m_dampingRatio_set)
2849 __swig_setmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_set
2850 __swig_getmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_get
2851 if _newclass:m_gamma = _swig_property(_Box2D2.b2DistanceJoint_m_gamma_get, _Box2D2.b2DistanceJoint_m_gamma_set)
2852 __swig_setmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_set
2853 __swig_getmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_get
2854 if _newclass:m_bias = _swig_property(_Box2D2.b2DistanceJoint_m_bias_get, _Box2D2.b2DistanceJoint_m_bias_set)
2855 __swig_setmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_set
2856 __swig_getmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_get
2857 if _newclass:m_impulse = _swig_property(_Box2D2.b2DistanceJoint_m_impulse_get, _Box2D2.b2DistanceJoint_m_impulse_set)
2858 __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
2859 __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
2860 if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
2861 __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
2862 __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
2863 if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
2864 def __repr__(self):
2865 return b2JointInfo(self)
2866
2867 __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
2868 __del__ = lambda self : None;
2869 b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
2870 b2DistanceJoint_swigregister(b2DistanceJoint)
2871
2872 class b2MouseJointDef(b2JointDef):
2873 """Proxy of C++ b2MouseJointDef class"""
2874 __swig_setmethods__ = {}
2875 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2876 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
2877 __swig_getmethods__ = {}
2878 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2879 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
2880 __repr__ = _swig_repr
2881 def __init__(self, *args):
2882 """__init__(self) -> b2MouseJointDef"""
2883 this = _Box2D2.new_b2MouseJointDef(*args)
2884 try: self.this.append(this)
2885 except: self.this = this
2886 __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
2887 __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
2888 if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
2889 __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
2890 __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
2891 if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
2892 __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
2893 __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
2894 if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
2895 __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
2896 __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
2897 if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
2898 __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
2899 __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
2900 if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
2901 __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
2902 __del__ = lambda self : None;
2903 b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
2904 b2MouseJointDef_swigregister(b2MouseJointDef)
2905
2906 class b2MouseJoint(b2Joint):
2907 """Proxy of C++ b2MouseJoint class"""
2908 __swig_setmethods__ = {}
2909 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2910 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
2911 __swig_getmethods__ = {}
2912 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2913 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
2914 __repr__ = _swig_repr
2915 def GetAnchor1(*args):
2916 """GetAnchor1(self) -> b2Vec2"""
2917 return _Box2D2.b2MouseJoint_GetAnchor1(*args)
2918
2919 def GetAnchor2(*args):
2920 """GetAnchor2(self) -> b2Vec2"""
2921 return _Box2D2.b2MouseJoint_GetAnchor2(*args)
2922
2923 def GetReactionForce(*args):
2924 """GetReactionForce(self) -> b2Vec2"""
2925 return _Box2D2.b2MouseJoint_GetReactionForce(*args)
2926
2927 def GetReactionTorque(*args):
2928 """GetReactionTorque(self) -> float32"""
2929 return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
2930
2931 def SetTarget(*args):
2932 """SetTarget(self, b2Vec2 target)"""
2933 return _Box2D2.b2MouseJoint_SetTarget(*args)
2934
2935 def __init__(self, *args):
2936 """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
2937 this = _Box2D2.new_b2MouseJoint(*args)
2938 try: self.this.append(this)
2939 except: self.this = this
2940 def InitVelocityConstraints(*args):
2941 """InitVelocityConstraints(self, b2TimeStep step)"""
2942 return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
2943
2944 def SolveVelocityConstraints(*args):
2945 """SolveVelocityConstraints(self, b2TimeStep step)"""
2946 return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
2947
2948 def SolvePositionConstraints(*args):
2949 """SolvePositionConstraints(self) -> bool"""
2950 return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
2951
2952 __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
2953 __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
2954 if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
2955 __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
2956 __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
2957 if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
2958 __swig_setmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_set
2959 __swig_getmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_get
2960 if _newclass:m_impulse = _swig_property(_Box2D2.b2MouseJoint_m_impulse_get, _Box2D2.b2MouseJoint_m_impulse_set)
2961 __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
2962 __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
2963 if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
2964 __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
2965 __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
2966 if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
2967 __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
2968 __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
2969 if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
2970 __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
2971 __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
2972 if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
2973 __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
2974 __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
2975 if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
2976 def __repr__(self):
2977 return b2JointInfo(self)
2978
2979 __swig_destroy__ = _Box2D2.delete_b2MouseJoint
2980 __del__ = lambda self : None;
2981 b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
2982 b2MouseJoint_swigregister(b2MouseJoint)
2983
2984 class b2PrismaticJointDef(b2JointDef):
2985 """Proxy of C++ b2PrismaticJointDef class"""
2986 __swig_setmethods__ = {}
2987 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2988 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
2989 __swig_getmethods__ = {}
2990 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2991 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
2992 __repr__ = _swig_repr
2993 def __init__(self, *args):
2994 """__init__(self) -> b2PrismaticJointDef"""
2995 this = _Box2D2.new_b2PrismaticJointDef(*args)
2996 try: self.this.append(this)
2997 except: self.this = this
2998 def Initialize(*args):
2999 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
3000 return _Box2D2.b2PrismaticJointDef_Initialize(*args)
3001
3002 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
3003 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
3004 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
3005 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
3006 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
3007 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
3008 __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
3009 __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
3010 if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
3011 __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
3012 __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
3013 if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
3014 __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
3015 __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
3016 if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
3017 __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
3018 __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
3019 if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
3020 __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
3021 __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
3022 if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
3023 __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
3024 __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
3025 if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
3026 __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
3027 __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
3028 if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
3029 __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
3030 __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
3031 if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
3032 __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
3033 __del__ = lambda self : None;
3034 b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
3035 b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
3036
3037 class b2PrismaticJoint(b2Joint):
3038 """Proxy of C++ b2PrismaticJoint class"""
3039 __swig_setmethods__ = {}
3040 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3041 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
3042 __swig_getmethods__ = {}
3043 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3044 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
3045 __repr__ = _swig_repr
3046 def GetAnchor1(*args):
3047 """GetAnchor1(self) -> b2Vec2"""
3048 return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
3049
3050 def GetAnchor2(*args):
3051 """GetAnchor2(self) -> b2Vec2"""
3052 return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
3053
3054 def GetReactionForce(*args):
3055 """GetReactionForce(self) -> b2Vec2"""
3056 return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
3057
3058 def GetReactionTorque(*args):
3059 """GetReactionTorque(self) -> float32"""
3060 return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
3061
3062 def GetJointTranslation(*args):
3063 """GetJointTranslation(self) -> float32"""
3064 return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
3065
3066 def GetJointSpeed(*args):
3067 """GetJointSpeed(self) -> float32"""
3068 return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
3069
3070 def IsLimitEnabled(*args):
3071 """IsLimitEnabled(self) -> bool"""
3072 return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
3073
3074 def EnableLimit(*args):
3075 """EnableLimit(self, bool flag)"""
3076 return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
3077
3078 def GetLowerLimit(*args):
3079 """GetLowerLimit(self) -> float32"""
3080 return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
3081
3082 def GetUpperLimit(*args):
3083 """GetUpperLimit(self) -> float32"""
3084 return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
3085
3086 def SetLimits(*args):
3087 """SetLimits(self, float32 lower, float32 upper)"""
3088 return _Box2D2.b2PrismaticJoint_SetLimits(*args)
3089
3090 def IsMotorEnabled(*args):
3091 """IsMotorEnabled(self) -> bool"""
3092 return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
3093
3094 def EnableMotor(*args):
3095 """EnableMotor(self, bool flag)"""
3096 return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
3097
3098 def SetMotorSpeed(*args):
3099 """SetMotorSpeed(self, float32 speed)"""
3100 return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
3101
3102 def GetMotorSpeed(*args):
3103 """GetMotorSpeed(self) -> float32"""
3104 return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
3105
3106 def SetMaxMotorForce(*args):
3107 """SetMaxMotorForce(self, float32 force)"""
3108 return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
3109
3110 def GetMotorForce(*args):
3111 """GetMotorForce(self) -> float32"""
3112 return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
3113
3114 def __init__(self, *args):
3115 """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
3116 this = _Box2D2.new_b2PrismaticJoint(*args)
3117 try: self.this.append(this)
3118 except: self.this = this
3119 def InitVelocityConstraints(*args):
3120 """InitVelocityConstraints(self, b2TimeStep step)"""
3121 return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
3122
3123 def SolveVelocityConstraints(*args):
3124 """SolveVelocityConstraints(self, b2TimeStep step)"""
3125 return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
3126
3127 def SolvePositionConstraints(*args):
3128 """SolvePositionConstraints(self) -> bool"""
3129 return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
3130
3131 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
3132 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
3133 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
3134 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
3135 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
3136 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
3137 __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
3138 __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
3139 if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
3140 __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
3141 __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
3142 if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
3143 __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
3144 __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
3145 if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
3146 __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
3147 __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
3148 if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
3149 __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
3150 __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
3151 if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
3152 __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
3153 __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
3154 if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
3155 __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
3156 __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
3157 if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
3158 __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
3159 __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
3160 if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
3161 __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
3162 __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
3163 if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
3164 __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
3165 __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
3166 if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
3167 __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
3168 __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
3169 if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
3170 __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
3171 __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
3172 if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
3173 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
3174 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
3175 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
3176 __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
3177 __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
3178 if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
3179 __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
3180 __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
3181 if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
3182 __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
3183 __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
3184 if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
3185 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
3186 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
3187 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
3188 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
3189 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
3190 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
3191 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
3192 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
3193 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
3194 __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
3195 __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
3196 if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
3197 def __repr__(self):
3198 return b2JointInfo(self)
3199
3200 __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
3201 __del__ = lambda self : None;
3202 b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
3203 b2PrismaticJoint_swigregister(b2PrismaticJoint)
3204
3205 class b2RevoluteJointDef(b2JointDef):
3206 """Proxy of C++ b2RevoluteJointDef class"""
3207 __swig_setmethods__ = {}
3208 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3209 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
3210 __swig_getmethods__ = {}
3211 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3212 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
3213 __repr__ = _swig_repr
3214 def __init__(self, *args):
3215 """__init__(self) -> b2RevoluteJointDef"""
3216 this = _Box2D2.new_b2RevoluteJointDef(*args)
3217 try: self.this.append(this)
3218 except: self.this = this
3219 def Initialize(*args):
3220 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
3221 return _Box2D2.b2RevoluteJointDef_Initialize(*args)
3222
3223 __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
3224 __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
3225 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
3226 __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
3227 __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
3228 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
3229 __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
3230 __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
3231 if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
3232 __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
3233 __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
3234 if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
3235 __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
3236 __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
3237 if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
3238 __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
3239 __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
3240 if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
3241 __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
3242 __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
3243 if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
3244 __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
3245 __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
3246 if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
3247 __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
3248 __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
3249 if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
3250 __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
3251 __del__ = lambda self : None;
3252 b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
3253 b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
3254
3255 class b2RevoluteJoint(b2Joint):
3256 """Proxy of C++ b2RevoluteJoint class"""
3257 __swig_setmethods__ = {}
3258 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3259 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
3260 __swig_getmethods__ = {}
3261 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3262 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
3263 __repr__ = _swig_repr
3264 def GetAnchor1(*args):
3265 """GetAnchor1(self) -> b2Vec2"""
3266 return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
3267
3268 def GetAnchor2(*args):
3269 """GetAnchor2(self) -> b2Vec2"""
3270 return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
3271
3272 def GetReactionForce(*args):
3273 """GetReactionForce(self) -> b2Vec2"""
3274 return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
3275
3276 def GetReactionTorque(*args):
3277 """GetReactionTorque(self) -> float32"""
3278 return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
3279
3280 def GetJointAngle(*args):
3281 """GetJointAngle(self) -> float32"""
3282 return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
3283
3284 def GetJointSpeed(*args):
3285 """GetJointSpeed(self) -> float32"""
3286 return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
3287
3288 def IsLimitEnabled(*args):
3289 """IsLimitEnabled(self) -> bool"""
3290 return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
3291
3292 def EnableLimit(*args):
3293 """EnableLimit(self, bool flag)"""
3294 return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
3295
3296 def GetLowerLimit(*args):
3297 """GetLowerLimit(self) -> float32"""
3298 return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
3299
3300 def GetUpperLimit(*args):
3301 """GetUpperLimit(self) -> float32"""
3302 return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
3303
3304 def SetLimits(*args):
3305 """SetLimits(self, float32 lower, float32 upper)"""
3306 return _Box2D2.b2RevoluteJoint_SetLimits(*args)
3307
3308 def IsMotorEnabled(*args):
3309 """IsMotorEnabled(self) -> bool"""
3310 return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
3311
3312 def EnableMotor(*args):
3313 """EnableMotor(self, bool flag)"""
3314 return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
3315
3316 def SetMotorSpeed(*args):
3317 """SetMotorSpeed(self, float32 speed)"""
3318 return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
3319
3320 def GetMotorSpeed(*args):
3321 """GetMotorSpeed(self) -> float32"""
3322 return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
3323
3324 def SetMaxMotorTorque(*args):
3325 """SetMaxMotorTorque(self, float32 torque)"""
3326 return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
3327
3328 def GetMotorTorque(*args):
3329 """GetMotorTorque(self) -> float32"""
3330 return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
3331
3332 def __init__(self, *args):
3333 """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
3334 this = _Box2D2.new_b2RevoluteJoint(*args)
3335 try: self.this.append(this)
3336 except: self.this = this
3337 def InitVelocityConstraints(*args):
3338 """InitVelocityConstraints(self, b2TimeStep step)"""
3339 return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
3340
3341 def SolveVelocityConstraints(*args):
3342 """SolveVelocityConstraints(self, b2TimeStep step)"""
3343 return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
3344
3345 def SolvePositionConstraints(*args):
3346 """SolvePositionConstraints(self) -> bool"""
3347 return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
3348
3349 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
3350 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
3351 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
3352 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
3353 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
3354 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
3355 __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
3356 __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
3357 if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
3358 __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
3359 __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
3360 if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
3361 __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
3362 __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
3363 if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
3364 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
3365 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
3366 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
3367 __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
3368 __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
3369 if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
3370 __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
3371 __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
3372 if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
3373 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
3374 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
3375 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
3376 __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
3377 __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
3378 if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
3379 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
3380 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
3381 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
3382 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
3383 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
3384 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
3385 __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
3386 __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
3387 if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
3388 __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
3389 __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
3390 if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
3391 __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
3392 __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
3393 if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
3394 __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
3395 __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
3396 if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
3397 def __repr__(self):
3398 return b2JointInfo(self)
3399
3400 __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
3401 __del__ = lambda self : None;
3402 b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
3403 b2RevoluteJoint_swigregister(b2RevoluteJoint)
3404
3405 class b2PulleyJointDef(b2JointDef):
3406 """Proxy of C++ b2PulleyJointDef class"""
3407 __swig_setmethods__ = {}
3408 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3409 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
3410 __swig_getmethods__ = {}
3411 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3412 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
3413 __repr__ = _swig_repr
3414 def __init__(self, *args):
3415 """__init__(self) -> b2PulleyJointDef"""
3416 this = _Box2D2.new_b2PulleyJointDef(*args)
3417 try: self.this.append(this)
3418 except: self.this = this
3419 def Initialize(*args):
3420 """
3421 Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
3422 b2Vec2 anchor1, b2Vec2 anchor2,
3423 float32 ratio)
3424 """
3425 return _Box2D2.b2PulleyJointDef_Initialize(*args)
3426
3427 __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
3428 __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
3429 if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
3430 __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
3431 __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
3432 if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
3433 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
3434 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
3435 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
3436 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
3437 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
3438 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
3439 __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
3440 __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
3441 if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
3442 __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
3443 __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
3444 if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
3445 __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
3446 __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
3447 if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
3448 __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
3449 __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
3450 if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
3451 __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
3452 __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
3453 if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
3454 __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
3455 __del__ = lambda self : None;
3456 b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
3457 b2PulleyJointDef_swigregister(b2PulleyJointDef)
3458 b2_minPulleyLength = cvar.b2_minPulleyLength
3459
3460 class b2PulleyJoint(b2Joint):
3461 """Proxy of C++ b2PulleyJoint class"""
3462 __swig_setmethods__ = {}
3463 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3464 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
3465 __swig_getmethods__ = {}
3466 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3467 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
3468 __repr__ = _swig_repr
3469 def GetAnchor1(*args):
3470 """GetAnchor1(self) -> b2Vec2"""
3471 return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
3472
3473 def GetAnchor2(*args):
3474 """GetAnchor2(self) -> b2Vec2"""
3475 return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
3476
3477 def GetReactionForce(*args):
3478 """GetReactionForce(self) -> b2Vec2"""
3479 return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
3480
3481 def GetReactionTorque(*args):
3482 """GetReactionTorque(self) -> float32"""
3483 return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
3484
3485 def GetGroundAnchor1(*args):
3486 """GetGroundAnchor1(self) -> b2Vec2"""
3487 return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
3488
3489 def GetGroundAnchor2(*args):
3490 """GetGroundAnchor2(self) -> b2Vec2"""
3491 return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
3492
3493 def GetLength1(*args):
3494 """GetLength1(self) -> float32"""
3495 return _Box2D2.b2PulleyJoint_GetLength1(*args)
3496
3497 def GetLength2(*args):
3498 """GetLength2(self) -> float32"""
3499 return _Box2D2.b2PulleyJoint_GetLength2(*args)
3500
3501 def GetRatio(*args):
3502 """GetRatio(self) -> float32"""
3503 return _Box2D2.b2PulleyJoint_GetRatio(*args)
3504
3505 def __init__(self, *args):
3506 """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
3507 this = _Box2D2.new_b2PulleyJoint(*args)
3508 try: self.this.append(this)
3509 except: self.this = this
3510 def InitVelocityConstraints(*args):
3511 """InitVelocityConstraints(self, b2TimeStep step)"""
3512 return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
3513
3514 def SolveVelocityConstraints(*args):
3515 """SolveVelocityConstraints(self, b2TimeStep step)"""
3516 return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
3517
3518 def SolvePositionConstraints(*args):
3519 """SolvePositionConstraints(self) -> bool"""
3520 return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
3521
3522 __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
3523 __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
3524 if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
3525 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
3526 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
3527 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
3528 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
3529 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
3530 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
3531 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
3532 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
3533 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
3534 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
3535 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
3536 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
3537 __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
3538 __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
3539 if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
3540 __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
3541 __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
3542 if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
3543 __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
3544 __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
3545 if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
3546 __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
3547 __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
3548 if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
3549 __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
3550 __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
3551 if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
3552 __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
3553 __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
3554 if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
3555 __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
3556 __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
3557 if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
3558 __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
3559 __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
3560 if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
3561 __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
3562 __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
3563 if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
3564 __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
3565 __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
3566 if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
3567 __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
3568 __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
3569 if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
3570 __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
3571 __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
3572 if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
3573 __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
3574 __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
3575 if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
3576 __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
3577 __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
3578 if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
3579 __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
3580 __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
3581 if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
3582 __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
3583 __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
3584 if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
3585 __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
3586 __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
3587 if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
3588 __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
3589 __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
3590 if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
3591 def __repr__(self):
3592 return b2JointInfo(self)
3593
3594 __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
3595 __del__ = lambda self : None;
3596 b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
3597 b2PulleyJoint_swigregister(b2PulleyJoint)
3598
3599 class b2GearJointDef(b2JointDef):
3600 """Proxy of C++ b2GearJointDef class"""
3601 __swig_setmethods__ = {}
3602 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3603 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
3604 __swig_getmethods__ = {}
3605 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3606 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
3607 __repr__ = _swig_repr
3608 def __init__(self, *args):
3609 """__init__(self) -> b2GearJointDef"""
3610 this = _Box2D2.new_b2GearJointDef(*args)
3611 try: self.this.append(this)
3612 except: self.this = this
3613 __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
3614 __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
3615 if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
3616 __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
3617 __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
3618 if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
3619 __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
3620 __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
3621 if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
3622 __swig_destroy__ = _Box2D2.delete_b2GearJointDef
3623 __del__ = lambda self : None;
3624 b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
3625 b2GearJointDef_swigregister(b2GearJointDef)
3626
3627 class b2GearJoint(b2Joint):
3628 """Proxy of C++ b2GearJoint class"""
3629 __swig_setmethods__ = {}
3630 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3631 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
3632 __swig_getmethods__ = {}
3633 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3634 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
3635 __repr__ = _swig_repr
3636 def GetAnchor1(*args):
3637 """GetAnchor1(self) -> b2Vec2"""
3638 return _Box2D2.b2GearJoint_GetAnchor1(*args)
3639
3640 def GetAnchor2(*args):
3641 """GetAnchor2(self) -> b2Vec2"""
3642 return _Box2D2.b2GearJoint_GetAnchor2(*args)
3643
3644 def GetReactionForce(*args):
3645 """GetReactionForce(self) -> b2Vec2"""
3646 return _Box2D2.b2GearJoint_GetReactionForce(*args)
3647
3648 def GetReactionTorque(*args):
3649 """GetReactionTorque(self) -> float32"""
3650 return _Box2D2.b2GearJoint_GetReactionTorque(*args)
3651
3652 def GetRatio(*args):
3653 """GetRatio(self) -> float32"""
3654 return _Box2D2.b2GearJoint_GetRatio(*args)
3655
3656 def __init__(self, *args):
3657 """__init__(self, b2GearJointDef data) -> b2GearJoint"""
3658 this = _Box2D2.new_b2GearJoint(*args)
3659 try: self.this.append(this)
3660 except: self.this = this
3661 def InitVelocityConstraints(*args):
3662 """InitVelocityConstraints(self, b2TimeStep step)"""
3663 return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
3664
3665 def SolveVelocityConstraints(*args):
3666 """SolveVelocityConstraints(self, b2TimeStep step)"""
3667 return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
3668
3669 def SolvePositionConstraints(*args):
3670 """SolvePositionConstraints(self) -> bool"""
3671 return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
3672
3673 __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
3674 __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
3675 if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
3676 __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
3677 __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
3678 if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
3679 __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
3680 __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
3681 if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
3682 __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
3683 __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
3684 if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
3685 __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
3686 __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
3687 if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
3688 __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
3689 __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
3690 if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
3691 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
3692 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
3693 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
3694 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
3695 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
3696 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
3697 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
3698 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
3699 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
3700 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
3701 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
3702 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
3703 __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
3704 __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
3705 if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
3706 __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
3707 __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
3708 if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
3709 __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
3710 __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
3711 if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
3712 __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
3713 __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
3714 if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
3715 __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
3716 __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
3717 if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
3718 def __repr__(self):
3719 return b2JointInfo(self)
3720
3721 __swig_destroy__ = _Box2D2.delete_b2GearJoint
3722 __del__ = lambda self : None;
3723 b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
3724 b2GearJoint_swigregister(b2GearJoint)
3725
3726
3727
0 # This file was automatically generated by SWIG (http://www.swig.org).
1 # Version 1.3.31
2 #
3 # Don't modify this file, modify the SWIG interface instead.
4 # This file is compatible with both classic and new-style classes.
5
6 import _Box2D2
7 import new
8 new_instancemethod = new.instancemethod
9 try:
10 _swig_property = property
11 except NameError:
12 pass # Python < 2.2 doesn't have 'property'.
13 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14 if (name == "thisown"): return self.this.own(value)
15 if (name == "this"):
16 if type(value).__name__ == 'PySwigObject':
17 self.__dict__[name] = value
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
25
26 def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29 def _swig_getattr(self,class_type,name):
30 if (name == "thisown"): return self.this.own()
31 method = class_type.__swig_getmethods__.get(name,None)
32 if method: return method(self)
33 raise AttributeError,name
34
35 def _swig_repr(self):
36 try: strthis = "proxy of " + self.this.__repr__()
37 except: strthis = ""
38 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
39
40 import types
41 try:
42 _object = types.ObjectType
43 _newclass = 1
44 except AttributeError:
45 class _object : pass
46 _newclass = 0
47 del types
48
49
50 try:
51 import weakref
52 weakref_proxy = weakref.proxy
53 except:
54 weakref_proxy = lambda x: x
55
56
57
58 def b2Alloc(*args):
59 """b2Alloc(int32 size) -> void"""
60 return _Box2D2.b2Alloc(*args)
61
62 def b2Free(*args):
63 """b2Free(void mem)"""
64 return _Box2D2.b2Free(*args)
65 class b2Version(_object):
66 """Proxy of C++ b2Version class"""
67 __swig_setmethods__ = {}
68 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
69 __swig_getmethods__ = {}
70 __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
71 __repr__ = _swig_repr
72 __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
73 __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
74 if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
75 __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
76 __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
77 if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
78 __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
79 __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
80 if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
81 def __init__(self, *args):
82 """__init__(self) -> b2Version"""
83 this = _Box2D2.new_b2Version(*args)
84 try: self.this.append(this)
85 except: self.this = this
86 __swig_destroy__ = _Box2D2.delete_b2Version
87 __del__ = lambda self : None;
88 b2Version_swigregister = _Box2D2.b2Version_swigregister
89 b2Version_swigregister(b2Version)
90 cvar = _Box2D2.cvar
91 b2_pi = cvar.b2_pi
92 b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
93 b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
94 b2_maxProxies = cvar.b2_maxProxies
95 b2_maxPairs = cvar.b2_maxPairs
96 b2_linearSlop = cvar.b2_linearSlop
97 b2_angularSlop = cvar.b2_angularSlop
98 b2_toiSlop = cvar.b2_toiSlop
99 b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
100 b2_velocityThreshold = cvar.b2_velocityThreshold
101 b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
102 b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
103 b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
104 b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
105 b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
106 b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
107 b2_contactBaumgarte = cvar.b2_contactBaumgarte
108 b2_timeToSleep = cvar.b2_timeToSleep
109 b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
110 b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
111
112
113 def b2MixFriction(*args):
114 """b2MixFriction(float32 friction1, float32 friction2) -> float32"""
115 return _Box2D2.b2MixFriction(*args)
116
117 def b2MixRestitution(*args):
118 """b2MixRestitution(float32 restitution1, float32 restitution2) -> float32"""
119 return _Box2D2.b2MixRestitution(*args)
120
121 def b2IsValid(*args):
122 """b2IsValid(float32 x) -> bool"""
123 return _Box2D2.b2IsValid(*args)
124
125 def b2InvSqrt(*args):
126 """b2InvSqrt(float32 x) -> float32"""
127 return _Box2D2.b2InvSqrt(*args)
128 class b2Vec2(_object):
129 """Proxy of C++ b2Vec2 class"""
130 __swig_setmethods__ = {}
131 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
132 __swig_getmethods__ = {}
133 __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
134 __repr__ = _swig_repr
135 def __init__(self, *args):
136 """
137 __init__(self) -> b2Vec2
138 __init__(self, float32 x, float32 y) -> b2Vec2
139 """
140 this = _Box2D2.new_b2Vec2(*args)
141 try: self.this.append(this)
142 except: self.this = this
143 def SetZero(*args):
144 """SetZero(self)"""
145 return _Box2D2.b2Vec2_SetZero(*args)
146
147 def Set(*args):
148 """Set(self, float32 x_, float32 y_)"""
149 return _Box2D2.b2Vec2_Set(*args)
150
151 def __neg__(*args):
152 """__neg__(self) -> b2Vec2"""
153 return _Box2D2.b2Vec2___neg__(*args)
154
155 def add_vector(*args):
156 """add_vector(self, b2Vec2 v)"""
157 return _Box2D2.b2Vec2_add_vector(*args)
158
159 def sub_vector(*args):
160 """sub_vector(self, b2Vec2 v)"""
161 return _Box2D2.b2Vec2_sub_vector(*args)
162
163 def mul_float(*args):
164 """mul_float(self, float32 a)"""
165 return _Box2D2.b2Vec2_mul_float(*args)
166
167 def Length(*args):
168 """Length(self) -> float32"""
169 return _Box2D2.b2Vec2_Length(*args)
170
171 def LengthSquared(*args):
172 """LengthSquared(self) -> float32"""
173 return _Box2D2.b2Vec2_LengthSquared(*args)
174
175 def Normalize(*args):
176 """Normalize(self) -> float32"""
177 return _Box2D2.b2Vec2_Normalize(*args)
178
179 def IsValid(*args):
180 """IsValid(self) -> bool"""
181 return _Box2D2.b2Vec2_IsValid(*args)
182
183 __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
184 __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
185 if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
186 __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
187 __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
188 if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
189 def __repr__(self):
190 return "b2Vec2(%g,%g)" % (self.x, self.y)
191 def tuple(self):
192 return (self.x, self.y)
193 def fromTuple(self, tuple):
194 self.x, self.y = tuple
195 return self
196 def copy(self):
197 return b2Vec2(self.x, self.y)
198 def __iadd__(self, other):
199 self.add_vector(other)
200 return self
201 def __isub__(self, other):
202 self.sub_vector(other)
203 return self
204 def __imul__(self, a):
205 self.mul_float(a)
206 return self
207 def __idiv__(self, a):
208 self.div_float(a)
209 return self
210
211
212 def __div__(*args):
213 """__div__(self, float32 a) -> b2Vec2"""
214 return _Box2D2.b2Vec2___div__(*args)
215
216 def __mul__(*args):
217 """__mul__(self, float32 a) -> b2Vec2"""
218 return _Box2D2.b2Vec2___mul__(*args)
219
220 def __add__(*args):
221 """__add__(self, b2Vec2 other) -> b2Vec2"""
222 return _Box2D2.b2Vec2___add__(*args)
223
224 def __sub__(*args):
225 """__sub__(self, b2Vec2 other) -> b2Vec2"""
226 return _Box2D2.b2Vec2___sub__(*args)
227
228 def __rmul__(*args):
229 """__rmul__(self, float32 a) -> b2Vec2"""
230 return _Box2D2.b2Vec2___rmul__(*args)
231
232 def __rdiv__(*args):
233 """__rdiv__(self, float32 a) -> b2Vec2"""
234 return _Box2D2.b2Vec2___rdiv__(*args)
235
236 def div_float(*args):
237 """div_float(self, float32 a)"""
238 return _Box2D2.b2Vec2_div_float(*args)
239
240 __swig_destroy__ = _Box2D2.delete_b2Vec2
241 __del__ = lambda self : None;
242 b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
243 b2Vec2_swigregister(b2Vec2)
244
245 class b2Mat22(_object):
246 """Proxy of C++ b2Mat22 class"""
247 __swig_setmethods__ = {}
248 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
249 __swig_getmethods__ = {}
250 __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
251 __repr__ = _swig_repr
252 def __init__(self, *args):
253 """
254 __init__(self) -> b2Mat22
255 __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
256 __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
257 __init__(self, float32 angle) -> b2Mat22
258 """
259 this = _Box2D2.new_b2Mat22(*args)
260 try: self.this.append(this)
261 except: self.this = this
262 def Set(*args):
263 """
264 Set(self, b2Vec2 c1, b2Vec2 c2)
265 Set(self, float32 angle)
266 """
267 return _Box2D2.b2Mat22_Set(*args)
268
269 def SetIdentity(*args):
270 """SetIdentity(self)"""
271 return _Box2D2.b2Mat22_SetIdentity(*args)
272
273 def SetZero(*args):
274 """SetZero(self)"""
275 return _Box2D2.b2Mat22_SetZero(*args)
276
277 def GetAngle(*args):
278 """GetAngle(self) -> float32"""
279 return _Box2D2.b2Mat22_GetAngle(*args)
280
281 def Invert(*args):
282 """Invert(self) -> b2Mat22"""
283 return _Box2D2.b2Mat22_Invert(*args)
284
285 def Solve(*args):
286 """Solve(self, b2Vec2 b) -> b2Vec2"""
287 return _Box2D2.b2Mat22_Solve(*args)
288
289 __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
290 __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
291 if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
292 __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
293 __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
294 if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
295 def __repr__(self):
296 return "b2Mat22(col1: %s col2: %s)" % (self.col1, self.col2)
297
298 __swig_destroy__ = _Box2D2.delete_b2Mat22
299 __del__ = lambda self : None;
300 b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
301 b2Mat22_swigregister(b2Mat22)
302
303 class b2XForm(_object):
304 """Proxy of C++ b2XForm class"""
305 __swig_setmethods__ = {}
306 __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
307 __swig_getmethods__ = {}
308 __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
309 __repr__ = _swig_repr
310 def __init__(self, *args):
311 """
312 __init__(self) -> b2XForm
313 __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
314 """
315 this = _Box2D2.new_b2XForm(*args)
316 try: self.this.append(this)
317 except: self.this = this
318 def SetIdentity(*args):
319 """SetIdentity(self)"""
320 return _Box2D2.b2XForm_SetIdentity(*args)
321
322 __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
323 __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
324 if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
325 __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
326 __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
327 if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
328 __swig_destroy__ = _Box2D2.delete_b2XForm
329 __del__ = lambda self : None;
330 b2XForm_swigregister = _Box2D2.b2XForm_swigregister
331 b2XForm_swigregister(b2XForm)
332
333 class b2Sweep(_object):
334 """Proxy of C++ b2Sweep class"""
335 __swig_setmethods__ = {}
336 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
337 __swig_getmethods__ = {}
338 __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
339 __repr__ = _swig_repr
340 def GetXForm(*args):
341 """GetXForm(self, b2XForm xf, float32 t)"""
342 return _Box2D2.b2Sweep_GetXForm(*args)
343
344 def Advance(*args):
345 """Advance(self, float32 t)"""
346 return _Box2D2.b2Sweep_Advance(*args)
347
348 __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
349 __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
350 if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
351 __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
352 __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
353 if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
354 __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
355 __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
356 if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
357 __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
358 __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
359 if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
360 __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
361 __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
362 if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
363 __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
364 __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
365 if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
366 def __init__(self, *args):
367 """__init__(self) -> b2Sweep"""
368 this = _Box2D2.new_b2Sweep(*args)
369 try: self.this.append(this)
370 except: self.this = this
371 __swig_destroy__ = _Box2D2.delete_b2Sweep
372 __del__ = lambda self : None;
373 b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
374 b2Sweep_swigregister(b2Sweep)
375
376
377 def b2Dot(*args):
378 """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
379 return _Box2D2.b2Dot(*args)
380
381 def b2sub(*args):
382 """b2sub(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
383 return _Box2D2.b2sub(*args)
384
385 def b2mul(*args):
386 """b2mul(float32 s, b2Vec2 a) -> b2Vec2"""
387 return _Box2D2.b2mul(*args)
388
389 def b2equ(*args):
390 """b2equ(b2Vec2 a, b2Vec2 b) -> bool"""
391 return _Box2D2.b2equ(*args)
392
393 def b2DistanceSquared(*args):
394 """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
395 return _Box2D2.b2DistanceSquared(*args)
396
397 def b2Min(*args):
398 """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
399 return _Box2D2.b2Min(*args)
400
401 def b2Max(*args):
402 """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
403 return _Box2D2.b2Max(*args)
404
405 def b2Clamp(*args):
406 """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
407 return _Box2D2.b2Clamp(*args)
408 RAND_LIMIT = _Box2D2.RAND_LIMIT
409
410 def b2NextPowerOfTwo(*args):
411 """b2NextPowerOfTwo(uint32 x) -> uint32"""
412 return _Box2D2.b2NextPowerOfTwo(*args)
413
414 def b2IsPowerOfTwo(*args):
415 """b2IsPowerOfTwo(uint32 x) -> bool"""
416 return _Box2D2.b2IsPowerOfTwo(*args)
417 class b2ContactID(_object):
418 """Proxy of C++ b2ContactID class"""
419 __swig_setmethods__ = {}
420 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
421 __swig_getmethods__ = {}
422 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
423 __repr__ = _swig_repr
424 __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
425 __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
426 if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
427 __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
428 if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
429 def __repr__(self):
430 return "b2ContactID(key: %d Features: \n\t%s)" % \
431 (self.key, self.features)
432
433 def __init__(self, *args):
434 """__init__(self) -> b2ContactID"""
435 this = _Box2D2.new_b2ContactID(*args)
436 try: self.this.append(this)
437 except: self.this = this
438 __swig_destroy__ = _Box2D2.delete_b2ContactID
439 __del__ = lambda self : None;
440 b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
441 b2ContactID_swigregister(b2ContactID)
442 b2Vec2_zero = cvar.b2Vec2_zero
443 b2Mat22_identity = cvar.b2Mat22_identity
444 b2XForm_identity = cvar.b2XForm_identity
445
446 def b2Cross(*args):
447 """
448 b2Cross(b2Vec2 a, b2Vec2 b) -> float32
449 b2Cross(b2Vec2 a, float32 s) -> b2Vec2
450 b2Cross(float32 s, b2Vec2 a) -> b2Vec2
451 """
452 return _Box2D2.b2Cross(*args)
453
454 def b2add(*args):
455 """
456 b2add(b2Vec2 a, b2Vec2 b) -> b2Vec2
457 b2add(b2Mat22 A, b2Mat22 B) -> b2Mat22
458 """
459 return _Box2D2.b2add(*args)
460
461 def b2Mul(*args):
462 """
463 b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
464 b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
465 b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
466 """
467 return _Box2D2.b2Mul(*args)
468
469 def b2MulT(*args):
470 """
471 b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
472 b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
473 b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
474 """
475 return _Box2D2.b2MulT(*args)
476
477 def b2Abs(*args):
478 """
479 b2Abs(float32 a) -> float32
480 b2Abs(b2Vec2 a) -> b2Vec2
481 b2Abs(b2Mat22 A) -> b2Mat22
482 """
483 return _Box2D2.b2Abs(*args)
484
485 def b2Random(*args):
486 """
487 b2Random() -> float32
488 b2Random(float32 lo, float32 hi) -> float32
489 """
490 return _Box2D2.b2Random(*args)
491 b2_nullFeature = cvar.b2_nullFeature
492
493 class b2ContactID_features(_object):
494 """Proxy of C++ b2ContactID_features class"""
495 __swig_setmethods__ = {}
496 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
497 __swig_getmethods__ = {}
498 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
499 __repr__ = _swig_repr
500 __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
501 __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
502 if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
503 __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
504 __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
505 if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
506 __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
507 __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
508 if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
509 __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
510 __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
511 if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
512 def __repr__(self):
513 return "b2ContactID::Features(\n\treferenceFace: %d incidentEdge: %d incidentVertex: %d flip: %d)" % \
514 (self.referenceFace, self.incidentEdge, self.incidentVertex, self.flip)
515
516 def __init__(self, *args):
517 """__init__(self) -> b2ContactID_features"""
518 this = _Box2D2.new_b2ContactID_features(*args)
519 try: self.this.append(this)
520 except: self.this = this
521 __swig_destroy__ = _Box2D2.delete_b2ContactID_features
522 __del__ = lambda self : None;
523 b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
524 b2ContactID_features_swigregister(b2ContactID_features)
525
526 class b2ManifoldPoint(_object):
527 """Proxy of C++ b2ManifoldPoint class"""
528 __swig_setmethods__ = {}
529 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
530 __swig_getmethods__ = {}
531 __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
532 __repr__ = _swig_repr
533 __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
534 __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
535 if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
536 __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
537 __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
538 if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
539 __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
540 __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
541 if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
542 __swig_setmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_set
543 __swig_getmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_get
544 if _newclass:normalImpulse = _swig_property(_Box2D2.b2ManifoldPoint_normalImpulse_get, _Box2D2.b2ManifoldPoint_normalImpulse_set)
545 __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_set
546 __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_get
547 if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ManifoldPoint_tangentImpulse_get, _Box2D2.b2ManifoldPoint_tangentImpulse_set)
548 __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
549 __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
550 if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
551 def __init__(self, *args):
552 """__init__(self) -> b2ManifoldPoint"""
553 this = _Box2D2.new_b2ManifoldPoint(*args)
554 try: self.this.append(this)
555 except: self.this = this
556 __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
557 __del__ = lambda self : None;
558 b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
559 b2ManifoldPoint_swigregister(b2ManifoldPoint)
560
561 class b2Manifold(_object):
562 """Proxy of C++ b2Manifold class"""
563 __swig_setmethods__ = {}
564 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
565 __swig_getmethods__ = {}
566 __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
567 __repr__ = _swig_repr
568 __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
569 __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
570 if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
571 __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
572 __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
573 if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
574 __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
575 __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
576 if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
577 def __init__(self, *args):
578 """__init__(self) -> b2Manifold"""
579 this = _Box2D2.new_b2Manifold(*args)
580 try: self.this.append(this)
581 except: self.this = this
582 __swig_destroy__ = _Box2D2.delete_b2Manifold
583 __del__ = lambda self : None;
584 b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
585 b2Manifold_swigregister(b2Manifold)
586
587 class b2Segment(_object):
588 """Proxy of C++ b2Segment class"""
589 __swig_setmethods__ = {}
590 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
591 __swig_getmethods__ = {}
592 __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
593 __repr__ = _swig_repr
594 def TestSegment(*args):
595 """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
596 return _Box2D2.b2Segment_TestSegment(*args)
597
598 __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
599 __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
600 if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
601 __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
602 __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
603 if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
604 def __init__(self, *args):
605 """__init__(self) -> b2Segment"""
606 this = _Box2D2.new_b2Segment(*args)
607 try: self.this.append(this)
608 except: self.this = this
609 __swig_destroy__ = _Box2D2.delete_b2Segment
610 __del__ = lambda self : None;
611 b2Segment_swigregister = _Box2D2.b2Segment_swigregister
612 b2Segment_swigregister(b2Segment)
613
614 class b2AABB(_object):
615 """Proxy of C++ b2AABB class"""
616 __swig_setmethods__ = {}
617 __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
618 __swig_getmethods__ = {}
619 __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
620 __repr__ = _swig_repr
621 def IsValid(*args):
622 """IsValid(self) -> bool"""
623 return _Box2D2.b2AABB_IsValid(*args)
624
625 __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
626 __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
627 if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
628 __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
629 __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
630 if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
631 def __init__(self, *args):
632 """__init__(self) -> b2AABB"""
633 this = _Box2D2.new_b2AABB(*args)
634 try: self.this.append(this)
635 except: self.this = this
636 __swig_destroy__ = _Box2D2.delete_b2AABB
637 __del__ = lambda self : None;
638 b2AABB_swigregister = _Box2D2.b2AABB_swigregister
639 b2AABB_swigregister(b2AABB)
640
641 class b2OBB(_object):
642 """Proxy of C++ b2OBB class"""
643 __swig_setmethods__ = {}
644 __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
645 __swig_getmethods__ = {}
646 __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
647 __repr__ = _swig_repr
648 __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
649 __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
650 if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
651 __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
652 __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
653 if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
654 __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
655 __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
656 if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
657 def __init__(self, *args):
658 """__init__(self) -> b2OBB"""
659 this = _Box2D2.new_b2OBB(*args)
660 try: self.this.append(this)
661 except: self.this = this
662 __swig_destroy__ = _Box2D2.delete_b2OBB
663 __del__ = lambda self : None;
664 b2OBB_swigregister = _Box2D2.b2OBB_swigregister
665 b2OBB_swigregister(b2OBB)
666
667
668 def b2CollideCircles(*args):
669 """
670 b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
671 b2CircleShape circle2, b2XForm xf2)
672 """
673 return _Box2D2.b2CollideCircles(*args)
674
675 def b2CollidePolygonAndCircle(*args):
676 """
677 b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
678 b2CircleShape circle, b2XForm xf2)
679 """
680 return _Box2D2.b2CollidePolygonAndCircle(*args)
681
682 def b2CollidePolygons(*args):
683 """
684 b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
685 b2PolygonShape polygon2, b2XForm xf2)
686 """
687 return _Box2D2.b2CollidePolygons(*args)
688
689 def b2TimeOfImpact(*args):
690 """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
691 return _Box2D2.b2TimeOfImpact(*args)
692
693 def b2TestOverlap(*args):
694 """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
695 return _Box2D2.b2TestOverlap(*args)
696 class b2MassData(_object):
697 """Proxy of C++ b2MassData class"""
698 __swig_setmethods__ = {}
699 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
700 __swig_getmethods__ = {}
701 __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
702 __repr__ = _swig_repr
703 __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
704 __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
705 if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
706 __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
707 __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
708 if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
709 __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
710 __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
711 if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
712 def __init__(self, *args):
713 """__init__(self) -> b2MassData"""
714 this = _Box2D2.new_b2MassData(*args)
715 try: self.this.append(this)
716 except: self.this = this
717 __swig_destroy__ = _Box2D2.delete_b2MassData
718 __del__ = lambda self : None;
719 b2MassData_swigregister = _Box2D2.b2MassData_swigregister
720 b2MassData_swigregister(b2MassData)
721
722 def b2Distance(*args):
723 """
724 b2Distance(b2Vec2 a, b2Vec2 b) -> float32
725 b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
726 b2Shape shape2, b2XForm xf2) -> float32
727 """
728 return _Box2D2.b2Distance(*args)
729
730 class b2FilterData(_object):
731 """Proxy of C++ b2FilterData class"""
732 __swig_setmethods__ = {}
733 __setattr__ = lambda self, name, value: _swig_setattr(self, b2FilterData, name, value)
734 __swig_getmethods__ = {}
735 __getattr__ = lambda self, name: _swig_getattr(self, b2FilterData, name)
736 __repr__ = _swig_repr
737 __swig_setmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_set
738 __swig_getmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_get
739 if _newclass:categoryBits = _swig_property(_Box2D2.b2FilterData_categoryBits_get, _Box2D2.b2FilterData_categoryBits_set)
740 __swig_setmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_set
741 __swig_getmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_get
742 if _newclass:maskBits = _swig_property(_Box2D2.b2FilterData_maskBits_get, _Box2D2.b2FilterData_maskBits_set)
743 __swig_setmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_set
744 __swig_getmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_get
745 if _newclass:groupIndex = _swig_property(_Box2D2.b2FilterData_groupIndex_get, _Box2D2.b2FilterData_groupIndex_set)
746 def __init__(self, *args):
747 """__init__(self) -> b2FilterData"""
748 this = _Box2D2.new_b2FilterData(*args)
749 try: self.this.append(this)
750 except: self.this = this
751 __swig_destroy__ = _Box2D2.delete_b2FilterData
752 __del__ = lambda self : None;
753 b2FilterData_swigregister = _Box2D2.b2FilterData_swigregister
754 b2FilterData_swigregister(b2FilterData)
755
756 e_unknownShape = _Box2D2.e_unknownShape
757 e_circleShape = _Box2D2.e_circleShape
758 e_polygonShape = _Box2D2.e_polygonShape
759 e_shapeTypeCount = _Box2D2.e_shapeTypeCount
760 class b2ShapeDef(_object):
761 """Proxy of C++ b2ShapeDef class"""
762 __swig_setmethods__ = {}
763 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
764 __swig_getmethods__ = {}
765 __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
766 __repr__ = _swig_repr
767 def __init__(self, *args):
768 """__init__(self) -> b2ShapeDef"""
769 this = _Box2D2.new_b2ShapeDef(*args)
770 try: self.this.append(this)
771 except: self.this = this
772 __swig_destroy__ = _Box2D2.delete_b2ShapeDef
773 __del__ = lambda self : None;
774 __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
775 __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
776 if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
777 __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
778 __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
779 if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
780 __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
781 __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
782 if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
783 __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
784 __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
785 if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
786 __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
787 __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
788 if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
789 __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
790 __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
791 if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
792 __swig_setmethods__["filter"] = _Box2D2.b2ShapeDef_filter_set
793 __swig_getmethods__["filter"] = _Box2D2.b2ShapeDef_filter_get
794 if _newclass:filter = _swig_property(_Box2D2.b2ShapeDef_filter_get, _Box2D2.b2ShapeDef_filter_set)
795 b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
796 b2ShapeDef_swigregister(b2ShapeDef)
797
798 class b2Shape(_object):
799 """Proxy of C++ b2Shape class"""
800 __swig_setmethods__ = {}
801 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
802 __swig_getmethods__ = {}
803 __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
804 def __init__(self): raise AttributeError, "No constructor defined"
805 __repr__ = _swig_repr
806 def GetType(*args):
807 """GetType(self) -> int"""
808 return _Box2D2.b2Shape_GetType(*args)
809
810 def IsSensor(*args):
811 """IsSensor(self) -> bool"""
812 return _Box2D2.b2Shape_IsSensor(*args)
813
814 def SetFilterData(*args):
815 """SetFilterData(self, b2FilterData filter)"""
816 return _Box2D2.b2Shape_SetFilterData(*args)
817
818 def GetFilterData(*args):
819 """GetFilterData(self) -> b2FilterData"""
820 return _Box2D2.b2Shape_GetFilterData(*args)
821
822 def GetBody(*args):
823 """GetBody(self) -> b2Body"""
824 return _Box2D2.b2Shape_GetBody(*args)
825
826 def GetNext(*args):
827 """GetNext(self) -> b2Shape"""
828 return _Box2D2.b2Shape_GetNext(*args)
829
830 def GetUserData(self): # override the C++ version as it does not work.
831 """Get the specified userData (m_userData)"""
832 return self.pyGetUserData()
833
834
835 def SetUserData(*args):
836 """SetUserData(self, void data)"""
837 return _Box2D2.b2Shape_SetUserData(*args)
838
839 def TestPoint(*args):
840 """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
841 return _Box2D2.b2Shape_TestPoint(*args)
842
843 def TestSegment(*args):
844 """
845 TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
846 float32 maxLambda) -> bool
847 """
848 return _Box2D2.b2Shape_TestSegment(*args)
849
850 def ComputeAABB(*args):
851 """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
852 return _Box2D2.b2Shape_ComputeAABB(*args)
853
854 def ComputeSweptAABB(*args):
855 """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
856 return _Box2D2.b2Shape_ComputeSweptAABB(*args)
857
858 def ComputeMass(*args):
859 """ComputeMass(self, b2MassData massData)"""
860 return _Box2D2.b2Shape_ComputeMass(*args)
861
862 def GetSweepRadius(*args):
863 """GetSweepRadius(self) -> float32"""
864 return _Box2D2.b2Shape_GetSweepRadius(*args)
865
866 def GetFriction(*args):
867 """GetFriction(self) -> float32"""
868 return _Box2D2.b2Shape_GetFriction(*args)
869
870 def GetRestitution(*args):
871 """GetRestitution(self) -> float32"""
872 return _Box2D2.b2Shape_GetRestitution(*args)
873
874 def __repr__(self):
875 return "b2Shape(from Body %s )" % (self.GetBody())
876 def typeName(self):
877 types = { e_unknownShape : "Unknown",
878 e_circleShape : "Circle",
879 e_polygonShape : "Polygon",
880 e_shapeTypeCount: "ShapeType" }
881 return types[self.GetType()]
882 def getAsType(self):
883 """Return a typecasted version of the shape"""
884 return (getattr(self, "as%s" % self.typeName())) ()
885
886 def asCircle(*args):
887 """asCircle(self) -> b2CircleShape"""
888 return _Box2D2.b2Shape_asCircle(*args)
889
890 def asPolygon(*args):
891 """asPolygon(self) -> b2PolygonShape"""
892 return _Box2D2.b2Shape_asPolygon(*args)
893
894 def pyGetUserData(*args):
895 """pyGetUserData(self) -> PyObject"""
896 return _Box2D2.b2Shape_pyGetUserData(*args)
897
898 b2Shape_swigregister = _Box2D2.b2Shape_swigregister
899 b2Shape_swigregister(b2Shape)
900
901 def b2JointInfo(self):
902 """Return a rather verbose string representation of a joint"""
903 props = dir(self)
904 ignoreList = ('this', 'thisown', 'next', 'prev', 'm_next', 'm_prev')
905 info = []
906 for prop in dir(self):
907 if prop[:2]=='__' or prop in ignoreList: continue
908 if not callable(getattr(self, prop)):
909 info.append(prop + ":")
910 info.append(str(getattr(self, prop)))
911 return "%s(%s)" % (self.__class__.__name__, " ".join(info))
912
913 e_unknownJoint = _Box2D2.e_unknownJoint
914 e_revoluteJoint = _Box2D2.e_revoluteJoint
915 e_prismaticJoint = _Box2D2.e_prismaticJoint
916 e_distanceJoint = _Box2D2.e_distanceJoint
917 e_pulleyJoint = _Box2D2.e_pulleyJoint
918 e_mouseJoint = _Box2D2.e_mouseJoint
919 e_gearJoint = _Box2D2.e_gearJoint
920 e_inactiveLimit = _Box2D2.e_inactiveLimit
921 e_atLowerLimit = _Box2D2.e_atLowerLimit
922 e_atUpperLimit = _Box2D2.e_atUpperLimit
923 e_equalLimits = _Box2D2.e_equalLimits
924 class b2Jacobian(_object):
925 """Proxy of C++ b2Jacobian class"""
926 __swig_setmethods__ = {}
927 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
928 __swig_getmethods__ = {}
929 __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
930 __repr__ = _swig_repr
931 __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
932 __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
933 if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
934 __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
935 __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
936 if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
937 __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
938 __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
939 if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
940 __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
941 __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
942 if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
943 def SetZero(*args):
944 """SetZero(self)"""
945 return _Box2D2.b2Jacobian_SetZero(*args)
946
947 def Set(*args):
948 """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
949 return _Box2D2.b2Jacobian_Set(*args)
950
951 def Compute(*args):
952 """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
953 return _Box2D2.b2Jacobian_Compute(*args)
954
955 def __repr__(self):
956 return "b2Jacobian(linear1: %s: linear2: %s angular1: %s angular2: %s)" %\
957 (self.linear1, self.linear2, self.angular1, self.angular2)
958
959 def __init__(self, *args):
960 """__init__(self) -> b2Jacobian"""
961 this = _Box2D2.new_b2Jacobian(*args)
962 try: self.this.append(this)
963 except: self.this = this
964 __swig_destroy__ = _Box2D2.delete_b2Jacobian
965 __del__ = lambda self : None;
966 b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
967 b2Jacobian_swigregister(b2Jacobian)
968
969 class b2JointEdge(_object):
970 """Proxy of C++ b2JointEdge class"""
971 __swig_setmethods__ = {}
972 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
973 __swig_getmethods__ = {}
974 __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
975 __repr__ = _swig_repr
976 __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
977 __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
978 if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
979 __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
980 __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
981 if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
982 __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
983 __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
984 if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
985 __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
986 __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
987 if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
988 def __repr__(self):
989 return "b2JointEdge(other: %s)" % (self.other)
990
991 def __init__(self, *args):
992 """__init__(self) -> b2JointEdge"""
993 this = _Box2D2.new_b2JointEdge(*args)
994 try: self.this.append(this)
995 except: self.this = this
996 __swig_destroy__ = _Box2D2.delete_b2JointEdge
997 __del__ = lambda self : None;
998 b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
999 b2JointEdge_swigregister(b2JointEdge)
1000
1001 class b2JointDef(_object):
1002 """Proxy of C++ b2JointDef class"""
1003 __swig_setmethods__ = {}
1004 __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
1005 __swig_getmethods__ = {}
1006 __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
1007 __repr__ = _swig_repr
1008 def __init__(self, *args):
1009 """__init__(self) -> b2JointDef"""
1010 this = _Box2D2.new_b2JointDef(*args)
1011 try: self.this.append(this)
1012 except: self.this = this
1013 __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
1014 __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
1015 if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
1016 __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
1017 __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
1018 if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
1019 __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
1020 __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
1021 if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
1022 __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
1023 __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
1024 if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
1025 __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
1026 __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
1027 if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
1028 def __repr__(self):
1029 return "b2JointDef(body1: %s body2: %s)" % (self.body1, self.body2)
1030 def typeName(self):
1031 types = { e_unknownJoint : "Unknown",
1032 e_mouseJoint : "Mouse",
1033 e_gearJoint : "Gear",
1034 e_distanceJoint : "Distance",
1035 e_prismaticJoint: "Prismatic",
1036 e_pulleyJoint : "Pulley",
1037 e_revoluteJoint : "Revolute" }
1038 return types[self.GetType()]
1039
1040 __swig_destroy__ = _Box2D2.delete_b2JointDef
1041 __del__ = lambda self : None;
1042 b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
1043 b2JointDef_swigregister(b2JointDef)
1044
1045 class b2Joint(_object):
1046 """Proxy of C++ b2Joint class"""
1047 __swig_setmethods__ = {}
1048 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
1049 __swig_getmethods__ = {}
1050 __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
1051 def __init__(self): raise AttributeError, "No constructor defined"
1052 __repr__ = _swig_repr
1053 def GetType(*args):
1054 """GetType(self) -> int"""
1055 return _Box2D2.b2Joint_GetType(*args)
1056
1057 def GetBody1(*args):
1058 """GetBody1(self) -> b2Body"""
1059 return _Box2D2.b2Joint_GetBody1(*args)
1060
1061 def GetBody2(*args):
1062 """GetBody2(self) -> b2Body"""
1063 return _Box2D2.b2Joint_GetBody2(*args)
1064
1065 def GetAnchor1(*args):
1066 """GetAnchor1(self) -> b2Vec2"""
1067 return _Box2D2.b2Joint_GetAnchor1(*args)
1068
1069 def GetAnchor2(*args):
1070 """GetAnchor2(self) -> b2Vec2"""
1071 return _Box2D2.b2Joint_GetAnchor2(*args)
1072
1073 def GetReactionForce(*args):
1074 """GetReactionForce(self) -> b2Vec2"""
1075 return _Box2D2.b2Joint_GetReactionForce(*args)
1076
1077 def GetReactionTorque(*args):
1078 """GetReactionTorque(self) -> float32"""
1079 return _Box2D2.b2Joint_GetReactionTorque(*args)
1080
1081 def GetNext(*args):
1082 """GetNext(self) -> b2Joint"""
1083 return _Box2D2.b2Joint_GetNext(*args)
1084
1085 def GetUserData(self): # override the C++ version as it does not work.
1086 """Get the specified userData (m_userData)"""
1087 return self.pyGetUserData()
1088
1089
1090 def SetUserData(*args):
1091 """SetUserData(self, void data)"""
1092 return _Box2D2.b2Joint_SetUserData(*args)
1093
1094 def __repr__(self):
1095 return "b2Joint(m_body1: %s m_body2: %s getAsType(): %s)" % (self.m_body1, self.m_body2, self.getAsType())
1096 def typeName(self):
1097 types = { e_unknownJoint : "Unknown",
1098 e_mouseJoint : "Mouse",
1099 e_gearJoint : "Gear",
1100 e_distanceJoint : "Distance",
1101 e_prismaticJoint: "Prismatic",
1102 e_pulleyJoint : "Pulley",
1103 e_revoluteJoint : "Revolute" }
1104 return types[self.GetType()]
1105 def getAsType(self):
1106 """Return a typecasted version of the joint"""
1107 return (getattr(self, "as%sJoint" % self.typeName())) ()
1108
1109 def pyGetUserData(*args):
1110 """pyGetUserData(self) -> PyObject"""
1111 return _Box2D2.b2Joint_pyGetUserData(*args)
1112
1113 def asMouseJoint(*args):
1114 """asMouseJoint(self) -> b2MouseJoint"""
1115 return _Box2D2.b2Joint_asMouseJoint(*args)
1116
1117 def asGearJoint(*args):
1118 """asGearJoint(self) -> b2GearJoint"""
1119 return _Box2D2.b2Joint_asGearJoint(*args)
1120
1121 def asDistanceJoint(*args):
1122 """asDistanceJoint(self) -> b2DistanceJoint"""
1123 return _Box2D2.b2Joint_asDistanceJoint(*args)
1124
1125 def asPrismaticJoint(*args):
1126 """asPrismaticJoint(self) -> b2PrismaticJoint"""
1127 return _Box2D2.b2Joint_asPrismaticJoint(*args)
1128
1129 def asPulleyJoint(*args):
1130 """asPulleyJoint(self) -> b2PulleyJoint"""
1131 return _Box2D2.b2Joint_asPulleyJoint(*args)
1132
1133 def asRevoluteJoint(*args):
1134 """asRevoluteJoint(self) -> b2RevoluteJoint"""
1135 return _Box2D2.b2Joint_asRevoluteJoint(*args)
1136
1137 b2Joint_swigregister = _Box2D2.b2Joint_swigregister
1138 b2Joint_swigregister(b2Joint)
1139
1140 class b2CircleDef(b2ShapeDef):
1141 """Proxy of C++ b2CircleDef class"""
1142 __swig_setmethods__ = {}
1143 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1144 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
1145 __swig_getmethods__ = {}
1146 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1147 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
1148 __repr__ = _swig_repr
1149 def __init__(self, *args):
1150 """__init__(self) -> b2CircleDef"""
1151 this = _Box2D2.new_b2CircleDef(*args)
1152 try: self.this.append(this)
1153 except: self.this = this
1154 __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
1155 __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
1156 if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
1157 __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
1158 __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
1159 if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
1160 __swig_destroy__ = _Box2D2.delete_b2CircleDef
1161 __del__ = lambda self : None;
1162 b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
1163 b2CircleDef_swigregister(b2CircleDef)
1164
1165 class b2CircleShape(b2Shape):
1166 """Proxy of C++ b2CircleShape class"""
1167 __swig_setmethods__ = {}
1168 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1169 __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
1170 __swig_getmethods__ = {}
1171 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1172 __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
1173 def __init__(self): raise AttributeError, "No constructor defined"
1174 __repr__ = _swig_repr
1175 def TestPoint(*args):
1176 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
1177 return _Box2D2.b2CircleShape_TestPoint(*args)
1178
1179 def TestSegment(*args):
1180 """
1181 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
1182 float32 maxLambda) -> bool
1183 """
1184 return _Box2D2.b2CircleShape_TestSegment(*args)
1185
1186 def ComputeAABB(*args):
1187 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
1188 return _Box2D2.b2CircleShape_ComputeAABB(*args)
1189
1190 def ComputeSweptAABB(*args):
1191 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
1192 return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
1193
1194 def ComputeMass(*args):
1195 """ComputeMass(self, b2MassData massData)"""
1196 return _Box2D2.b2CircleShape_ComputeMass(*args)
1197
1198 def GetLocalPosition(*args):
1199 """GetLocalPosition(self) -> b2Vec2"""
1200 return _Box2D2.b2CircleShape_GetLocalPosition(*args)
1201
1202 def GetRadius(*args):
1203 """GetRadius(self) -> float32"""
1204 return _Box2D2.b2CircleShape_GetRadius(*args)
1205
1206 __swig_destroy__ = _Box2D2.delete_b2CircleShape
1207 __del__ = lambda self : None;
1208 b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
1209 b2CircleShape_swigregister(b2CircleShape)
1210
1211 class b2PolygonDef(b2ShapeDef):
1212 """Proxy of C++ b2PolygonDef class"""
1213 __swig_setmethods__ = {}
1214 for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1215 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
1216 __swig_getmethods__ = {}
1217 for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1218 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
1219 __repr__ = _swig_repr
1220 def __init__(self, *args):
1221 """__init__(self) -> b2PolygonDef"""
1222 this = _Box2D2.new_b2PolygonDef(*args)
1223 try: self.this.append(this)
1224 except: self.this = this
1225 def SetAsBox(*args):
1226 """
1227 SetAsBox(self, float32 hx, float32 hy)
1228 SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
1229 """
1230 return _Box2D2.b2PolygonDef_SetAsBox(*args)
1231
1232 __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
1233 __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
1234 if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
1235 __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
1236 __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
1237 if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
1238 def __repr__(self):
1239 return "b2PolygonDef(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
1240 def getVertices_tuple(self):
1241 """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1242 vertices = []
1243 for i in range(0, self.vertexCount):
1244 vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
1245 return vertices
1246 def getVertices_b2Vec2(self):
1247 """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1248 vertices = []
1249 for i in range(0, self.vertexCount):
1250 vertices.append(self.getVertex(i))
1251 return vertices
1252 def setVertices_tuple(self, vertices):
1253 """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
1254 in the format ( (x1,y1), (x2,y2) ... (xN,yN) )"""
1255 if len(vertices) > b2_maxPolygonVertices:
1256 raise ValueError
1257 self.vertexCount = len(vertices)
1258 for i in range(0, self.vertexCount):
1259 self.setVertex(i, vertices[i][0], vertices[i][1])
1260 def setVertices_b2Vec2(self, vertices):
1261 """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
1262 in the format ( (x1,y1), (x2,y2) ... (xN,yN) ) where each vertex
1263 is a b2Vec2"""
1264 if len(vertices) > b2_maxPolygonVertices:
1265 raise ValueError
1266 self.vertexCount = len(vertices)
1267 for i in range(0, self.vertexCount):
1268 self.setVertex(i, vertices[i])
1269
1270 def getVertex(*args):
1271 """getVertex(self, uint16 vnum) -> b2Vec2"""
1272 return _Box2D2.b2PolygonDef_getVertex(*args)
1273
1274 def setVertex(*args):
1275 """
1276 setVertex(self, uint16 vnum, b2Vec2 value)
1277 setVertex(self, uint16 vnum, float32 x, float32 y)
1278 """
1279 return _Box2D2.b2PolygonDef_setVertex(*args)
1280
1281 __swig_destroy__ = _Box2D2.delete_b2PolygonDef
1282 __del__ = lambda self : None;
1283 b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
1284 b2PolygonDef_swigregister(b2PolygonDef)
1285
1286 class b2PolygonShape(b2Shape):
1287 """Proxy of C++ b2PolygonShape class"""
1288 __swig_setmethods__ = {}
1289 for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
1290 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
1291 __swig_getmethods__ = {}
1292 for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
1293 __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
1294 def __init__(self): raise AttributeError, "No constructor defined"
1295 __repr__ = _swig_repr
1296 def TestPoint(*args):
1297 """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
1298 return _Box2D2.b2PolygonShape_TestPoint(*args)
1299
1300 def TestSegment(*args):
1301 """
1302 TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
1303 float32 maxLambda) -> bool
1304 """
1305 return _Box2D2.b2PolygonShape_TestSegment(*args)
1306
1307 def ComputeAABB(*args):
1308 """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
1309 return _Box2D2.b2PolygonShape_ComputeAABB(*args)
1310
1311 def ComputeSweptAABB(*args):
1312 """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
1313 return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
1314
1315 def ComputeMass(*args):
1316 """ComputeMass(self, b2MassData massData)"""
1317 return _Box2D2.b2PolygonShape_ComputeMass(*args)
1318
1319 def GetOBB(*args):
1320 """GetOBB(self) -> b2OBB"""
1321 return _Box2D2.b2PolygonShape_GetOBB(*args)
1322
1323 def GetCentroid(*args):
1324 """GetCentroid(self) -> b2Vec2"""
1325 return _Box2D2.b2PolygonShape_GetCentroid(*args)
1326
1327 def GetVertexCount(*args):
1328 """GetVertexCount(self) -> int32"""
1329 return _Box2D2.b2PolygonShape_GetVertexCount(*args)
1330
1331 def GetCoreVertices(*args):
1332 """GetCoreVertices(self) -> b2Vec2"""
1333 return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
1334
1335 def GetNormals(*args):
1336 """GetNormals(self) -> b2Vec2"""
1337 return _Box2D2.b2PolygonShape_GetNormals(*args)
1338
1339 def GetFirstVertex(*args):
1340 """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
1341 return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
1342
1343 def Centroid(*args):
1344 """Centroid(self, b2XForm xf) -> b2Vec2"""
1345 return _Box2D2.b2PolygonShape_Centroid(*args)
1346
1347 def Support(*args):
1348 """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
1349 return _Box2D2.b2PolygonShape_Support(*args)
1350
1351 def __repr__(self):
1352 return "b2PolygonShape(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
1353 def getVertices_tuple(self):
1354 """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1355 vertices = []
1356 for i in range(0, self.vertexCount):
1357 vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
1358 return vertices
1359 def getVertices_b2Vec2(self):
1360 """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
1361 vertices = []
1362 for i in range(0, self.GetVertexCount()):
1363 vertices.append(self.getVertex(i))
1364 return vertices
1365
1366 def getVertex(*args):
1367 """getVertex(self, uint16 vnum) -> b2Vec2"""
1368 return _Box2D2.b2PolygonShape_getVertex(*args)
1369
1370 __swig_destroy__ = _Box2D2.delete_b2PolygonShape
1371 __del__ = lambda self : None;
1372 b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
1373 b2PolygonShape_swigregister(b2PolygonShape)
1374
1375 class b2Pair(_object):
1376 """Proxy of C++ b2Pair class"""
1377 __swig_setmethods__ = {}
1378 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
1379 __swig_getmethods__ = {}
1380 __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
1381 __repr__ = _swig_repr
1382 e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
1383 e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
1384 e_pairFinal = _Box2D2.b2Pair_e_pairFinal
1385 def SetBuffered(*args):
1386 """SetBuffered(self)"""
1387 return _Box2D2.b2Pair_SetBuffered(*args)
1388
1389 def ClearBuffered(*args):
1390 """ClearBuffered(self)"""
1391 return _Box2D2.b2Pair_ClearBuffered(*args)
1392
1393 def IsBuffered(*args):
1394 """IsBuffered(self) -> bool"""
1395 return _Box2D2.b2Pair_IsBuffered(*args)
1396
1397 def SetRemoved(*args):
1398 """SetRemoved(self)"""
1399 return _Box2D2.b2Pair_SetRemoved(*args)
1400
1401 def ClearRemoved(*args):
1402 """ClearRemoved(self)"""
1403 return _Box2D2.b2Pair_ClearRemoved(*args)
1404
1405 def IsRemoved(*args):
1406 """IsRemoved(self) -> bool"""
1407 return _Box2D2.b2Pair_IsRemoved(*args)
1408
1409 def SetFinal(*args):
1410 """SetFinal(self)"""
1411 return _Box2D2.b2Pair_SetFinal(*args)
1412
1413 def IsFinal(*args):
1414 """IsFinal(self) -> bool"""
1415 return _Box2D2.b2Pair_IsFinal(*args)
1416
1417 __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
1418 __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
1419 if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
1420 __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
1421 __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
1422 if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
1423 __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
1424 __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
1425 if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
1426 __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
1427 __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
1428 if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
1429 __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
1430 __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
1431 if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
1432 def __init__(self, *args):
1433 """__init__(self) -> b2Pair"""
1434 this = _Box2D2.new_b2Pair(*args)
1435 try: self.this.append(this)
1436 except: self.this = this
1437 __swig_destroy__ = _Box2D2.delete_b2Pair
1438 __del__ = lambda self : None;
1439 b2Pair_swigregister = _Box2D2.b2Pair_swigregister
1440 b2Pair_swigregister(b2Pair)
1441 b2_nullPair = cvar.b2_nullPair
1442 b2_nullProxy = cvar.b2_nullProxy
1443 b2_tableCapacity = cvar.b2_tableCapacity
1444 b2_tableMask = cvar.b2_tableMask
1445
1446 class b2BufferedPair(_object):
1447 """Proxy of C++ b2BufferedPair class"""
1448 __swig_setmethods__ = {}
1449 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
1450 __swig_getmethods__ = {}
1451 __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
1452 __repr__ = _swig_repr
1453 __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
1454 __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
1455 if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
1456 __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
1457 __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
1458 if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
1459 def __init__(self, *args):
1460 """__init__(self) -> b2BufferedPair"""
1461 this = _Box2D2.new_b2BufferedPair(*args)
1462 try: self.this.append(this)
1463 except: self.this = this
1464 __swig_destroy__ = _Box2D2.delete_b2BufferedPair
1465 __del__ = lambda self : None;
1466 b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
1467 b2BufferedPair_swigregister(b2BufferedPair)
1468
1469 class b2PairCallback(_object):
1470 """Proxy of C++ b2PairCallback class"""
1471 __swig_setmethods__ = {}
1472 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
1473 __swig_getmethods__ = {}
1474 __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
1475 def __init__(self): raise AttributeError, "No constructor defined"
1476 __repr__ = _swig_repr
1477 __swig_destroy__ = _Box2D2.delete_b2PairCallback
1478 __del__ = lambda self : None;
1479 def PairAdded(*args):
1480 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
1481 return _Box2D2.b2PairCallback_PairAdded(*args)
1482
1483 def PairRemoved(*args):
1484 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
1485 return _Box2D2.b2PairCallback_PairRemoved(*args)
1486
1487 b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
1488 b2PairCallback_swigregister(b2PairCallback)
1489
1490 class b2PairManager(_object):
1491 """Proxy of C++ b2PairManager class"""
1492 __swig_setmethods__ = {}
1493 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
1494 __swig_getmethods__ = {}
1495 __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
1496 __repr__ = _swig_repr
1497 def __init__(self, *args):
1498 """__init__(self) -> b2PairManager"""
1499 this = _Box2D2.new_b2PairManager(*args)
1500 try: self.this.append(this)
1501 except: self.this = this
1502 def Initialize(*args):
1503 """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
1504 return _Box2D2.b2PairManager_Initialize(*args)
1505
1506 def AddBufferedPair(*args):
1507 """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1508 return _Box2D2.b2PairManager_AddBufferedPair(*args)
1509
1510 def RemoveBufferedPair(*args):
1511 """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
1512 return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
1513
1514 def Commit(*args):
1515 """Commit(self)"""
1516 return _Box2D2.b2PairManager_Commit(*args)
1517
1518 __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
1519 __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
1520 if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
1521 __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
1522 __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
1523 if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
1524 __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
1525 __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
1526 if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
1527 __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
1528 __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
1529 if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
1530 __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
1531 __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
1532 if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
1533 __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
1534 __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
1535 if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
1536 __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
1537 __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
1538 if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
1539 __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
1540 __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
1541 if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
1542 __swig_destroy__ = _Box2D2.delete_b2PairManager
1543 __del__ = lambda self : None;
1544 b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
1545 b2PairManager_swigregister(b2PairManager)
1546
1547 class b2Bound(_object):
1548 """Proxy of C++ b2Bound class"""
1549 __swig_setmethods__ = {}
1550 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
1551 __swig_getmethods__ = {}
1552 __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
1553 __repr__ = _swig_repr
1554 def IsLower(*args):
1555 """IsLower(self) -> bool"""
1556 return _Box2D2.b2Bound_IsLower(*args)
1557
1558 def IsUpper(*args):
1559 """IsUpper(self) -> bool"""
1560 return _Box2D2.b2Bound_IsUpper(*args)
1561
1562 __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
1563 __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
1564 if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
1565 __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
1566 __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
1567 if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
1568 __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
1569 __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
1570 if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
1571 def __init__(self, *args):
1572 """__init__(self) -> b2Bound"""
1573 this = _Box2D2.new_b2Bound(*args)
1574 try: self.this.append(this)
1575 except: self.this = this
1576 __swig_destroy__ = _Box2D2.delete_b2Bound
1577 __del__ = lambda self : None;
1578 b2Bound_swigregister = _Box2D2.b2Bound_swigregister
1579 b2Bound_swigregister(b2Bound)
1580 b2_invalid = cvar.b2_invalid
1581 b2_nullEdge = cvar.b2_nullEdge
1582
1583 class b2Proxy(_object):
1584 """Proxy of C++ b2Proxy class"""
1585 __swig_setmethods__ = {}
1586 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
1587 __swig_getmethods__ = {}
1588 __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
1589 __repr__ = _swig_repr
1590 def GetNext(*args):
1591 """GetNext(self) -> uint16"""
1592 return _Box2D2.b2Proxy_GetNext(*args)
1593
1594 def SetNext(*args):
1595 """SetNext(self, uint16 next)"""
1596 return _Box2D2.b2Proxy_SetNext(*args)
1597
1598 def IsValid(*args):
1599 """IsValid(self) -> bool"""
1600 return _Box2D2.b2Proxy_IsValid(*args)
1601
1602 __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
1603 __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
1604 if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
1605 __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
1606 __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
1607 if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
1608 __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
1609 __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
1610 if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
1611 __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
1612 __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
1613 if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
1614 __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
1615 __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
1616 if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
1617 def __init__(self, *args):
1618 """__init__(self) -> b2Proxy"""
1619 this = _Box2D2.new_b2Proxy(*args)
1620 try: self.this.append(this)
1621 except: self.this = this
1622 __swig_destroy__ = _Box2D2.delete_b2Proxy
1623 __del__ = lambda self : None;
1624 b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
1625 b2Proxy_swigregister(b2Proxy)
1626
1627 class b2BroadPhase(_object):
1628 """Proxy of C++ b2BroadPhase class"""
1629 __swig_setmethods__ = {}
1630 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
1631 __swig_getmethods__ = {}
1632 __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
1633 __repr__ = _swig_repr
1634 def __init__(self, *args):
1635 """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
1636 this = _Box2D2.new_b2BroadPhase(*args)
1637 try: self.this.append(this)
1638 except: self.this = this
1639 __swig_destroy__ = _Box2D2.delete_b2BroadPhase
1640 __del__ = lambda self : None;
1641 def InRange(*args):
1642 """InRange(self, b2AABB aabb) -> bool"""
1643 return _Box2D2.b2BroadPhase_InRange(*args)
1644
1645 def CreateProxy(*args):
1646 """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
1647 return _Box2D2.b2BroadPhase_CreateProxy(*args)
1648
1649 def DestroyProxy(*args):
1650 """DestroyProxy(self, int32 proxyId)"""
1651 return _Box2D2.b2BroadPhase_DestroyProxy(*args)
1652
1653 def MoveProxy(*args):
1654 """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
1655 return _Box2D2.b2BroadPhase_MoveProxy(*args)
1656
1657 def Commit(*args):
1658 """Commit(self)"""
1659 return _Box2D2.b2BroadPhase_Commit(*args)
1660
1661 def GetProxy(*args):
1662 """GetProxy(self, int32 proxyId) -> b2Proxy"""
1663 return _Box2D2.b2BroadPhase_GetProxy(*args)
1664
1665 def Query(*args):
1666 """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
1667 return _Box2D2.b2BroadPhase_Query(*args)
1668
1669 def Validate(*args):
1670 """Validate(self)"""
1671 return _Box2D2.b2BroadPhase_Validate(*args)
1672
1673 def ValidatePairs(*args):
1674 """ValidatePairs(self)"""
1675 return _Box2D2.b2BroadPhase_ValidatePairs(*args)
1676
1677 __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
1678 __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
1679 if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
1680 __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
1681 __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
1682 if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
1683 __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
1684 __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
1685 if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
1686 __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
1687 __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
1688 if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
1689 __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
1690 __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
1691 if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
1692 __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
1693 __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
1694 if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
1695 __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
1696 __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
1697 if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
1698 __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
1699 __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
1700 if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
1701 __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
1702 __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
1703 if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
1704 __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
1705 __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
1706 if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
1707 __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
1708 __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
1709 if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
1710 b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
1711 b2BroadPhase_swigregister(b2BroadPhase)
1712
1713 class b2DestructionListener(_object):
1714 """Proxy of C++ b2DestructionListener class"""
1715 __swig_setmethods__ = {}
1716 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
1717 __swig_getmethods__ = {}
1718 __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
1719 __repr__ = _swig_repr
1720 __swig_destroy__ = _Box2D2.delete_b2DestructionListener
1721 __del__ = lambda self : None;
1722 def SayGoodbye(*args):
1723 """
1724 SayGoodbye(self, b2Joint joint)
1725 SayGoodbye(self, b2Shape shape)
1726 """
1727 return _Box2D2.b2DestructionListener_SayGoodbye(*args)
1728
1729 def __init__(self, *args):
1730 """__init__(self) -> b2DestructionListener"""
1731 if self.__class__ == b2DestructionListener:
1732 args = (None,) + args
1733 else:
1734 args = (self,) + args
1735 this = _Box2D2.new_b2DestructionListener(*args)
1736 try: self.this.append(this)
1737 except: self.this = this
1738 def __disown__(self):
1739 self.this.disown()
1740 _Box2D2.disown_b2DestructionListener(self)
1741 return weakref_proxy(self)
1742 b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
1743 b2DestructionListener_swigregister(b2DestructionListener)
1744
1745 class b2BoundaryListener(_object):
1746 """Proxy of C++ b2BoundaryListener class"""
1747 __swig_setmethods__ = {}
1748 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
1749 __swig_getmethods__ = {}
1750 __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
1751 __repr__ = _swig_repr
1752 __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
1753 __del__ = lambda self : None;
1754 def Violation(*args):
1755 """Violation(self, b2Body body)"""
1756 return _Box2D2.b2BoundaryListener_Violation(*args)
1757
1758 def __init__(self, *args):
1759 """__init__(self) -> b2BoundaryListener"""
1760 if self.__class__ == b2BoundaryListener:
1761 args = (None,) + args
1762 else:
1763 args = (self,) + args
1764 this = _Box2D2.new_b2BoundaryListener(*args)
1765 try: self.this.append(this)
1766 except: self.this = this
1767 def __disown__(self):
1768 self.this.disown()
1769 _Box2D2.disown_b2BoundaryListener(self)
1770 return weakref_proxy(self)
1771 b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
1772 b2BoundaryListener_swigregister(b2BoundaryListener)
1773
1774 class b2ContactFilter(_object):
1775 """Proxy of C++ b2ContactFilter class"""
1776 __swig_setmethods__ = {}
1777 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
1778 __swig_getmethods__ = {}
1779 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
1780 __repr__ = _swig_repr
1781 __swig_destroy__ = _Box2D2.delete_b2ContactFilter
1782 __del__ = lambda self : None;
1783 def ShouldCollide(*args):
1784 """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
1785 return _Box2D2.b2ContactFilter_ShouldCollide(*args)
1786
1787 def __init__(self, *args):
1788 """__init__(self) -> b2ContactFilter"""
1789 this = _Box2D2.new_b2ContactFilter(*args)
1790 try: self.this.append(this)
1791 except: self.this = this
1792 b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
1793 b2ContactFilter_swigregister(b2ContactFilter)
1794
1795 class b2ContactListener(_object):
1796 """Proxy of C++ b2ContactListener class"""
1797 __swig_setmethods__ = {}
1798 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
1799 __swig_getmethods__ = {}
1800 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
1801 __repr__ = _swig_repr
1802 __swig_destroy__ = _Box2D2.delete_b2ContactListener
1803 __del__ = lambda self : None;
1804 def Add(*args):
1805 """Add(self, b2ContactPoint point)"""
1806 return _Box2D2.b2ContactListener_Add(*args)
1807
1808 def Persist(*args):
1809 """Persist(self, b2ContactPoint point)"""
1810 return _Box2D2.b2ContactListener_Persist(*args)
1811
1812 def Remove(*args):
1813 """Remove(self, b2ContactPoint point)"""
1814 return _Box2D2.b2ContactListener_Remove(*args)
1815
1816 def Result(*args):
1817 """Result(self, b2ContactResult point)"""
1818 return _Box2D2.b2ContactListener_Result(*args)
1819
1820 def __init__(self, *args):
1821 """__init__(self) -> b2ContactListener"""
1822 if self.__class__ == b2ContactListener:
1823 args = (None,) + args
1824 else:
1825 args = (self,) + args
1826 this = _Box2D2.new_b2ContactListener(*args)
1827 try: self.this.append(this)
1828 except: self.this = this
1829 def __disown__(self):
1830 self.this.disown()
1831 _Box2D2.disown_b2ContactListener(self)
1832 return weakref_proxy(self)
1833 b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
1834 b2ContactListener_swigregister(b2ContactListener)
1835
1836 class b2Color(_object):
1837 """Proxy of C++ b2Color class"""
1838 __swig_setmethods__ = {}
1839 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
1840 __swig_getmethods__ = {}
1841 __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
1842 __repr__ = _swig_repr
1843 def __init__(self, *args):
1844 """
1845 __init__(self) -> b2Color
1846 __init__(self, float32 r, float32 g, float32 b) -> b2Color
1847 """
1848 this = _Box2D2.new_b2Color(*args)
1849 try: self.this.append(this)
1850 except: self.this = this
1851 __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
1852 __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
1853 if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
1854 __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
1855 __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
1856 if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
1857 __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
1858 __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
1859 if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
1860 __swig_destroy__ = _Box2D2.delete_b2Color
1861 __del__ = lambda self : None;
1862 b2Color_swigregister = _Box2D2.b2Color_swigregister
1863 b2Color_swigregister(b2Color)
1864
1865 class b2DebugDraw(_object):
1866 """Proxy of C++ b2DebugDraw class"""
1867 __swig_setmethods__ = {}
1868 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
1869 __swig_getmethods__ = {}
1870 __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
1871 __repr__ = _swig_repr
1872 def __init__(self, *args):
1873 """__init__(self) -> b2DebugDraw"""
1874 if self.__class__ == b2DebugDraw:
1875 args = (None,) + args
1876 else:
1877 args = (self,) + args
1878 this = _Box2D2.new_b2DebugDraw(*args)
1879 try: self.this.append(this)
1880 except: self.this = this
1881 __swig_destroy__ = _Box2D2.delete_b2DebugDraw
1882 __del__ = lambda self : None;
1883 e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
1884 e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
1885 e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
1886 e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
1887 e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
1888 e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
1889 e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
1890 def SetFlags(*args):
1891 """SetFlags(self, uint32 flags)"""
1892 return _Box2D2.b2DebugDraw_SetFlags(*args)
1893
1894 def GetFlags(*args):
1895 """GetFlags(self) -> uint32"""
1896 return _Box2D2.b2DebugDraw_GetFlags(*args)
1897
1898 def AppendFlags(*args):
1899 """AppendFlags(self, uint32 flags)"""
1900 return _Box2D2.b2DebugDraw_AppendFlags(*args)
1901
1902 def ClearFlags(*args):
1903 """ClearFlags(self, uint32 flags)"""
1904 return _Box2D2.b2DebugDraw_ClearFlags(*args)
1905
1906 def DrawPolygon(*args):
1907 """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1908 return _Box2D2.b2DebugDraw_DrawPolygon(*args)
1909
1910 def DrawSolidPolygon(*args):
1911 """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
1912 return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
1913
1914 def DrawCircle(*args):
1915 """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
1916 return _Box2D2.b2DebugDraw_DrawCircle(*args)
1917
1918 def DrawSolidCircle(*args):
1919 """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
1920 return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
1921
1922 def DrawSegment(*args):
1923 """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
1924 return _Box2D2.b2DebugDraw_DrawSegment(*args)
1925
1926 def DrawXForm(*args):
1927 """DrawXForm(self, b2XForm xf)"""
1928 return _Box2D2.b2DebugDraw_DrawXForm(*args)
1929
1930 def __disown__(self):
1931 self.this.disown()
1932 _Box2D2.disown_b2DebugDraw(self)
1933 return weakref_proxy(self)
1934 b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
1935 b2DebugDraw_swigregister(b2DebugDraw)
1936
1937 class b2BlockAllocator(_object):
1938 """Proxy of C++ b2BlockAllocator class"""
1939 __swig_setmethods__ = {}
1940 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
1941 __swig_getmethods__ = {}
1942 __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
1943 __repr__ = _swig_repr
1944 def __init__(self, *args):
1945 """__init__(self) -> b2BlockAllocator"""
1946 this = _Box2D2.new_b2BlockAllocator(*args)
1947 try: self.this.append(this)
1948 except: self.this = this
1949 __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
1950 __del__ = lambda self : None;
1951 def Allocate(*args):
1952 """Allocate(self, int32 size) -> void"""
1953 return _Box2D2.b2BlockAllocator_Allocate(*args)
1954
1955 def Free(*args):
1956 """Free(self, void p, int32 size)"""
1957 return _Box2D2.b2BlockAllocator_Free(*args)
1958
1959 def Clear(*args):
1960 """Clear(self)"""
1961 return _Box2D2.b2BlockAllocator_Clear(*args)
1962
1963 b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
1964 b2BlockAllocator_swigregister(b2BlockAllocator)
1965 b2_chunkSize = cvar.b2_chunkSize
1966 b2_maxBlockSize = cvar.b2_maxBlockSize
1967 b2_blockSizes = cvar.b2_blockSizes
1968 b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
1969
1970 class b2StackEntry(_object):
1971 """Proxy of C++ b2StackEntry class"""
1972 __swig_setmethods__ = {}
1973 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
1974 __swig_getmethods__ = {}
1975 __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
1976 __repr__ = _swig_repr
1977 __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
1978 __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
1979 if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
1980 __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
1981 __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
1982 if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
1983 __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
1984 __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
1985 if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
1986 def __init__(self, *args):
1987 """__init__(self) -> b2StackEntry"""
1988 this = _Box2D2.new_b2StackEntry(*args)
1989 try: self.this.append(this)
1990 except: self.this = this
1991 __swig_destroy__ = _Box2D2.delete_b2StackEntry
1992 __del__ = lambda self : None;
1993 b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
1994 b2StackEntry_swigregister(b2StackEntry)
1995 b2_stackSize = cvar.b2_stackSize
1996 b2_maxStackEntries = cvar.b2_maxStackEntries
1997
1998 class b2StackAllocator(_object):
1999 """Proxy of C++ b2StackAllocator class"""
2000 __swig_setmethods__ = {}
2001 __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
2002 __swig_getmethods__ = {}
2003 __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
2004 __repr__ = _swig_repr
2005 def __init__(self, *args):
2006 """__init__(self) -> b2StackAllocator"""
2007 this = _Box2D2.new_b2StackAllocator(*args)
2008 try: self.this.append(this)
2009 except: self.this = this
2010 __swig_destroy__ = _Box2D2.delete_b2StackAllocator
2011 __del__ = lambda self : None;
2012 def Allocate(*args):
2013 """Allocate(self, int32 size) -> void"""
2014 return _Box2D2.b2StackAllocator_Allocate(*args)
2015
2016 def Free(*args):
2017 """Free(self, void p)"""
2018 return _Box2D2.b2StackAllocator_Free(*args)
2019
2020 def GetMaxAllocation(*args):
2021 """GetMaxAllocation(self) -> int32"""
2022 return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
2023
2024 b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
2025 b2StackAllocator_swigregister(b2StackAllocator)
2026
2027 class b2ContactRegister(_object):
2028 """Proxy of C++ b2ContactRegister class"""
2029 __swig_setmethods__ = {}
2030 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
2031 __swig_getmethods__ = {}
2032 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
2033 __repr__ = _swig_repr
2034 __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
2035 __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
2036 if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
2037 __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
2038 __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
2039 if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
2040 __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
2041 __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
2042 if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
2043 def __init__(self, *args):
2044 """__init__(self) -> b2ContactRegister"""
2045 this = _Box2D2.new_b2ContactRegister(*args)
2046 try: self.this.append(this)
2047 except: self.this = this
2048 __swig_destroy__ = _Box2D2.delete_b2ContactRegister
2049 __del__ = lambda self : None;
2050 b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
2051 b2ContactRegister_swigregister(b2ContactRegister)
2052
2053 class b2ContactEdge(_object):
2054 """Proxy of C++ b2ContactEdge class"""
2055 __swig_setmethods__ = {}
2056 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
2057 __swig_getmethods__ = {}
2058 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
2059 __repr__ = _swig_repr
2060 __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
2061 __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
2062 if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
2063 __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
2064 __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
2065 if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
2066 __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
2067 __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
2068 if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
2069 __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
2070 __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
2071 if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
2072 def __init__(self, *args):
2073 """__init__(self) -> b2ContactEdge"""
2074 this = _Box2D2.new_b2ContactEdge(*args)
2075 try: self.this.append(this)
2076 except: self.this = this
2077 __swig_destroy__ = _Box2D2.delete_b2ContactEdge
2078 __del__ = lambda self : None;
2079 b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
2080 b2ContactEdge_swigregister(b2ContactEdge)
2081
2082 class b2ContactPoint(_object):
2083 """Proxy of C++ b2ContactPoint class"""
2084 __swig_setmethods__ = {}
2085 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
2086 __swig_getmethods__ = {}
2087 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
2088 __repr__ = _swig_repr
2089 __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
2090 __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
2091 if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
2092 __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
2093 __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
2094 if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
2095 __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
2096 __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
2097 if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
2098 __swig_setmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_set
2099 __swig_getmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_get
2100 if _newclass:velocity = _swig_property(_Box2D2.b2ContactPoint_velocity_get, _Box2D2.b2ContactPoint_velocity_set)
2101 __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
2102 __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
2103 if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
2104 __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
2105 __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
2106 if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
2107 __swig_setmethods__["friction"] = _Box2D2.b2ContactPoint_friction_set
2108 __swig_getmethods__["friction"] = _Box2D2.b2ContactPoint_friction_get
2109 if _newclass:friction = _swig_property(_Box2D2.b2ContactPoint_friction_get, _Box2D2.b2ContactPoint_friction_set)
2110 __swig_setmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_set
2111 __swig_getmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_get
2112 if _newclass:restitution = _swig_property(_Box2D2.b2ContactPoint_restitution_get, _Box2D2.b2ContactPoint_restitution_set)
2113 __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
2114 __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
2115 if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
2116 def __repr__(self):
2117 return "b2ContactPoint(\n\tid: %s\n\tshape1: %s\n\tshape2: %s\n\tposition: %s\n\tnormal: %s\n\tseparation: %f normalForce: %f tangentForce: %f)" % \
2118 (self.id, self.shape1, self.shape2, self.position, self.normal, self.separation, self.normalForce, self.tangentForce)
2119
2120 def __init__(self, *args):
2121 """__init__(self) -> b2ContactPoint"""
2122 this = _Box2D2.new_b2ContactPoint(*args)
2123 try: self.this.append(this)
2124 except: self.this = this
2125 __swig_destroy__ = _Box2D2.delete_b2ContactPoint
2126 __del__ = lambda self : None;
2127 b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
2128 b2ContactPoint_swigregister(b2ContactPoint)
2129
2130 class b2ContactResult(_object):
2131 """Proxy of C++ b2ContactResult class"""
2132 __swig_setmethods__ = {}
2133 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactResult, name, value)
2134 __swig_getmethods__ = {}
2135 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactResult, name)
2136 __repr__ = _swig_repr
2137 __swig_setmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_set
2138 __swig_getmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_get
2139 if _newclass:shape1 = _swig_property(_Box2D2.b2ContactResult_shape1_get, _Box2D2.b2ContactResult_shape1_set)
2140 __swig_setmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_set
2141 __swig_getmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_get
2142 if _newclass:shape2 = _swig_property(_Box2D2.b2ContactResult_shape2_get, _Box2D2.b2ContactResult_shape2_set)
2143 __swig_setmethods__["position"] = _Box2D2.b2ContactResult_position_set
2144 __swig_getmethods__["position"] = _Box2D2.b2ContactResult_position_get
2145 if _newclass:position = _swig_property(_Box2D2.b2ContactResult_position_get, _Box2D2.b2ContactResult_position_set)
2146 __swig_setmethods__["normal"] = _Box2D2.b2ContactResult_normal_set
2147 __swig_getmethods__["normal"] = _Box2D2.b2ContactResult_normal_get
2148 if _newclass:normal = _swig_property(_Box2D2.b2ContactResult_normal_get, _Box2D2.b2ContactResult_normal_set)
2149 __swig_setmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_set
2150 __swig_getmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_get
2151 if _newclass:normalImpulse = _swig_property(_Box2D2.b2ContactResult_normalImpulse_get, _Box2D2.b2ContactResult_normalImpulse_set)
2152 __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_set
2153 __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_get
2154 if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ContactResult_tangentImpulse_get, _Box2D2.b2ContactResult_tangentImpulse_set)
2155 __swig_setmethods__["id"] = _Box2D2.b2ContactResult_id_set
2156 __swig_getmethods__["id"] = _Box2D2.b2ContactResult_id_get
2157 if _newclass:id = _swig_property(_Box2D2.b2ContactResult_id_get, _Box2D2.b2ContactResult_id_set)
2158 def __init__(self, *args):
2159 """__init__(self) -> b2ContactResult"""
2160 this = _Box2D2.new_b2ContactResult(*args)
2161 try: self.this.append(this)
2162 except: self.this = this
2163 __swig_destroy__ = _Box2D2.delete_b2ContactResult
2164 __del__ = lambda self : None;
2165 b2ContactResult_swigregister = _Box2D2.b2ContactResult_swigregister
2166 b2ContactResult_swigregister(b2ContactResult)
2167
2168 class b2Contact(_object):
2169 """Proxy of C++ b2Contact class"""
2170 __swig_setmethods__ = {}
2171 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
2172 __swig_getmethods__ = {}
2173 __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
2174 def __init__(self): raise AttributeError, "No constructor defined"
2175 __repr__ = _swig_repr
2176 def GetManifolds(*args):
2177 """GetManifolds(self) -> b2Manifold"""
2178 return _Box2D2.b2Contact_GetManifolds(*args)
2179
2180 def GetManifoldCount(*args):
2181 """GetManifoldCount(self) -> int32"""
2182 return _Box2D2.b2Contact_GetManifoldCount(*args)
2183
2184 def IsSolid(*args):
2185 """IsSolid(self) -> bool"""
2186 return _Box2D2.b2Contact_IsSolid(*args)
2187
2188 def GetNext(*args):
2189 """GetNext(self) -> b2Contact"""
2190 return _Box2D2.b2Contact_GetNext(*args)
2191
2192 def GetShape1(*args):
2193 """GetShape1(self) -> b2Shape"""
2194 return _Box2D2.b2Contact_GetShape1(*args)
2195
2196 def GetShape2(*args):
2197 """GetShape2(self) -> b2Shape"""
2198 return _Box2D2.b2Contact_GetShape2(*args)
2199
2200 e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
2201 e_slowFlag = _Box2D2.b2Contact_e_slowFlag
2202 e_islandFlag = _Box2D2.b2Contact_e_islandFlag
2203 e_toiFlag = _Box2D2.b2Contact_e_toiFlag
2204 def AddType(*args):
2205 """
2206 AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
2207 b2ShapeType type1, b2ShapeType type2)
2208 """
2209 return _Box2D2.b2Contact_AddType(*args)
2210
2211 if _newclass:AddType = staticmethod(AddType)
2212 __swig_getmethods__["AddType"] = lambda x: AddType
2213 def InitializeRegisters(*args):
2214 """InitializeRegisters()"""
2215 return _Box2D2.b2Contact_InitializeRegisters(*args)
2216
2217 if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
2218 __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
2219 def Create(*args):
2220 """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
2221 return _Box2D2.b2Contact_Create(*args)
2222
2223 if _newclass:Create = staticmethod(Create)
2224 __swig_getmethods__["Create"] = lambda x: Create
2225 def Destroy(*args):
2226 """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
2227 return _Box2D2.b2Contact_Destroy(*args)
2228
2229 if _newclass:Destroy = staticmethod(Destroy)
2230 __swig_getmethods__["Destroy"] = lambda x: Destroy
2231 __swig_destroy__ = _Box2D2.delete_b2Contact
2232 __del__ = lambda self : None;
2233 def Update(*args):
2234 """Update(self, b2ContactListener listener)"""
2235 return _Box2D2.b2Contact_Update(*args)
2236
2237 def Evaluate(*args):
2238 """Evaluate(self, b2ContactListener listener)"""
2239 return _Box2D2.b2Contact_Evaluate(*args)
2240
2241 __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
2242 __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
2243 if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
2244 __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
2245 __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
2246 if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
2247 __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
2248 __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
2249 if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
2250 __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
2251 __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
2252 if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
2253 __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
2254 __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
2255 if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
2256 __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
2257 __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
2258 if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
2259 __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
2260 __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
2261 if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
2262 __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
2263 __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
2264 if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
2265 __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
2266 __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
2267 if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
2268 __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
2269 __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
2270 if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
2271 __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
2272 __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
2273 if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
2274 __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
2275 __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
2276 if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
2277 __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
2278 __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
2279 if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
2280 b2Contact_swigregister = _Box2D2.b2Contact_swigregister
2281 b2Contact_swigregister(b2Contact)
2282
2283 def b2Contact_AddType(*args):
2284 """
2285 b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
2286 b2ShapeType type1, b2ShapeType type2)
2287 """
2288 return _Box2D2.b2Contact_AddType(*args)
2289
2290 def b2Contact_InitializeRegisters(*args):
2291 """b2Contact_InitializeRegisters()"""
2292 return _Box2D2.b2Contact_InitializeRegisters(*args)
2293
2294 def b2Contact_Create(*args):
2295 """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
2296 return _Box2D2.b2Contact_Create(*args)
2297
2298 def b2Contact_Destroy(*args):
2299 """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
2300 return _Box2D2.b2Contact_Destroy(*args)
2301
2302 class b2NullContact(b2Contact):
2303 """Proxy of C++ b2NullContact class"""
2304 __swig_setmethods__ = {}
2305 for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2306 __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
2307 __swig_getmethods__ = {}
2308 for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2309 __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
2310 __repr__ = _swig_repr
2311 def __init__(self, *args):
2312 """__init__(self) -> b2NullContact"""
2313 this = _Box2D2.new_b2NullContact(*args)
2314 try: self.this.append(this)
2315 except: self.this = this
2316 def Evaluate(*args):
2317 """Evaluate(self, b2ContactListener ?)"""
2318 return _Box2D2.b2NullContact_Evaluate(*args)
2319
2320 def GetManifolds(*args):
2321 """GetManifolds(self) -> b2Manifold"""
2322 return _Box2D2.b2NullContact_GetManifolds(*args)
2323
2324 __swig_destroy__ = _Box2D2.delete_b2NullContact
2325 __del__ = lambda self : None;
2326 b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
2327 b2NullContact_swigregister(b2NullContact)
2328
2329 class b2ContactManager(b2PairCallback):
2330 """Proxy of C++ b2ContactManager class"""
2331 __swig_setmethods__ = {}
2332 for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2333 __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
2334 __swig_getmethods__ = {}
2335 for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2336 __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
2337 __repr__ = _swig_repr
2338 def __init__(self, *args):
2339 """__init__(self) -> b2ContactManager"""
2340 this = _Box2D2.new_b2ContactManager(*args)
2341 try: self.this.append(this)
2342 except: self.this = this
2343 def PairAdded(*args):
2344 """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
2345 return _Box2D2.b2ContactManager_PairAdded(*args)
2346
2347 def PairRemoved(*args):
2348 """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
2349 return _Box2D2.b2ContactManager_PairRemoved(*args)
2350
2351 def Destroy(*args):
2352 """Destroy(self, b2Contact c)"""
2353 return _Box2D2.b2ContactManager_Destroy(*args)
2354
2355 def Collide(*args):
2356 """Collide(self)"""
2357 return _Box2D2.b2ContactManager_Collide(*args)
2358
2359 __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
2360 __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
2361 if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
2362 __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
2363 __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
2364 if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
2365 __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
2366 __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
2367 if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
2368 __swig_destroy__ = _Box2D2.delete_b2ContactManager
2369 __del__ = lambda self : None;
2370 b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
2371 b2ContactManager_swigregister(b2ContactManager)
2372
2373 class b2TimeStep(_object):
2374 """Proxy of C++ b2TimeStep class"""
2375 __swig_setmethods__ = {}
2376 __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
2377 __swig_getmethods__ = {}
2378 __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
2379 __repr__ = _swig_repr
2380 __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
2381 __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
2382 if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
2383 __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
2384 __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
2385 if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
2386 __swig_setmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_set
2387 __swig_getmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_get
2388 if _newclass:dtRatio = _swig_property(_Box2D2.b2TimeStep_dtRatio_get, _Box2D2.b2TimeStep_dtRatio_set)
2389 __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
2390 __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
2391 if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
2392 __swig_setmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_set
2393 __swig_getmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_get
2394 if _newclass:warmStarting = _swig_property(_Box2D2.b2TimeStep_warmStarting_get, _Box2D2.b2TimeStep_warmStarting_set)
2395 __swig_setmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_set
2396 __swig_getmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_get
2397 if _newclass:positionCorrection = _swig_property(_Box2D2.b2TimeStep_positionCorrection_get, _Box2D2.b2TimeStep_positionCorrection_set)
2398 def __init__(self, *args):
2399 """__init__(self) -> b2TimeStep"""
2400 this = _Box2D2.new_b2TimeStep(*args)
2401 try: self.this.append(this)
2402 except: self.this = this
2403 __swig_destroy__ = _Box2D2.delete_b2TimeStep
2404 __del__ = lambda self : None;
2405 b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
2406 b2TimeStep_swigregister(b2TimeStep)
2407
2408 class b2World(_object):
2409 """Proxy of C++ b2World class"""
2410 __swig_setmethods__ = {}
2411 __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
2412 __swig_getmethods__ = {}
2413 __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
2414 __repr__ = _swig_repr
2415 def __init__(self, *args):
2416 """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
2417 this = _Box2D2.new_b2World(*args)
2418 try: self.this.append(this)
2419 except: self.this = this
2420 __swig_destroy__ = _Box2D2.delete_b2World
2421 __del__ = lambda self : None;
2422 def SetDestructionListener(*args):
2423 """SetDestructionListener(self, b2DestructionListener listener)"""
2424 return _Box2D2.b2World_SetDestructionListener(*args)
2425
2426 def SetBoundaryListener(*args):
2427 """SetBoundaryListener(self, b2BoundaryListener listener)"""
2428 return _Box2D2.b2World_SetBoundaryListener(*args)
2429
2430 def SetContactFilter(*args):
2431 """SetContactFilter(self, b2ContactFilter filter)"""
2432 return _Box2D2.b2World_SetContactFilter(*args)
2433
2434 def SetContactListener(*args):
2435 """SetContactListener(self, b2ContactListener listener)"""
2436 return _Box2D2.b2World_SetContactListener(*args)
2437
2438 def SetDebugDraw(*args):
2439 """SetDebugDraw(self, b2DebugDraw debugDraw)"""
2440 return _Box2D2.b2World_SetDebugDraw(*args)
2441
2442 def CreateBody(*args):
2443 """CreateBody(self, b2BodyDef def) -> b2Body"""
2444 return _Box2D2.b2World_CreateBody(*args)
2445
2446 def DestroyBody(*args):
2447 """DestroyBody(self, b2Body body)"""
2448 return _Box2D2.b2World_DestroyBody(*args)
2449
2450 def CreateJoint(*args):
2451 """CreateJoint(self, b2JointDef def) -> b2Joint"""
2452 return _Box2D2.b2World_CreateJoint(*args)
2453
2454 def DestroyJoint(*args):
2455 """DestroyJoint(self, b2Joint joint)"""
2456 return _Box2D2.b2World_DestroyJoint(*args)
2457
2458 def GetGroundBody(*args):
2459 """GetGroundBody(self) -> b2Body"""
2460 return _Box2D2.b2World_GetGroundBody(*args)
2461
2462 def Step(*args):
2463 """Step(self, float32 timeStep, int32 iterations)"""
2464 return _Box2D2.b2World_Step(*args)
2465
2466 def GetBodyList(*args):
2467 """GetBodyList(self) -> b2Body"""
2468 return _Box2D2.b2World_GetBodyList(*args)
2469
2470 def GetJointList(*args):
2471 """GetJointList(self) -> b2Joint"""
2472 return _Box2D2.b2World_GetJointList(*args)
2473
2474 def Refilter(*args):
2475 """Refilter(self, b2Shape shape)"""
2476 return _Box2D2.b2World_Refilter(*args)
2477
2478 def SetWarmStarting(*args):
2479 """SetWarmStarting(self, bool flag)"""
2480 return _Box2D2.b2World_SetWarmStarting(*args)
2481
2482 def SetPositionCorrection(*args):
2483 """SetPositionCorrection(self, bool flag)"""
2484 return _Box2D2.b2World_SetPositionCorrection(*args)
2485
2486 def SetContinuousPhysics(*args):
2487 """SetContinuousPhysics(self, bool flag)"""
2488 return _Box2D2.b2World_SetContinuousPhysics(*args)
2489
2490 def Validate(*args):
2491 """Validate(self)"""
2492 return _Box2D2.b2World_Validate(*args)
2493
2494 def GetProxyCount(*args):
2495 """GetProxyCount(self) -> int32"""
2496 return _Box2D2.b2World_GetProxyCount(*args)
2497
2498 def GetPairCount(*args):
2499 """GetPairCount(self) -> int32"""
2500 return _Box2D2.b2World_GetPairCount(*args)
2501
2502 def GetBodyCount(*args):
2503 """GetBodyCount(self) -> int32"""
2504 return _Box2D2.b2World_GetBodyCount(*args)
2505
2506 def GetJointCount(*args):
2507 """GetJointCount(self) -> int32"""
2508 return _Box2D2.b2World_GetJointCount(*args)
2509
2510 def GetContactCount(*args):
2511 """GetContactCount(self) -> int32"""
2512 return _Box2D2.b2World_GetContactCount(*args)
2513
2514 def SetGravity(*args):
2515 """SetGravity(self, b2Vec2 gravity)"""
2516 return _Box2D2.b2World_SetGravity(*args)
2517
2518 def Query(*args):
2519 """
2520 Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32
2521 Query(self, b2AABB aabb, uint32 maxCount) -> PyObject
2522 """
2523 return _Box2D2.b2World_Query(*args)
2524
2525 b2World_swigregister = _Box2D2.b2World_swigregister
2526 b2World_swigregister(b2World)
2527
2528 class b2BodyDef(_object):
2529 """Proxy of C++ b2BodyDef class"""
2530 __swig_setmethods__ = {}
2531 __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
2532 __swig_getmethods__ = {}
2533 __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
2534 __repr__ = _swig_repr
2535 def __init__(self, *args):
2536 """__init__(self) -> b2BodyDef"""
2537 this = _Box2D2.new_b2BodyDef(*args)
2538 try: self.this.append(this)
2539 except: self.this = this
2540 __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
2541 __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
2542 if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
2543 __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
2544 __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
2545 if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
2546 __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
2547 __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
2548 if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
2549 __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
2550 __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
2551 if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
2552 __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
2553 __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
2554 if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
2555 __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
2556 __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
2557 if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
2558 __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
2559 __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
2560 if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
2561 __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
2562 __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
2563 if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
2564 __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
2565 __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
2566 if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
2567 __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
2568 __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
2569 if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
2570 __swig_destroy__ = _Box2D2.delete_b2BodyDef
2571 __del__ = lambda self : None;
2572 b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
2573 b2BodyDef_swigregister(b2BodyDef)
2574
2575 class b2Body(_object):
2576 """Proxy of C++ b2Body class"""
2577 __swig_setmethods__ = {}
2578 __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
2579 __swig_getmethods__ = {}
2580 __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
2581 def __init__(self): raise AttributeError, "No constructor defined"
2582 __repr__ = _swig_repr
2583 def CreateShape(*args):
2584 """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
2585 return _Box2D2.b2Body_CreateShape(*args)
2586
2587 def DestroyShape(*args):
2588 """DestroyShape(self, b2Shape shape)"""
2589 return _Box2D2.b2Body_DestroyShape(*args)
2590
2591 def SetMass(*args):
2592 """SetMass(self, b2MassData massData)"""
2593 return _Box2D2.b2Body_SetMass(*args)
2594
2595 def SetMassFromShapes(*args):
2596 """SetMassFromShapes(self)"""
2597 return _Box2D2.b2Body_SetMassFromShapes(*args)
2598
2599 def SetXForm(*args):
2600 """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
2601 return _Box2D2.b2Body_SetXForm(*args)
2602
2603 def GetXForm(*args):
2604 """GetXForm(self) -> b2XForm"""
2605 return _Box2D2.b2Body_GetXForm(*args)
2606
2607 def GetPosition(*args):
2608 """GetPosition(self) -> b2Vec2"""
2609 return _Box2D2.b2Body_GetPosition(*args)
2610
2611 def GetAngle(*args):
2612 """GetAngle(self) -> float32"""
2613 return _Box2D2.b2Body_GetAngle(*args)
2614
2615 def GetWorldCenter(*args):
2616 """GetWorldCenter(self) -> b2Vec2"""
2617 return _Box2D2.b2Body_GetWorldCenter(*args)
2618
2619 def GetLocalCenter(*args):
2620 """GetLocalCenter(self) -> b2Vec2"""
2621 return _Box2D2.b2Body_GetLocalCenter(*args)
2622
2623 def SetLinearVelocity(*args):
2624 """SetLinearVelocity(self, b2Vec2 v)"""
2625 return _Box2D2.b2Body_SetLinearVelocity(*args)
2626
2627 def GetLinearVelocity(*args):
2628 """GetLinearVelocity(self) -> b2Vec2"""
2629 return _Box2D2.b2Body_GetLinearVelocity(*args)
2630
2631 def SetAngularVelocity(*args):
2632 """SetAngularVelocity(self, float32 omega)"""
2633 return _Box2D2.b2Body_SetAngularVelocity(*args)
2634
2635 def GetAngularVelocity(*args):
2636 """GetAngularVelocity(self) -> float32"""
2637 return _Box2D2.b2Body_GetAngularVelocity(*args)
2638
2639 def ApplyForce(*args):
2640 """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
2641 return _Box2D2.b2Body_ApplyForce(*args)
2642
2643 def ApplyTorque(*args):
2644 """ApplyTorque(self, float32 torque)"""
2645 return _Box2D2.b2Body_ApplyTorque(*args)
2646
2647 def ApplyImpulse(*args):
2648 """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
2649 return _Box2D2.b2Body_ApplyImpulse(*args)
2650
2651 def GetMass(*args):
2652 """GetMass(self) -> float32"""
2653 return _Box2D2.b2Body_GetMass(*args)
2654
2655 def GetInertia(*args):
2656 """GetInertia(self) -> float32"""
2657 return _Box2D2.b2Body_GetInertia(*args)
2658
2659 def GetWorldPoint(*args):
2660 """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
2661 return _Box2D2.b2Body_GetWorldPoint(*args)
2662
2663 def GetWorldVector(*args):
2664 """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
2665 return _Box2D2.b2Body_GetWorldVector(*args)
2666
2667 def GetLocalPoint(*args):
2668 """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
2669 return _Box2D2.b2Body_GetLocalPoint(*args)
2670
2671 def GetLocalVector(*args):
2672 """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
2673 return _Box2D2.b2Body_GetLocalVector(*args)
2674
2675 def GetLinearVelocityFromWorldPoint(*args):
2676 """GetLinearVelocityFromWorldPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
2677 return _Box2D2.b2Body_GetLinearVelocityFromWorldPoint(*args)
2678
2679 def GetLinearVelocityFromLocalPoint(*args):
2680 """GetLinearVelocityFromLocalPoint(self, b2Vec2 localPoint) -> b2Vec2"""
2681 return _Box2D2.b2Body_GetLinearVelocityFromLocalPoint(*args)
2682
2683 def IsBullet(*args):
2684 """IsBullet(self) -> bool"""
2685 return _Box2D2.b2Body_IsBullet(*args)
2686
2687 def SetBullet(*args):
2688 """SetBullet(self, bool flag)"""
2689 return _Box2D2.b2Body_SetBullet(*args)
2690
2691 def IsStatic(*args):
2692 """IsStatic(self) -> bool"""
2693 return _Box2D2.b2Body_IsStatic(*args)
2694
2695 def IsDynamic(*args):
2696 """IsDynamic(self) -> bool"""
2697 return _Box2D2.b2Body_IsDynamic(*args)
2698
2699 def IsFrozen(*args):
2700 """IsFrozen(self) -> bool"""
2701 return _Box2D2.b2Body_IsFrozen(*args)
2702
2703 def IsSleeping(*args):
2704 """IsSleeping(self) -> bool"""
2705 return _Box2D2.b2Body_IsSleeping(*args)
2706
2707 def AllowSleeping(*args):
2708 """AllowSleeping(self, bool flag)"""
2709 return _Box2D2.b2Body_AllowSleeping(*args)
2710
2711 def WakeUp(*args):
2712 """WakeUp(self)"""
2713 return _Box2D2.b2Body_WakeUp(*args)
2714
2715 def PutToSleep(*args):
2716 """PutToSleep(self)"""
2717 return _Box2D2.b2Body_PutToSleep(*args)
2718
2719 def GetShapeList(*args):
2720 """GetShapeList(self) -> b2Shape"""
2721 return _Box2D2.b2Body_GetShapeList(*args)
2722
2723 def GetJointList(*args):
2724 """GetJointList(self) -> b2JointEdge"""
2725 return _Box2D2.b2Body_GetJointList(*args)
2726
2727 def GetNext(*args):
2728 """GetNext(self) -> b2Body"""
2729 return _Box2D2.b2Body_GetNext(*args)
2730
2731 def GetUserData(self): # override the C++ version as it does not work.
2732 """Get the specified userData (m_userData)"""
2733 return self.pyGetUserData()
2734
2735
2736 def SetUserData(*args):
2737 """SetUserData(self, void data)"""
2738 return _Box2D2.b2Body_SetUserData(*args)
2739
2740 def GetWorld(*args):
2741 """GetWorld(self) -> b2World"""
2742 return _Box2D2.b2Body_GetWorld(*args)
2743
2744 def __repr__(self):
2745 return "b2Body(Position: %s)" % (self.GetPosition())
2746
2747 def pyGetUserData(*args):
2748 """pyGetUserData(self) -> PyObject"""
2749 return _Box2D2.b2Body_pyGetUserData(*args)
2750
2751 b2Body_swigregister = _Box2D2.b2Body_swigregister
2752 b2Body_swigregister(b2Body)
2753
2754 class b2DistanceJointDef(b2JointDef):
2755 """Proxy of C++ b2DistanceJointDef class"""
2756 __swig_setmethods__ = {}
2757 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2758 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
2759 __swig_getmethods__ = {}
2760 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2761 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
2762 __repr__ = _swig_repr
2763 def __init__(self, *args):
2764 """__init__(self) -> b2DistanceJointDef"""
2765 this = _Box2D2.new_b2DistanceJointDef(*args)
2766 try: self.this.append(this)
2767 except: self.this = this
2768 def Initialize(*args):
2769 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
2770 return _Box2D2.b2DistanceJointDef_Initialize(*args)
2771
2772 __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
2773 __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
2774 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
2775 __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
2776 __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
2777 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
2778 __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
2779 __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
2780 if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
2781 __swig_setmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_set
2782 __swig_getmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_get
2783 if _newclass:frequencyHz = _swig_property(_Box2D2.b2DistanceJointDef_frequencyHz_get, _Box2D2.b2DistanceJointDef_frequencyHz_set)
2784 __swig_setmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_set
2785 __swig_getmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_get
2786 if _newclass:dampingRatio = _swig_property(_Box2D2.b2DistanceJointDef_dampingRatio_get, _Box2D2.b2DistanceJointDef_dampingRatio_set)
2787 __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
2788 __del__ = lambda self : None;
2789 b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
2790 b2DistanceJointDef_swigregister(b2DistanceJointDef)
2791
2792 class b2DistanceJoint(b2Joint):
2793 """Proxy of C++ b2DistanceJoint class"""
2794 __swig_setmethods__ = {}
2795 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2796 __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
2797 __swig_getmethods__ = {}
2798 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2799 __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
2800 __repr__ = _swig_repr
2801 def GetAnchor1(*args):
2802 """GetAnchor1(self) -> b2Vec2"""
2803 return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
2804
2805 def GetAnchor2(*args):
2806 """GetAnchor2(self) -> b2Vec2"""
2807 return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
2808
2809 def GetReactionForce(*args):
2810 """GetReactionForce(self) -> b2Vec2"""
2811 return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
2812
2813 def GetReactionTorque(*args):
2814 """GetReactionTorque(self) -> float32"""
2815 return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
2816
2817 def __init__(self, *args):
2818 """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
2819 this = _Box2D2.new_b2DistanceJoint(*args)
2820 try: self.this.append(this)
2821 except: self.this = this
2822 def InitVelocityConstraints(*args):
2823 """InitVelocityConstraints(self, b2TimeStep step)"""
2824 return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
2825
2826 def SolveVelocityConstraints(*args):
2827 """SolveVelocityConstraints(self, b2TimeStep step)"""
2828 return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
2829
2830 def SolvePositionConstraints(*args):
2831 """SolvePositionConstraints(self) -> bool"""
2832 return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
2833
2834 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
2835 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
2836 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
2837 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
2838 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
2839 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
2840 __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
2841 __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
2842 if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
2843 __swig_setmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_set
2844 __swig_getmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_get
2845 if _newclass:m_frequencyHz = _swig_property(_Box2D2.b2DistanceJoint_m_frequencyHz_get, _Box2D2.b2DistanceJoint_m_frequencyHz_set)
2846 __swig_setmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_set
2847 __swig_getmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_get
2848 if _newclass:m_dampingRatio = _swig_property(_Box2D2.b2DistanceJoint_m_dampingRatio_get, _Box2D2.b2DistanceJoint_m_dampingRatio_set)
2849 __swig_setmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_set
2850 __swig_getmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_get
2851 if _newclass:m_gamma = _swig_property(_Box2D2.b2DistanceJoint_m_gamma_get, _Box2D2.b2DistanceJoint_m_gamma_set)
2852 __swig_setmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_set
2853 __swig_getmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_get
2854 if _newclass:m_bias = _swig_property(_Box2D2.b2DistanceJoint_m_bias_get, _Box2D2.b2DistanceJoint_m_bias_set)
2855 __swig_setmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_set
2856 __swig_getmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_get
2857 if _newclass:m_impulse = _swig_property(_Box2D2.b2DistanceJoint_m_impulse_get, _Box2D2.b2DistanceJoint_m_impulse_set)
2858 __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
2859 __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
2860 if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
2861 __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
2862 __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
2863 if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
2864 def __repr__(self):
2865 return b2JointInfo(self)
2866
2867 __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
2868 __del__ = lambda self : None;
2869 b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
2870 b2DistanceJoint_swigregister(b2DistanceJoint)
2871
2872 class b2MouseJointDef(b2JointDef):
2873 """Proxy of C++ b2MouseJointDef class"""
2874 __swig_setmethods__ = {}
2875 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2876 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
2877 __swig_getmethods__ = {}
2878 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2879 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
2880 __repr__ = _swig_repr
2881 def __init__(self, *args):
2882 """__init__(self) -> b2MouseJointDef"""
2883 this = _Box2D2.new_b2MouseJointDef(*args)
2884 try: self.this.append(this)
2885 except: self.this = this
2886 __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
2887 __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
2888 if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
2889 __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
2890 __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
2891 if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
2892 __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
2893 __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
2894 if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
2895 __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
2896 __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
2897 if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
2898 __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
2899 __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
2900 if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
2901 __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
2902 __del__ = lambda self : None;
2903 b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
2904 b2MouseJointDef_swigregister(b2MouseJointDef)
2905
2906 class b2MouseJoint(b2Joint):
2907 """Proxy of C++ b2MouseJoint class"""
2908 __swig_setmethods__ = {}
2909 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2910 __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
2911 __swig_getmethods__ = {}
2912 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2913 __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
2914 __repr__ = _swig_repr
2915 def GetAnchor1(*args):
2916 """GetAnchor1(self) -> b2Vec2"""
2917 return _Box2D2.b2MouseJoint_GetAnchor1(*args)
2918
2919 def GetAnchor2(*args):
2920 """GetAnchor2(self) -> b2Vec2"""
2921 return _Box2D2.b2MouseJoint_GetAnchor2(*args)
2922
2923 def GetReactionForce(*args):
2924 """GetReactionForce(self) -> b2Vec2"""
2925 return _Box2D2.b2MouseJoint_GetReactionForce(*args)
2926
2927 def GetReactionTorque(*args):
2928 """GetReactionTorque(self) -> float32"""
2929 return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
2930
2931 def SetTarget(*args):
2932 """SetTarget(self, b2Vec2 target)"""
2933 return _Box2D2.b2MouseJoint_SetTarget(*args)
2934
2935 def __init__(self, *args):
2936 """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
2937 this = _Box2D2.new_b2MouseJoint(*args)
2938 try: self.this.append(this)
2939 except: self.this = this
2940 def InitVelocityConstraints(*args):
2941 """InitVelocityConstraints(self, b2TimeStep step)"""
2942 return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
2943
2944 def SolveVelocityConstraints(*args):
2945 """SolveVelocityConstraints(self, b2TimeStep step)"""
2946 return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
2947
2948 def SolvePositionConstraints(*args):
2949 """SolvePositionConstraints(self) -> bool"""
2950 return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
2951
2952 __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
2953 __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
2954 if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
2955 __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
2956 __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
2957 if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
2958 __swig_setmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_set
2959 __swig_getmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_get
2960 if _newclass:m_impulse = _swig_property(_Box2D2.b2MouseJoint_m_impulse_get, _Box2D2.b2MouseJoint_m_impulse_set)
2961 __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
2962 __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
2963 if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
2964 __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
2965 __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
2966 if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
2967 __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
2968 __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
2969 if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
2970 __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
2971 __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
2972 if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
2973 __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
2974 __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
2975 if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
2976 def __repr__(self):
2977 return b2JointInfo(self)
2978
2979 __swig_destroy__ = _Box2D2.delete_b2MouseJoint
2980 __del__ = lambda self : None;
2981 b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
2982 b2MouseJoint_swigregister(b2MouseJoint)
2983
2984 class b2PrismaticJointDef(b2JointDef):
2985 """Proxy of C++ b2PrismaticJointDef class"""
2986 __swig_setmethods__ = {}
2987 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
2988 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
2989 __swig_getmethods__ = {}
2990 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
2991 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
2992 __repr__ = _swig_repr
2993 def __init__(self, *args):
2994 """__init__(self) -> b2PrismaticJointDef"""
2995 this = _Box2D2.new_b2PrismaticJointDef(*args)
2996 try: self.this.append(this)
2997 except: self.this = this
2998 def Initialize(*args):
2999 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
3000 return _Box2D2.b2PrismaticJointDef_Initialize(*args)
3001
3002 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
3003 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
3004 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
3005 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
3006 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
3007 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
3008 __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
3009 __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
3010 if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
3011 __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
3012 __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
3013 if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
3014 __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
3015 __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
3016 if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
3017 __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
3018 __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
3019 if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
3020 __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
3021 __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
3022 if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
3023 __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
3024 __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
3025 if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
3026 __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
3027 __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
3028 if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
3029 __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
3030 __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
3031 if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
3032 __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
3033 __del__ = lambda self : None;
3034 b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
3035 b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
3036
3037 class b2PrismaticJoint(b2Joint):
3038 """Proxy of C++ b2PrismaticJoint class"""
3039 __swig_setmethods__ = {}
3040 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3041 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
3042 __swig_getmethods__ = {}
3043 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3044 __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
3045 __repr__ = _swig_repr
3046 def GetAnchor1(*args):
3047 """GetAnchor1(self) -> b2Vec2"""
3048 return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
3049
3050 def GetAnchor2(*args):
3051 """GetAnchor2(self) -> b2Vec2"""
3052 return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
3053
3054 def GetReactionForce(*args):
3055 """GetReactionForce(self) -> b2Vec2"""
3056 return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
3057
3058 def GetReactionTorque(*args):
3059 """GetReactionTorque(self) -> float32"""
3060 return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
3061
3062 def GetJointTranslation(*args):
3063 """GetJointTranslation(self) -> float32"""
3064 return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
3065
3066 def GetJointSpeed(*args):
3067 """GetJointSpeed(self) -> float32"""
3068 return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
3069
3070 def IsLimitEnabled(*args):
3071 """IsLimitEnabled(self) -> bool"""
3072 return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
3073
3074 def EnableLimit(*args):
3075 """EnableLimit(self, bool flag)"""
3076 return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
3077
3078 def GetLowerLimit(*args):
3079 """GetLowerLimit(self) -> float32"""
3080 return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
3081
3082 def GetUpperLimit(*args):
3083 """GetUpperLimit(self) -> float32"""
3084 return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
3085
3086 def SetLimits(*args):
3087 """SetLimits(self, float32 lower, float32 upper)"""
3088 return _Box2D2.b2PrismaticJoint_SetLimits(*args)
3089
3090 def IsMotorEnabled(*args):
3091 """IsMotorEnabled(self) -> bool"""
3092 return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
3093
3094 def EnableMotor(*args):
3095 """EnableMotor(self, bool flag)"""
3096 return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
3097
3098 def SetMotorSpeed(*args):
3099 """SetMotorSpeed(self, float32 speed)"""
3100 return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
3101
3102 def GetMotorSpeed(*args):
3103 """GetMotorSpeed(self) -> float32"""
3104 return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
3105
3106 def SetMaxMotorForce(*args):
3107 """SetMaxMotorForce(self, float32 force)"""
3108 return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
3109
3110 def GetMotorForce(*args):
3111 """GetMotorForce(self) -> float32"""
3112 return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
3113
3114 def __init__(self, *args):
3115 """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
3116 this = _Box2D2.new_b2PrismaticJoint(*args)
3117 try: self.this.append(this)
3118 except: self.this = this
3119 def InitVelocityConstraints(*args):
3120 """InitVelocityConstraints(self, b2TimeStep step)"""
3121 return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
3122
3123 def SolveVelocityConstraints(*args):
3124 """SolveVelocityConstraints(self, b2TimeStep step)"""
3125 return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
3126
3127 def SolvePositionConstraints(*args):
3128 """SolvePositionConstraints(self) -> bool"""
3129 return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
3130
3131 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
3132 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
3133 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
3134 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
3135 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
3136 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
3137 __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
3138 __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
3139 if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
3140 __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
3141 __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
3142 if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
3143 __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
3144 __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
3145 if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
3146 __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
3147 __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
3148 if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
3149 __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
3150 __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
3151 if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
3152 __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
3153 __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
3154 if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
3155 __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
3156 __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
3157 if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
3158 __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
3159 __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
3160 if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
3161 __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
3162 __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
3163 if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
3164 __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
3165 __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
3166 if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
3167 __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
3168 __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
3169 if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
3170 __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
3171 __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
3172 if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
3173 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
3174 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
3175 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
3176 __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
3177 __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
3178 if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
3179 __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
3180 __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
3181 if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
3182 __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
3183 __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
3184 if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
3185 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
3186 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
3187 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
3188 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
3189 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
3190 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
3191 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
3192 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
3193 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
3194 __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
3195 __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
3196 if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
3197 def __repr__(self):
3198 return b2JointInfo(self)
3199
3200 __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
3201 __del__ = lambda self : None;
3202 b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
3203 b2PrismaticJoint_swigregister(b2PrismaticJoint)
3204
3205 class b2RevoluteJointDef(b2JointDef):
3206 """Proxy of C++ b2RevoluteJointDef class"""
3207 __swig_setmethods__ = {}
3208 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3209 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
3210 __swig_getmethods__ = {}
3211 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3212 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
3213 __repr__ = _swig_repr
3214 def __init__(self, *args):
3215 """__init__(self) -> b2RevoluteJointDef"""
3216 this = _Box2D2.new_b2RevoluteJointDef(*args)
3217 try: self.this.append(this)
3218 except: self.this = this
3219 def Initialize(*args):
3220 """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
3221 return _Box2D2.b2RevoluteJointDef_Initialize(*args)
3222
3223 __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
3224 __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
3225 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
3226 __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
3227 __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
3228 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
3229 __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
3230 __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
3231 if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
3232 __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
3233 __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
3234 if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
3235 __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
3236 __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
3237 if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
3238 __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
3239 __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
3240 if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
3241 __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
3242 __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
3243 if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
3244 __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
3245 __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
3246 if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
3247 __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
3248 __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
3249 if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
3250 __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
3251 __del__ = lambda self : None;
3252 b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
3253 b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
3254
3255 class b2RevoluteJoint(b2Joint):
3256 """Proxy of C++ b2RevoluteJoint class"""
3257 __swig_setmethods__ = {}
3258 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3259 __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
3260 __swig_getmethods__ = {}
3261 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3262 __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
3263 __repr__ = _swig_repr
3264 def GetAnchor1(*args):
3265 """GetAnchor1(self) -> b2Vec2"""
3266 return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
3267
3268 def GetAnchor2(*args):
3269 """GetAnchor2(self) -> b2Vec2"""
3270 return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
3271
3272 def GetReactionForce(*args):
3273 """GetReactionForce(self) -> b2Vec2"""
3274 return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
3275
3276 def GetReactionTorque(*args):
3277 """GetReactionTorque(self) -> float32"""
3278 return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
3279
3280 def GetJointAngle(*args):
3281 """GetJointAngle(self) -> float32"""
3282 return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
3283
3284 def GetJointSpeed(*args):
3285 """GetJointSpeed(self) -> float32"""
3286 return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
3287
3288 def IsLimitEnabled(*args):
3289 """IsLimitEnabled(self) -> bool"""
3290 return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
3291
3292 def EnableLimit(*args):
3293 """EnableLimit(self, bool flag)"""
3294 return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
3295
3296 def GetLowerLimit(*args):
3297 """GetLowerLimit(self) -> float32"""
3298 return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
3299
3300 def GetUpperLimit(*args):
3301 """GetUpperLimit(self) -> float32"""
3302 return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
3303
3304 def SetLimits(*args):
3305 """SetLimits(self, float32 lower, float32 upper)"""
3306 return _Box2D2.b2RevoluteJoint_SetLimits(*args)
3307
3308 def IsMotorEnabled(*args):
3309 """IsMotorEnabled(self) -> bool"""
3310 return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
3311
3312 def EnableMotor(*args):
3313 """EnableMotor(self, bool flag)"""
3314 return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
3315
3316 def SetMotorSpeed(*args):
3317 """SetMotorSpeed(self, float32 speed)"""
3318 return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
3319
3320 def GetMotorSpeed(*args):
3321 """GetMotorSpeed(self) -> float32"""
3322 return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
3323
3324 def SetMaxMotorTorque(*args):
3325 """SetMaxMotorTorque(self, float32 torque)"""
3326 return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
3327
3328 def GetMotorTorque(*args):
3329 """GetMotorTorque(self) -> float32"""
3330 return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
3331
3332 def __init__(self, *args):
3333 """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
3334 this = _Box2D2.new_b2RevoluteJoint(*args)
3335 try: self.this.append(this)
3336 except: self.this = this
3337 def InitVelocityConstraints(*args):
3338 """InitVelocityConstraints(self, b2TimeStep step)"""
3339 return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
3340
3341 def SolveVelocityConstraints(*args):
3342 """SolveVelocityConstraints(self, b2TimeStep step)"""
3343 return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
3344
3345 def SolvePositionConstraints(*args):
3346 """SolvePositionConstraints(self) -> bool"""
3347 return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
3348
3349 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
3350 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
3351 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
3352 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
3353 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
3354 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
3355 __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
3356 __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
3357 if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
3358 __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
3359 __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
3360 if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
3361 __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
3362 __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
3363 if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
3364 __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
3365 __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
3366 if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
3367 __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
3368 __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
3369 if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
3370 __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
3371 __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
3372 if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
3373 __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
3374 __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
3375 if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
3376 __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
3377 __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
3378 if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
3379 __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
3380 __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
3381 if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
3382 __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
3383 __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
3384 if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
3385 __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
3386 __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
3387 if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
3388 __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
3389 __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
3390 if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
3391 __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
3392 __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
3393 if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
3394 __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
3395 __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
3396 if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
3397 def __repr__(self):
3398 return b2JointInfo(self)
3399
3400 __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
3401 __del__ = lambda self : None;
3402 b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
3403 b2RevoluteJoint_swigregister(b2RevoluteJoint)
3404
3405 class b2PulleyJointDef(b2JointDef):
3406 """Proxy of C++ b2PulleyJointDef class"""
3407 __swig_setmethods__ = {}
3408 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3409 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
3410 __swig_getmethods__ = {}
3411 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3412 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
3413 __repr__ = _swig_repr
3414 def __init__(self, *args):
3415 """__init__(self) -> b2PulleyJointDef"""
3416 this = _Box2D2.new_b2PulleyJointDef(*args)
3417 try: self.this.append(this)
3418 except: self.this = this
3419 def Initialize(*args):
3420 """
3421 Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
3422 b2Vec2 anchor1, b2Vec2 anchor2,
3423 float32 ratio)
3424 """
3425 return _Box2D2.b2PulleyJointDef_Initialize(*args)
3426
3427 __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
3428 __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
3429 if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
3430 __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
3431 __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
3432 if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
3433 __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
3434 __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
3435 if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
3436 __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
3437 __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
3438 if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
3439 __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
3440 __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
3441 if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
3442 __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
3443 __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
3444 if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
3445 __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
3446 __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
3447 if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
3448 __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
3449 __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
3450 if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
3451 __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
3452 __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
3453 if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
3454 __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
3455 __del__ = lambda self : None;
3456 b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
3457 b2PulleyJointDef_swigregister(b2PulleyJointDef)
3458 b2_minPulleyLength = cvar.b2_minPulleyLength
3459
3460 class b2PulleyJoint(b2Joint):
3461 """Proxy of C++ b2PulleyJoint class"""
3462 __swig_setmethods__ = {}
3463 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3464 __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
3465 __swig_getmethods__ = {}
3466 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3467 __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
3468 __repr__ = _swig_repr
3469 def GetAnchor1(*args):
3470 """GetAnchor1(self) -> b2Vec2"""
3471 return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
3472
3473 def GetAnchor2(*args):
3474 """GetAnchor2(self) -> b2Vec2"""
3475 return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
3476
3477 def GetReactionForce(*args):
3478 """GetReactionForce(self) -> b2Vec2"""
3479 return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
3480
3481 def GetReactionTorque(*args):
3482 """GetReactionTorque(self) -> float32"""
3483 return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
3484
3485 def GetGroundAnchor1(*args):
3486 """GetGroundAnchor1(self) -> b2Vec2"""
3487 return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
3488
3489 def GetGroundAnchor2(*args):
3490 """GetGroundAnchor2(self) -> b2Vec2"""
3491 return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
3492
3493 def GetLength1(*args):
3494 """GetLength1(self) -> float32"""
3495 return _Box2D2.b2PulleyJoint_GetLength1(*args)
3496
3497 def GetLength2(*args):
3498 """GetLength2(self) -> float32"""
3499 return _Box2D2.b2PulleyJoint_GetLength2(*args)
3500
3501 def GetRatio(*args):
3502 """GetRatio(self) -> float32"""
3503 return _Box2D2.b2PulleyJoint_GetRatio(*args)
3504
3505 def __init__(self, *args):
3506 """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
3507 this = _Box2D2.new_b2PulleyJoint(*args)
3508 try: self.this.append(this)
3509 except: self.this = this
3510 def InitVelocityConstraints(*args):
3511 """InitVelocityConstraints(self, b2TimeStep step)"""
3512 return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
3513
3514 def SolveVelocityConstraints(*args):
3515 """SolveVelocityConstraints(self, b2TimeStep step)"""
3516 return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
3517
3518 def SolvePositionConstraints(*args):
3519 """SolvePositionConstraints(self) -> bool"""
3520 return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
3521
3522 __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
3523 __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
3524 if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
3525 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
3526 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
3527 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
3528 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
3529 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
3530 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
3531 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
3532 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
3533 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
3534 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
3535 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
3536 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
3537 __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
3538 __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
3539 if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
3540 __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
3541 __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
3542 if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
3543 __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
3544 __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
3545 if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
3546 __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
3547 __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
3548 if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
3549 __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
3550 __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
3551 if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
3552 __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
3553 __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
3554 if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
3555 __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
3556 __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
3557 if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
3558 __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
3559 __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
3560 if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
3561 __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
3562 __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
3563 if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
3564 __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
3565 __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
3566 if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
3567 __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
3568 __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
3569 if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
3570 __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
3571 __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
3572 if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
3573 __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
3574 __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
3575 if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
3576 __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
3577 __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
3578 if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
3579 __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
3580 __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
3581 if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
3582 __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
3583 __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
3584 if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
3585 __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
3586 __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
3587 if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
3588 __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
3589 __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
3590 if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
3591 def __repr__(self):
3592 return b2JointInfo(self)
3593
3594 __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
3595 __del__ = lambda self : None;
3596 b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
3597 b2PulleyJoint_swigregister(b2PulleyJoint)
3598
3599 class b2GearJointDef(b2JointDef):
3600 """Proxy of C++ b2GearJointDef class"""
3601 __swig_setmethods__ = {}
3602 for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3603 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
3604 __swig_getmethods__ = {}
3605 for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3606 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
3607 __repr__ = _swig_repr
3608 def __init__(self, *args):
3609 """__init__(self) -> b2GearJointDef"""
3610 this = _Box2D2.new_b2GearJointDef(*args)
3611 try: self.this.append(this)
3612 except: self.this = this
3613 __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
3614 __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
3615 if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
3616 __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
3617 __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
3618 if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
3619 __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
3620 __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
3621 if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
3622 __swig_destroy__ = _Box2D2.delete_b2GearJointDef
3623 __del__ = lambda self : None;
3624 b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
3625 b2GearJointDef_swigregister(b2GearJointDef)
3626
3627 class b2GearJoint(b2Joint):
3628 """Proxy of C++ b2GearJoint class"""
3629 __swig_setmethods__ = {}
3630 for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
3631 __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
3632 __swig_getmethods__ = {}
3633 for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
3634 __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
3635 __repr__ = _swig_repr
3636 def GetAnchor1(*args):
3637 """GetAnchor1(self) -> b2Vec2"""
3638 return _Box2D2.b2GearJoint_GetAnchor1(*args)
3639
3640 def GetAnchor2(*args):
3641 """GetAnchor2(self) -> b2Vec2"""
3642 return _Box2D2.b2GearJoint_GetAnchor2(*args)
3643
3644 def GetReactionForce(*args):
3645 """GetReactionForce(self) -> b2Vec2"""
3646 return _Box2D2.b2GearJoint_GetReactionForce(*args)
3647
3648 def GetReactionTorque(*args):
3649 """GetReactionTorque(self) -> float32"""
3650 return _Box2D2.b2GearJoint_GetReactionTorque(*args)
3651
3652 def GetRatio(*args):
3653 """GetRatio(self) -> float32"""
3654 return _Box2D2.b2GearJoint_GetRatio(*args)
3655
3656 def __init__(self, *args):
3657 """__init__(self, b2GearJointDef data) -> b2GearJoint"""
3658 this = _Box2D2.new_b2GearJoint(*args)
3659 try: self.this.append(this)
3660 except: self.this = this
3661 def InitVelocityConstraints(*args):
3662 """InitVelocityConstraints(self, b2TimeStep step)"""
3663 return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
3664
3665 def SolveVelocityConstraints(*args):
3666 """SolveVelocityConstraints(self, b2TimeStep step)"""
3667 return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
3668
3669 def SolvePositionConstraints(*args):
3670 """SolvePositionConstraints(self) -> bool"""
3671 return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
3672
3673 __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
3674 __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
3675 if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
3676 __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
3677 __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
3678 if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
3679 __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
3680 __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
3681 if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
3682 __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
3683 __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
3684 if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
3685 __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
3686 __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
3687 if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
3688 __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
3689 __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
3690 if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
3691 __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
3692 __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
3693 if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
3694 __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
3695 __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
3696 if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
3697 __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
3698 __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
3699 if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
3700 __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
3701 __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
3702 if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
3703 __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
3704 __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
3705 if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
3706 __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
3707 __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
3708 if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
3709 __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
3710 __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
3711 if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
3712 __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
3713 __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
3714 if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
3715 __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
3716 __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
3717 if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
3718 def __repr__(self):
3719 return b2JointInfo(self)
3720
3721 __swig_destroy__ = _Box2D2.delete_b2GearJoint
3722 __del__ = lambda self : None;
3723 b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
3724 b2GearJoint_swigregister(b2GearJoint)
3725
3726
3727
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 from locals import *
27 from elements import box2d
28
29 class CallbackHandler:
30 # List of contact callbacks and shapes to start them - sorted by type for quicker access
31 # Callbacks are saved as callbacks[callback_type][[function, parameters], ...]
32 callbacks = {}
33
34 def __init__(self, parent):
35 self.parent = parent
36
37 # init callback dict to avoid those slow try
38 # (especially for self.get, as it is called *often*)
39 for i in xrange(10):
40 self.callbacks[i] = []
41
42 def add(self, callback_type, callback_handler, *args):
43 """ Users can add callbacks for certain (or all) collisions
44
45 Parameters:
46 callback_type ......... CALLBACK_CONTACT (nothing else for now)
47 callback_handler ...... a callback function
48 args (optional) ....... a list of parameters which can be used with callbacks.get
49
50 Return:
51 callback_id ... used to remove a callback later (int)
52 """
53 # Create contact listener if required
54 if callback_type in [CALLBACK_CONTACT_ADD, CALLBACK_CONTACT_PERSIST, CALLBACK_CONTACT_REMOVE]:
55 if self.parent.klistener == None:
56 self.parent.klistener = kContactListener(self.get)
57 self.parent.world.SetContactListener( self.parent.klistener )
58 print "* kContactListener added"
59
60 # Get callback dict for this callback_type
61 c = self.callbacks[callback_type]
62
63 # Append to the Callback Dictionary
64 c.append([callback_handler, args])
65 self.callbacks[callback_type] = c
66
67 # Return Callback ID
68 # ID = callback_type.callback_index (1...n)
69 return "%i.%i" % (callback_type, len(c))
70
71 def get(self, callback_type):
72 return self.callbacks[callback_type]
73
74 def start(self, callback_type, *args):
75 callbacks = self.get(callback_type)
76 for c in callbacks:
77 callback, params = c
78 callback()
79
80 class kContactListener(box2d.b2ContactListener):
81 def __init__(self, get_callbacks):
82 # Init the Box2D b2ContactListener
83 box2d.b2ContactListener.__init__(self)
84
85 # Function to get the current callbacks
86 self.get_callbacks = get_callbacks
87
88 def check_contact(self, contact_type, point):
89 # Checks if a callback should be started with this contact point
90 contacts = self.get_callbacks(contact_type)
91
92 # Step through all callbacks for this type (eg ADD, PERSIST, REMOVE)
93 for c in contacts:
94 callback, bodylist = c
95 if len(bodylist) == 0:
96 # Without bodylist it's a universal callback (for all bodies)
97 callback(point)
98
99 else:
100 # This is a callback with specified bodies
101 # See if this contact involves one of the specified
102 b1 = str(point.shape1.GetBody())
103 b2 = str(point.shape2.GetBody())
104 for s in bodylist:
105 s = str(s)
106 if b1 == s or b2 == s:
107 # Yes, that's the one :)
108 callback(point)
109
110 def Add(self, point):
111 """Called when a contact point is created"""
112 self.check_contact(CALLBACK_CONTACT_ADD, point)
113
114 def Persist(self, point):
115 """Called when a contact point persists for more than a time step"""
116 self.check_contact(CALLBACK_CONTACT_PERSIST, point)
117
118 def Remove(self, point):
119 """Called when a contact point is removed"""
120 self.check_contact(CALLBACK_CONTACT_REMOVE, point)
121
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 from locals import *
27
28 class Camera:
29 """ The Camera class. We will see :)
30 Please also see: http://www.assembla.com/spaces/elements/tickets/31
31
32 This class currently handles:
33 - Scaling factor
34 - Screen Offset from the World Coordinate System
35
36 Inputs from the user have to be checked for them.
37 - Places to check for it: elements.py, drawing.py, add_objects.py
38
39 """
40 scale_factor = 1.0 # All coords to the renderer are multiplied with the scale factor in elements.draw()
41 track_body = None # Body which means to be tracked. Offset is set at each elements.draw()
42
43 def __init__(self, parent):
44 self.parent = parent
45
46 def track(self, body):
47 """ Start tracking a specific body
48 """
49 self.track_body = body
50
51 def track_stop(self):
52 """ Stop tracking a body
53 """
54 self.track_body = None
55
56 def center(self, pos, screenCoord=True, stopTrack=True):
57 """ Centers the camera at given screen coordinates -- in pixel
58 Typical call: world.camera.center(event.pos)
59
60 Problem: Works ONLY WITH screenCoord now!
61 """
62 x, y = pos
63
64 x -= self.parent.display_width / 2
65 y -= self.parent.display_height / 2
66
67 if screenCoord:
68 x /= self.scale_factor
69 y /= self.scale_factor
70
71 # Set the offset
72 self.inc_offset((x, y), screenCoord, stopTrack)
73
74 def set_offset(self, offset, screenCoord=True, stopTrack=True):
75 """ Set an offset from the screen to the world cs
76 -- in screen (or world) coordinates and in pixel
77 """
78 # Stop tracking of an object
79 if stopTrack: self.track_stop()
80
81 # If screenCoords, we have to bring them to the world cs
82 if screenCoord: x, y = self.parent.to_world(offset)
83 else: x, y = offset
84
85 self._set_offset((x/self.parent.ppm, y/self.parent.ppm))
86
87 def inc_offset(self, offset, screenCoord=True, stopTrack=True):
88 """ Increment an offset from the screen to the world cs -- in world coordinates and in pixel
89 """
90 # Stop tracking of an object
91 if stopTrack: self.track_stop()
92
93 # Get Current Offset
94 x, y = self.parent.screen_offset_pixel
95 dx, dy = offset
96
97 # Bring the directions into the world coordinate system
98 if screenCoord:
99 if self.parent.inputAxis_x_left: dx *= -1
100 if self.parent.inputAxis_y_down: dy *= -1
101
102 # Set New Offset
103 self._set_offset(((x+dx)/self.parent.ppm, (y+dy)/self.parent.ppm))
104
105 def _set_offset(self, offset):
106 """ Set the screen offset to the world coordinate system
107 (using meters and the world coordinate system's orientation)
108 """
109 x, y = offset
110 self.parent.screen_offset = (x, y)
111 self.parent.screen_offset_pixel = (x*self.parent.ppm, y*self.parent.ppm)
112
113 def set_scale_factor(self, factor=1.0):
114 """ Zoom factor for the renderer 1.0 = 1:1 (original)
115 """
116 self.scale_factor = factor
117
118 def inc_scale_factor(self, factor=0.0):
119 """ Increases the zooms for the renderer a given factor
120 """
121 self.scale_factor += factor
122
123
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 from math import pi
27 from math import cos
28 from math import sin
29 from math import sqrt
30
31 import tools
32
33 # Functions of a rendering class
34 # mandatory:
35 # __init__
36 # start_drawing
37 # after_drawing
38 # draw_circle
39 # draw_polygon
40 # draw_lines
41 # set_lineWidth
42 #
43 # renderer-specific mandatory functions:
44 # for pygame:
45 # set_surface
46 # for cairo:
47 # draw_text
48 # for opengl:
49 #
50
51 # IMPORTANT
52 # The drawing functions get the coordinates in their screen coordinate system
53 # no need for translations anymore :)
54
55 class draw_pygame(object):
56 """ This class handles the drawing with pygame, which is really
57 simple since we only need draw_ellipse and draw_polygon.
58 """
59 lineWidth = 0
60
61 def __init__(self):
62 """ Load pygame.draw and pygame.Rect, and reference it for
63 the drawing methods
64
65 Parameters:
66 surface .... pygame surface (default: None)
67 lineWidth ..
68
69 Return: Class draw_pygame()
70 """
71 print "* Pygame selected as renderer"
72 from pygame import draw
73 from pygame import Rect
74
75 self.draw = draw
76 self.Rect = Rect
77
78 def set_lineWidth(self, lw):
79 """
80 """
81 self.lineWidth = lw
82
83 def set_surface(self, surface):
84 """
85 """
86 self.surface = surface
87
88 def get_surface(self):
89 """
90 """
91 return self.surface
92
93 def start_drawing(self):
94 pass
95
96 def after_drawing(self):
97 pass
98
99 def draw_circle(self, clr, pt, radius, angle):
100 """ Draw a circle
101
102 Parameters:
103 pt ........ (x, y)
104 clr ....... color in rgb ((r), (g), (b))
105 radius .... circle radius
106 angle ..... rotation in radians
107
108 Return: -
109 """
110 x, y = pt
111
112 x1 = x - radius
113 y1 = y - radius
114
115 rect = self.Rect( [x1, y1, 2*radius, 2*radius] )
116 self.draw.ellipse(self.surface, clr, rect, self.lineWidth)
117
118 # draw the orientation vector
119 if radius > 10:
120 rx = cos(angle) * radius
121 ry = -sin(angle) * radius
122
123 self.draw.line(self.surface, (255,255,255), pt, (x+rx, y+ry))
124
125 def draw_polygon(self, clr, points):
126 """ Draw a polygon
127
128 Parameters:
129 clr ....... color in rgb ((r), (g), (b))
130 points .... polygon points in normal (x,y) positions
131
132 Return: -
133 """
134 self.draw.polygon(self.surface, clr, points, self.lineWidth)
135 #self.draw.aalines(self.surface, clr, True, points)
136
137 def draw_lines(self, clr, closed, points, width=None):
138 """ Draw a polygon
139
140 Parameters:
141 clr ....... color in rgb ((r), (g), (b))
142 points .... polygon points in normal (x,y) positions
143
144 Return: -
145 """
146 if width == None:
147 lw = self.lineWidth
148 else:
149 lw = width
150
151 self.draw.lines(self.surface, clr, closed, points, lw)
152
153 class draw_cairo(object):
154 """ This class handles the drawing with cairo, which is really
155 simple since we only need draw_ellipse and draw_polygon.
156 """
157 window = None
158 da = None
159 circle_surface = None
160 box_surface = None
161
162 def __init__(self, drawMethod="filled"):
163 """ Load cairo.draw and cairo.Rect, and reference it for
164 the drawing methods
165
166 Return: Class draw_cairo()
167 """
168 print "* Cairo selected as renderer"
169 import cairo
170 self.cairo = cairo
171 self.set_drawing_method(drawMethod)
172 #self.draw_box = self.draw_box_image
173
174 def set_lineWidth(self, lw): # unused
175 self.lineWidth = lw
176
177 def set_drawing_area(self, da):
178 """ Set the area for Cairo to draw to
179
180 da ...... drawing area (gtk.DrawingArea)
181
182 Return: -
183 """
184 self.da = da
185 self.window = da.window
186 print "* Cairo renderer drawing area set"
187
188 def set_drawing_method(self, type):
189 """ type = filled, image """
190 self.draw_circle = getattr(self, "draw_circle_%s" % type)
191 #self.draw_box = getattr(self, "draw_box_%s" % type)
192
193 def start_drawing(self):
194 self.width, self.height = self.window.get_size()
195 self.imagesurface = self.cairo.ImageSurface(self.cairo.FORMAT_ARGB32, self.width, self.height);
196 self.ctx = ctx = self.cairo.Context(self.imagesurface)
197
198 ctx.set_source_rgb(0, 0, 0) # background color
199 ctx.paint()
200
201 ctx.move_to(0, 0)
202 ctx.set_source_rgb(0, 0, 0) # defaults for the rest of the drawing
203 ctx.set_line_width(1)
204 ctx.set_tolerance(0.1)
205
206 ctx.set_line_join(self.cairo.LINE_CAP_BUTT)
207 # LINE_CAP_BUTT, LINE_CAP_ROUND, LINE_CAP_SQUARE, LINE_JOIN_BEVEL, LINE_JOIN_MITER, LINE_JOIN_ROUND
208
209 #ctx.set_dash([20/4.0, 20/4.0], 0)
210
211 def after_drawing(self):
212 dest_ctx = self.window.cairo_create()
213 dest_ctx.set_source_surface(self.imagesurface)
214 dest_ctx.paint()
215
216 def set_circle_image(self, filename):
217 self.circle_surface = self.cairo.ImageSurface.create_from_png(filename)
218 self.draw_circle = self.draw_circle_image
219
220 # def set_box_image(self, filename):
221 # self.box_surface = self.cairo.ImageSurface.create_from_png(filename)
222 # self.draw_box = self.draw_box_image
223
224 def draw_circle_filled(self, clr, pt, radius, angle=0):
225 x, y = pt
226
227 clr = tools.rgb2floats(clr)
228 self.ctx.set_source_rgb(*clr)
229 self.ctx.move_to(x, y)
230 self.ctx.arc(x, y, radius, 0, 2*3.1415)
231 self.ctx.fill()
232
233 def draw_circle():
234 pass
235
236 def draw_circle_image(self, clr, pt, radius, angle=0, sf=None):
237 if sf == None:
238 sf = self.circle_surface
239 x, y = pt
240 self.ctx.save()
241 self.ctx.translate(x, y)
242 self.ctx.rotate(-angle)
243 image_r = sf.get_width() / 2
244 scale = float(radius) / image_r
245 self.ctx.scale(scale, scale)
246 self.ctx.translate(-0.5*sf.get_width(), -0.5*sf.get_height())
247 self.ctx.set_source_surface(sf)
248 self.ctx.paint()
249 self.ctx.restore()
250
251 def draw_image(self, source, pt, scale=1.0, rot=0, sourcepos=(0,0)):
252 self.ctx.save()
253 self.ctx.rotate(rot)
254 self.ctx.scale(scale, scale)
255 destx, desty = self.ctx.device_to_user_distance(pt[0], pt[1])
256 self.ctx.set_source_surface(source, destx-sourcepos[0], desty-sourcepos[1])
257 self.ctx.rectangle(destx, desty, source.get_width(), source.get_height())
258 self.ctx.fill()
259 self.ctx.restore()
260
261 def draw_polygon(self, clr, points):
262 """ Draw a polygon
263
264 Parameters:
265 clr ....... color in rgb ((r), (g), (b))
266 points .... polygon points in normal (x,y) positions
267
268 Return: -
269 """
270 clr = tools.rgb2floats(clr)
271 self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
272
273 pt = points[0]
274 self.ctx.move_to(pt[0], pt[1])
275 for pt in points[1:]:
276 self.ctx.line_to(pt[0], pt[1])
277
278 self.ctx.fill()
279
280 def draw_text(self, text, center, clr=(0,0,0), size=12, fontname="Georgia"):
281 clr = tools.rgb2floats(clr)
282 self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
283
284 self.ctx.select_font_face(fontname, self.cairo.FONT_SLANT_NORMAL, self.cairo.FONT_WEIGHT_NORMAL)
285 self.ctx.set_font_size(size)
286 x_bearing, y_bearing, width, height = self.ctx.text_extents(text)[:4]
287 self.ctx.move_to(center[0] + 0.5 - width / 2 - x_bearing, center[1] + 0.5 - height / 2 - y_bearing)
288 self.ctx.show_text(text)
289
290 def draw_lines(self, clr, closed, points):
291 """ Draw a polygon
292
293 Parameters:
294 clr ....... color in rgb ((r), (g), (b))
295 closed .... whether or not to close the lines (as a polygon)
296 points .... polygon points in normal (x,y) positions
297 Return: -
298 """
299 clr = tools.rgb2floats(clr)
300 self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
301
302 pt = points[0]
303 self.ctx.move_to(pt[0], pt[1])
304 for pt in points[1:]:
305 self.ctx.line_to(pt[0], pt[1])
306
307 if closed:
308 pt = points[0]
309 self.ctx.line_to(pt[0], pt[1])
310
311 self.ctx.stroke()
312
313 class draw_opengl_pyglet(object):
314 """ This class handles the drawing with pyglet
315 """
316 lineWidth = 0
317 def __init__(self):
318 """ Load pyglet.gl, and reference it for the drawing methods
319
320 Parameters:
321 surface .... not used with pyglet
322 lineWidth ..
323 """
324 print "* OpenGL_Pyglet selected as renderer"
325
326 from pyglet import gl
327 self.gl = gl
328
329 def set_lineWidth(self, lw):
330 self.lineWidth = lw
331
332 def draw_circle(self, clr, pt, radius, a=0):
333 clr = tools.rgb2floats(clr)
334 self.gl.glColor3f(clr[0], clr[1], clr[2])
335
336 x, y = pt
337 segs = 15
338 coef = 2.0*pi/segs;
339
340 self.gl.glBegin(self.gl.GL_LINE_LOOP)
341 for n in range(segs):
342 rads = n*coef
343 self.gl.glVertex2f(radius*cos(rads + a) + x, radius*sin(rads + a) + y)
344 self.gl.glVertex2f(x,y)
345 self.gl.glEnd()
346
347 def draw_polygon(self, clr, points):
348 clr = tools.rgb2floats(clr)
349 self.gl.glColor3f(clr[0], clr[1], clr[2])
350
351 self.gl.glBegin(self.gl.GL_LINES)
352
353 p1 = points[0]
354 for p in points[1:]:
355 x1, y1 = p1
356 x2, y2 = p1 = p
357
358 self.gl.glVertex2f(x1, y1)
359 self.gl.glVertex2f(x2, y2)
360
361 x1, y1 = points[0]
362
363 self.gl.glVertex2f(x2, y2)
364 self.gl.glVertex2f(x1, y1)
365
366 self.gl.glEnd()
367
368 def draw_lines(self, clr, closed, points):
369 pass
370
371 def start_drawing(self):
372 pass
373
374 def after_drawing(self):
375 pass
0 #!/usr/bin/python
1 """
2 This file is part of the 'Elements' Project
3 Elements is a 2D Physics API for Python (supporting Box2D2)
4
5 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
6
7 Home: http://elements.linuxuser.at
8 IRC: #elements on irc.freenode.org
9
10 Code: http://www.assembla.com/wiki/show/elements
11 svn co http://svn2.assembla.com/svn/elements
12
13 License: GPLv3 | See LICENSE for the full text
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 """
27 __version__= '0.1'
28 __contact__ = '<elements@linuxuser.at>'
29
30 # Load Box2D
31 import box2d
32
33 # Standard Imports
34 from random import shuffle
35
36 # Load Elements Definitions
37 from locals import *
38
39 # Load Elements Modules
40 import tools
41 import drawing
42 import add_objects
43 import callbacks
44 import camera
45
46 # Main Class
47 class Elements:
48 """The class which handles all interaction with the box2d engine
49 """
50 # Settings
51 run_physics = True # Can pause the simulation
52 element_count = 0 # Element Count
53 renderer = None # Drawing class (from drawing.py)
54 input = INPUT_PIXELS # Default Input in Pixels! (can change to INPUT_METERS)
55 line_width = 0 # Line Width in Pixels (0 for fill)
56 klistener = None
57
58 screen_offset = (0, 0) # Offset screen from world coordinate system (x, y) [meter5]
59 screen_offset_pixel = (0, 0) # Offset screen from world coordinate system (x, y) [pixel]
60
61 # The internal coordination system is y+=up, x+=right
62 # But it's possible to change the input coords to something else,
63 # they will then be translated on input
64 inputAxis_x_left = False # positive to the right by default
65 inputAxis_y_down = True # positive to up by default
66
67 mouseJoint = None
68
69 def __init__(self, screen_size, gravity=(0.0,-9.0), ppm=100.0, renderer='pygame'):
70 """ Init the world with boundaries and gravity, and init colors.
71
72 Parameters:
73 screen_size .. (w, h) -- screen size in pixels [int]
74 gravity ...... (x, y) in m/s^2 [float] default: (0.0, -9.0)
75 ppm .......... pixels per meter [float] default: 100.0
76 renderer ..... which drawing method to use (str) default: 'pygame'
77
78 Return: class Elements()
79 """
80 self.set_screenSize(screen_size)
81 self.set_drawingMethod(renderer)
82
83 # Create Subclasses
84 self.add = add_objects.Add(self)
85 self.callbacks = callbacks.CallbackHandler(self)
86 self.camera = camera.Camera(self)
87
88 # Set Boundaries
89 self.worldAABB=box2d.b2AABB()
90 self.worldAABB.lowerBound.Set(-100.0, -100.0)
91 self.worldAABB.upperBound.Set(100.0, 100.0)
92
93 # Gravity + Bodies will sleep on outside
94 gx, gy = gravity
95 self.gravity = box2d.b2Vec2(gx, gy);
96 self.doSleep = True
97
98 # Create the World
99 self.world = box2d.b2World(self.worldAABB, self.gravity, self.doSleep)
100
101 # Init Colors
102 self.init_colors()
103
104 # Set Pixels per Meter
105 self.ppm = ppm
106
107 def set_inputUnit(self, input):
108 """ Change the input unit to either meter or pixels
109
110 Parameters:
111 input ... INPUT_METERS or INPUT_PIXELS
112
113 Return: -
114 """
115 self.input = input
116
117 def set_inputAxisOrigin(self, left=True, top=False):
118 """ Change the origin of the input coordinate system axis
119
120 Parameters:
121 left ... True or False -- x = 0 is at the left?
122 top .... True or False -- y = 0 is at the top?
123
124 Return: -
125 """
126 self.inputAxis_x_left = not left
127 self.inputAxis_y_down = top
128
129 def set_drawingMethod(self, m, *kw):
130 """ Set a drawing method (from drawing.py)
131
132 Parameters:
133 m .... 'pygame' or 'cairo'
134 *kw .. keywords to pass to the initializer of the drawing method
135
136 Return: True if ok, False if no method identifier m found
137 """
138 try:
139 self.renderer = getattr(drawing, "draw_%s" % m) (*kw)
140 return True
141 except AttributeError:
142 return False
143
144 def set_screenSize(self, size):
145 """ Set the current screen size
146
147 Parameters:
148 size ... (int(width), int(height)) in pixels
149
150 Return: -
151 """
152 self.display_width, self.display_height = size
153
154 def init_colors(self):
155 """ Init self.colors with a fix set of hex colors
156
157 Return: -
158 """
159 self.fixed_color = None
160 self.cur_color = 0
161 self.colors = [
162 "#737934", "#729a55", "#040404", "#1d4e29", "#ae5004", "#615c57",
163 "#6795ce", "#203d61", "#8f932b"
164 ]
165 shuffle(self.colors)
166
167 def set_color(self, clr):
168 """ Set a fixed color for all future Elements (until reset_color() is called)
169
170 Parameters:
171 clr ... Hex '#123123' or RGB ((r), (g), (b))
172
173 Return: -
174 """
175 self.fixed_color = clr
176
177 def reset_color(self):
178 """ All Elements from now on will be drawn in random colors
179
180 Return: -
181 """
182 self.fixed_color = None
183
184 def get_color(self):
185 """ Get a color - either the fixed one or the next from self.colors
186
187 Return: clr = ((R), (G), (B))
188 """
189 if self.fixed_color != None:
190 return self.fixed_color
191
192 if self.cur_color == len(self.colors):
193 self.cur_color = 0
194 shuffle(self.colors)
195
196 clr = self.colors[self.cur_color]
197 if clr[0] == "#":
198 clr = tools.hex2rgb(clr)
199
200 self.cur_color += 1
201 return clr
202
203 def update(self, fps=50.0, iterations=10):
204 """ Update the physics, if not paused (self.run_physics)
205
206 Parameters:
207 fps ......... fps with which the physics engine shall work
208 iterations .. substeps per step for smoother simulation
209
210 Return: -
211 """
212 if self.run_physics:
213 self.world.Step(1.0 / fps, iterations);
214
215 def translate_coord(self, point):
216 """ Flips the coordinates in another coordinate system orientation, if necessary
217 (screen <> world coordinate system)
218 """
219 x, y = point
220
221 if self.inputAxis_x_left:
222 x = self.display_width - x
223
224 if self.inputAxis_y_down:
225 y = self.display_height - y
226
227 return (x, y)
228
229 def translate_coords(self, pointlist):
230 """ Flips the coordinates in another coordinate system orientation, if necessary
231 (screen <> world coordinate system)
232 """
233 p_out = []
234 for p in pointlist:
235 p_out.append(self.translate_coord(p))
236 return p_out
237
238 def to_world(self, pos):
239 """ Transfers a coordinate from the screen to the world coordinate system (pixels)
240 - Change to the right axis orientation
241 - Include the offset: screen -- world coordinate system
242 """
243 dx, dy = self.screen_offset_pixel
244
245 x = pos[0] / self.camera.scale_factor
246 y = pos[1] / self.camera.scale_factor
247
248 x, y = self.translate_coord((round(x), round(y)))
249 return (x+dx, y+dy)
250
251 def to_screen(self, pos):
252 """ Transfers a coordinate from the world to the screen coordinate system (pixels)
253 and by the screen offset
254 """
255 dx, dy = self.screen_offset_pixel
256 x = pos[0] - dx
257 y = pos[1] - dy
258
259 sx, sy = self.translate_coord((x, y))
260 return (sx * self.camera.scale_factor, sy * self.camera.scale_factor)
261
262 def meter_to_screen(self, i):
263 return i * self.ppm * self.camera.scale_factor
264
265 def get_bodies_at_pos(self, search_point, include_static=False, area=0.01):
266 """ Check if given point (screen coordinates) is inside any body.
267 If yes, return all found bodies, if not found return False
268 """
269 sx, sy = self.to_world(search_point)
270 sx /= self.ppm # le sigh, screen2world returns pixels, so convert them to meters here.
271 sy /= self.ppm
272
273 f = area/self.camera.scale_factor
274
275 AABB=box2d.b2AABB()
276 AABB.lowerBound.Set(sx-f, sy-f);
277 AABB.upperBound.Set(sx+f, sy+f);
278
279 amount, shapes = self.world.Query(AABB, 2)
280
281 if amount == 0:
282 return False
283 else:
284 bodylist = []
285 for s in shapes:
286 body = s.GetBody()
287 if not include_static:
288 if body.IsStatic() or body.GetMass() == 0.0:
289 continue
290
291 if s.TestPoint(body.GetXForm(), box2d.b2Vec2(sx, sy)):
292 bodylist.append(body)
293
294 return bodylist
295
296 def draw(self):
297 """ If a drawing method is specified, this function passes the objects
298 to the module in pixels.
299
300 Return: True if the objects were successfully drawn
301 False if the renderer was not set or another error occurred
302 """
303 self.callbacks.start(CALLBACK_DRAWING_START)
304
305 # No need to run through the loop if there's no way to draw
306 if not self.renderer:
307 return False
308
309 if self.camera.track_body:
310 # Get Body Center
311 p1 = self.camera.track_body.GetWorldCenter()
312
313 # Center the Camera There, False = Don't stop the tracking
314 self.camera.center(self.to_screen((p1.x*self.ppm, p1.y*self.ppm)), stopTrack=False)
315
316 # Walk through all known elements
317 body = self.world.GetBodyList()
318 self.renderer.start_drawing()
319
320 while body:
321 xform = body.GetXForm()
322 shape = body.GetShapeList()
323 angle = body.GetAngle()
324
325 if shape:
326 userdata = body.GetUserData()
327 clr = userdata['color']
328
329 while shape:
330 type = shape.GetType()
331
332 if type == box2d.e_circleShape:
333 circle = shape.asCircle()
334 position = box2d.b2Mul(xform, circle.GetLocalPosition())
335
336 pos = self.to_screen((position.x*self.ppm, position.y*self.ppm))
337 self.renderer.draw_circle(clr, pos, self.meter_to_screen(circle.GetRadius()), angle)
338
339 elif type == box2d.e_polygonShape:
340 poly = shape.asPolygon()
341 points = []
342 for i in xrange(poly.GetVertexCount()):
343 pt = box2d.b2Mul(xform, poly.getVertex(i))
344 x, y = self.to_screen((pt.x*self.ppm, pt.y*self.ppm))
345 points.append([x, y])
346
347 self.renderer.draw_polygon(clr, points)
348
349 else:
350 print " unknown shape type:%d" % shape.GetType()
351
352 shape = shape.GetNext()
353 body = body.GetNext()
354
355 joint = self.world.GetJointList()
356 while joint:
357 p2 = joint.GetAnchor1()
358 p2 = self.to_screen((p2.x*self.ppm, p2.y*self.ppm))
359
360 p1 = joint.GetAnchor2()
361 p1 = self.to_screen((p1.x*self.ppm, p1.y*self.ppm))
362
363 if p1 == p2: # Fixation
364 self.renderer.draw_circle((255,0,0), p1, 4, 0)
365 else: # Object to object joint
366 self.renderer.draw_lines((0,0,0), False, [p1, p2], 3)
367 joint = joint.GetNext()
368
369 self.callbacks.start(CALLBACK_DRAWING_END)
370 self.renderer.after_drawing()
371
372 return True
373
374
375 def mouse_move(self, pos):
376 pos = self.to_world(pos)
377 x, y = pos
378 x /= self.ppm
379 y /= self.ppm
380
381 if self.mouseJoint:
382 self.mouseJoint.SetTarget(box2d.b2Vec2(x,y))
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 INPUT_METERS = 0
27 INPUT_PIXELS = 1
28
29 CALLBACK_CONTACT_ADD = 0
30 CALLBACK_CONTACT_PERSIST = 1
31 CALLBACK_CONTACT_REMOVE = 2
32
33 CALLBACK_DRAWING_START = 3
34 CALLBACK_DRAWING_END = 4
35
36 FLT_EPSILON = 1.192092896e-07
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 import pygame
27 from pygame.locals import *
28
29 import tools
30
31 COLOR_HEX_BLUE1 = "6491a4"
32 COLOR_HEX_BLUE2 = "9ec9ff"
33
34 class MenuItem:
35 # padding [px]: left, top, right, bottom
36 padding = (5, 2, 5, 2)
37
38 def empty(self, *args):
39 pass
40
41 def __init__(self, title, pos, userData, parent=None, callback=None):
42 self.title = title
43 self.userData = userData
44 self.parent = parent
45 self.childs = []
46
47 if self.parent:
48 self.visible = False
49 else:
50 self.visible = True
51
52 if callback:
53 self.callback = callback
54 else:
55 self.callback = self.empty
56
57 # Create Surface and Stuff :)
58 self.font = pygame.font.Font(None, 32)
59 text = self.font.render(title, 1, (255,255,255))
60
61 rx, ry, rw, rh = rect = text.get_rect()
62 pl, pt, pr, pb = self.padding
63
64 s1 = pygame.Surface((rw+pl+pr, rh+pt+pb))
65 s1.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
66 s1.blit(text, (pl, pt))
67
68 s2 = pygame.Surface((rw+pl+pr, rh+pt+pb))
69 s2.fill(tools.hex2rgb(COLOR_HEX_BLUE2))
70 s2.blit(text, (pl, pt))
71
72 self.rect = s1.get_rect().move(pos)
73
74 self.surface_inactive = s1
75 self.surface_active = s2
76
77 def pos_inside(self, pos):
78 if not self.visible:
79 return False
80
81 x,y,w,h = self.rect
82 px, py = pos
83
84 if px > x and px < x+w and py > y and py < y+h:
85 return True
86 else:
87 return False
88
89 class MenuClass:
90 """ Important: Never delete an Item, just overwrite it if deleting,
91 else the menuitem id's get messed up
92 """
93 # current active menu point it
94 focus = False
95
96 # each item is stored as MenuItem
97 items = []
98
99 # where to start drawing
100 start_at = (0,0)
101
102 # menubar properties
103 height = 0 # px
104 width = 0 # px (set in set_width)
105 setWidth = False # if width was set by hand (if not, increase width by adding stuff)
106
107 def __init__(self):
108 self.draw_at = self.start_at
109
110 def set_width(self, width):
111 self.setWidth = True
112 self.width = width
113
114 def addItem(self, title, callback=None, userData='', parent=None):
115 # Get position for the Item
116 if parent: draw_at = (0,0)
117 else: draw_at = self.draw_at
118
119 # Create Items
120 M = MenuItem(title=title, pos=draw_at, userData=userData, parent=parent, callback=callback)
121 self.items.append(M)
122
123 # Set a new position
124 x,y,w,h = M.rect
125 x, y = self.draw_at
126
127 if parent:
128 # Set the info that the item has a child to the parent item
129 self.items[parent-1].childs.append(len(self.items)-1)
130
131 else:
132 # New next drawing position
133 self.draw_at = (x+w, y)
134
135 # Adjust the width of the menu bar
136 if not self.setWidth:
137 self.width = x+w
138
139 # Adjust the height of the menu bar
140 if h > self.height: self.height = h + 2
141
142 # Return array id of this item
143 return len(self.items)
144
145 def click(self, pos):
146 """ Checks a click for menuitems and starts the callback if found
147
148 Return: True if a menu item was found or hit the MenuBar, and False if not
149 """
150 focus_in = self.focus
151
152 found = False
153 for i in xrange(len(self.items)):
154 item = self.items[i]
155 if item.pos_inside(pos):
156 found = True
157 item.callback(item.title, item.userData)
158
159 # Expand the menu if necessary
160 if len(item.childs) > 0:
161 self.focus = i+1
162
163 # Close any opened menu windows if clicked somewhere else
164 if self.focus == focus_in:
165 self.focus = False
166 self.subwin_rect = (0,0,0,0)
167 for item in self.items:
168 if item.parent:
169 item.visible = False
170
171 # Check if click is inside menubar
172 x,y = pos
173 mx, my = self.start_at
174
175 if found:
176 return True
177 else:
178 return False
179
180 def draw(self, surface):
181 """ Draw the menu with pygame on a given surface
182 """
183 s = pygame.Surface((self.width, self.height))
184 s.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
185
186 surface.blit(s, (0,0))
187
188 for i in xrange(len(self.items)):
189 item = self.items[i]
190 if not item.parent:
191 x,y,w,h = item.rect
192 if self.focus == i+1:
193 surface.blit(item.surface_active, (x,y))
194 else:
195 surface.blit(item.surface_inactive, (x,y))
196
197 # If a menu item is open, draw that
198 if self.focus:
199 width = 0
200 height = 0
201
202 i = []
203 for j in self.items:
204 if j.parent == self.focus:
205 i.append(j)
206 x, y, w, h = j.rect
207 if w > width: width = w
208 height += h
209
210 if len(i) > 0:
211 s = pygame.Surface((width, height))
212 s.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
213
214 # Parent Coordinates
215 px, py, pw, ph = self.items[self.focus-1].rect
216
217 # y Counter
218 y = 0
219
220 for item in i:
221 item.visible = True
222 s.blit(item.surface_inactive, (0, y))
223
224 ix, iy, iw, ih = item.rect
225 if (ix, iy) == (0, 0):
226 item.rect = item.rect.move((px, y+ph))
227 ix, iy, iw, ih = item.rect
228
229 if iw < width:
230 item.rect = (ix,iy,width,ih)
231
232 y += ih
233
234 surface.blit(s, (px,py+ph))
235 self.subwin_rect = s.get_rect().move(px, py+ph)
236
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 # Some Hex Tools
27 def hex2dec(hex):
28 """ Convert and hex value in a decimal number
29 """
30 return int(hex, 16)
31
32 def hex2rgb(hex):
33 """ Convert a hex color (#123abc) in RGB ((r), (g), (b))
34 """
35 if hex[0:1] == '#': hex = hex[1:];
36 return (hex2dec(hex[:2]), hex2dec(hex[2:4]), hex2dec(hex[4:6]))
37
38 def rgb2floats(rgb):
39 """Convert a color in the RGB (0..255,0..255,0..255) format to the
40 (0..1, 0..1, 0..1) float format
41 """
42 ret = []
43 for c in rgb:
44 ret.append(float(c) / 255)
45 return ret
46
47 def point_in_poly(point, poly):
48 #print ">", point, poly
49 x, y = point
50 n = len(poly)
51 inside = False
52 p1x,p1y = poly[0]
53 for i in range(n+1):
54 p2x,p2y = poly[i % n]
55 if y > min(p1y,p2y):
56 if y <= max(p1y,p2y):
57 if x <= max(p1x,p2x):
58 if p1y != p2y:
59 xinters = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
60 if p1x == p2x or x <= xinters:
61 inside = not inside
62 p1x,p1y = p2x,p2y
63 return inside
64
0 """
1 This file is part of the 'Elements' Project
2 Elements is a 2D Physics API for Python (supporting Box2D2)
3
4 Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
5
6 Home: http://elements.linuxuser.at
7 IRC: #elements on irc.freenode.org
8
9 Code: http://www.assembla.com/wiki/show/elements
10 svn co http://svn2.assembla.com/svn/elements
11
12 License: GPLv3 | See LICENSE for the full text
13 This program is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 """
26 from functools import partial
27
28 from math import fabs
29 from math import sqrt
30 from math import atan
31 from math import atan2
32 from math import degrees
33 from math import acos
34
35 from locals import *
36 from elements import box2d
37
38 def ComputeCentroid(pd):
39 count = pd.vertexCount
40
41 if count < 3:
42 return False
43
44 c = box2d.b2Vec2(0, 0)
45 area = 0.0
46
47 # pRef is the reference point for forming triangles.
48 # It's location doesn't change the result (except for rounding error).
49 pRef = box2d.b2Vec2(0.0, 0.0)
50
51 inv3 = 1.0 / 3.0
52
53 for i in range(count):
54 # Triangle vertices.
55 p1 = pRef
56 p2 = pd.getVertex(i)
57 if i + 1 < count:
58 p3 = pd.getVertex(i+1)
59 else: p3 = pd.getVertex(0)
60
61 e1 = p2 - p1
62 e2 = p3 - p1
63
64 D = box2d.b2Cross(e1, e2)
65
66 triangleArea = 0.5 * D
67 area += triangleArea
68
69 # Area weighted centroid
70 c += triangleArea * inv3 * (p1 + p2 + p3)
71
72 # Centroid
73 # if area < FLT_EPSILON:
74 #raise ValueError, "ComputeCentroid: area < FLT_EPSILON"
75
76 return c / area
77
78 def checkDef(pd):
79 """Check the polygon definition for invalid vertices, etc.
80
81 Return: True if valid, False if invalid
82 """
83
84 # if pd.vertexCount < 3 or pd.vertexCount > box2d.b2_maxPolygonVertices:
85 #raise ValueError, "Invalid vertexCount"
86
87 threshold = FLT_EPSILON * FLT_EPSILON
88 verts = pd.getVertices_b2Vec2()
89 normals = []
90 v0 = verts[0]
91 for i in range(pd.vertexCount):
92 if i == pd.vertexCount-1:
93 v1 = verts[0]
94 else: v1 = verts[i+1]
95 edge=v1 - v0
96 # if edge.LengthSquared() < threshold:
97 # raise ValueError, "edge.LengthSquared < FLT_EPSILON**2"
98 normals.append( box2d.b2Cross(edge, 1.0) )
99 normals[-1].Normalize()
100 v0=v1
101
102 centroid = ComputeCentroid(pd)
103
104 d=box2d.b2Vec2()
105 for i in range(pd.vertexCount):
106 i1 = i - 1
107 if i1 < 0: i1 = pd.vertexCount - 1
108 i2 = i
109 n1 = normals[i1]
110 n2 = normals[i2]
111 v = verts[i] - centroid
112
113 d.x = box2d.b2Dot(n1, v) - box2d.b2_toiSlop
114 d.y = box2d.b2Dot(n2, v) - box2d.b2_toiSlop
115
116 # Shifting the edge inward by b2_toiSlop should
117 # not cause the plane to pass the centroid.
118
119 # Your shape has a radius/extent less than b2_toiSlop.
120 # if d.x < 0.0 or d.y <= 0.0:
121 # raise ValueError, "Your shape has a radius/extent less than b2_toiSlop."
122
123 A = box2d.b2Mat22()
124 A.col1.x = n1.x; A.col2.x = n1.y
125 A.col1.y = n2.x; A.col2.y = n2.y
126 #coreVertices[i] = A.Solve(d) + m_centroid
127
128 return True
129
130 def calc_center(points):
131 """ Calculate the center of a polygon
132
133 Return: The center (x,y)
134 """
135 tot_x, tot_y = 0,0
136 for p in points:
137 tot_x += p[0]
138 tot_y += p[1]
139 n = len(points)
140 return (tot_x/n, tot_y/n)
141
142 def poly_center_vertices(pointlist):
143 """ Rearranges vectors around the center
144
145 Return: pointlist ([(x, y), ...])
146 """
147 poly_points_center = []
148 center = cx, cy = calc_center(pointlist)
149
150 for p in pointlist:
151 x = p[0] - cx
152 y = cy - p[1]
153 poly_points_center.append((x, y))
154
155 return poly_points_center
156
157 def is_line(vertices, tolerance=25.0):
158 """ Check if passed vertices are a line. Done by comparing
159 the angles of all vectors and check tolerance.
160
161 Parameters:
162 vertices ... a list of vertices (x, y)
163 tolerance .. how many degrees should be allowed max to be a line
164
165 Returns: True if line, False if no line
166 """
167 if len(vertices) <= 2:
168 return True
169
170 # Step 1: Points -> Vectors
171 p_old = vertices[0]
172 alphas = []
173
174
175 for p in vertices[1:]:
176 x1, y1 = p_old
177 x2, y2 = p
178 p_old = p
179
180 # Create Vector
181 vx, vy = (x2-x1, y2-y1)
182
183 # Check Length
184 l = sqrt((vx*vx) + (vy*vy))
185 if l == 0.0: continue
186
187 # Normalize vector
188 vx /= l
189 vy /= l
190
191 # Append angle
192 if fabs(vx) < 0.2: alpha = 90.0
193 else: alpha = degrees(atan(vy / vx))
194
195 alphas.append(fabs(alpha))
196
197 # Sort angles
198 alphas.sort()
199
200 # Get maximum difference
201 alpha_diff = fabs(alphas[-1] - alphas[0])
202 print "alpha difference:", alpha_diff
203
204 if alpha_diff < tolerance:
205 return True
206 else:
207 return False
208
209 def reduce_poly_by_angle(vertices, tolerance=10.0, minlen=20):
210 """ This function reduces a poly by the angles of the vectors (detect lines)
211 If the angle difference from one vector to the last > tolerance: use last point
212 If the angle is quite the same, it's on the line
213
214 Parameters:
215 vertices ... a list of vertices (x, y)
216 tolerance .. how many degrees should be allowed max
217
218 Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
219 """
220 v_last = vertices[-1]
221 vertices = vxx = reduce_poly(vertices, minlen)
222
223 p_new = []
224 p_new.append(vertices[0])
225
226 dir = None
227 is_convex = True
228
229 for i in xrange(len(vertices)-1):
230 if i == 0:
231 p_old = vertices[i]
232 continue
233
234 x1, y1 = p_old
235 x2, y2 = vertices[i]
236 x3, y3 = vertices[i+1]
237 p_old = vertices[i]
238
239 # Create Vectors
240 v1x = (x2 - x1) * 1.0
241 v1y = (y2 - y1) * 1.0
242
243 v2x = (x3 - x2) * 1.0
244 v2y = (y3 - y2) * 1.0
245
246 # Calculate angle
247 a = ((v1x * v2x) + (v1y * v2y))
248 b = sqrt((v1x*v1x) + (v1y*v1y))
249 c = sqrt((v2x*v2x) + (v2y*v2y))
250
251 # No Division by 0 :)
252 if (b*c) == 0.0: continue
253
254 # Get the current degrees
255 # We have a bug here sometimes...
256 try:
257 angle = degrees(acos(a / (b*c)))
258 except:
259 # cos=1.0
260 print "cos=", a/(b*c)
261 continue
262
263 # Check if inside tolerance
264 if fabs(angle) > tolerance:
265 p_new.append(vertices[i])
266 # print "x", 180-angle, is_left(vertices[i-1], vertices[i], vertices[i+1])
267
268 # Check if convex:
269 if dir == None:
270 dir = is_left(vertices[i-1], vertices[i], vertices[i+1])
271 else:
272 if dir != is_left(vertices[i-1], vertices[i], vertices[i+1]):
273 is_convex = False
274
275 # We also want to append the last point :)
276 p_new.append(v_last)
277
278 # Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
279 return p_new, is_convex
280
281 """ OLD FUNCTION: """
282 # Wipe all points too close to each other
283 vxx = vertices = reduce_poly(vertices, minlen)
284
285 # Create Output List
286 p_new = []
287 p_new.append(vertices[0])
288
289 # Set the starting vertice
290 p_old = vertices[0]
291 alpha_old = None
292
293 # For each vector, compare the angle difference to the last one
294 for i in range(1, len(vertices)):
295 x1, y1 = p_old
296 x2, y2 = vertices[i]
297 p_old = (x2, y2)
298
299 # Make Vector
300 vx, vy = (x2-x1, y2-y1)
301
302 # Vector length
303 l = sqrt((vx*vx) + (vy*vy))
304
305 # normalize
306 vx /= l
307 vy /= l
308
309 # Get Angle
310 if fabs(vx) < 0.2:
311 alpha = 90
312 else:
313 alpha = degrees(atan(vy * 1.0) / (vx*1.0))
314
315 if alpha_old == None:
316 alpha_old = alpha
317 continue
318
319 # Get difference to previous angle
320 alpha_diff = fabs(alpha - alpha_old)
321 alpha_old = alpha
322
323 # If the new vector differs from the old one, we add the old point
324 # to the output list, as the line changed it's way :)
325 if alpha_diff > tolerance:
326 #print ">",alpha_diff, "\t", vx, vy, l
327 p_new.append(vertices[i-1])
328
329 # We also want to append the last point :)
330 p_new.append(vertices[-1])
331
332 # Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
333 return p_new, vxx
334
335
336 # The following functions is_left, reduce_poly and convex_hull are
337 # from the pymunk project (http://code.google.com/p/pymunk/)
338 def is_left(p0, p1, p2):
339 """Test if p2 is left, on or right of the (infinite) line (p0,p1).
340
341 :return: > 0 for p2 left of the line through p0 and p1
342 = 0 for p2 on the line
343 < 0 for p2 right of the line
344 """
345 sorting = (p1[0] - p0[0])*(p2[1]-p0[1]) - (p2[0]-p0[0])*(p1[1]-p0[1])
346 if sorting > 0: return 1
347 elif sorting < 0: return -1
348 else: return 0
349
350 def is_convex(points):
351 """Test if a polygon (list of (x,y)) is strictly convex or not.
352
353 :return: True if the polygon is convex, False otherwise
354 """
355 #assert len(points) > 2, "not enough points to form a polygon"
356
357 p0 = points[0]
358 p1 = points[1]
359 p2 = points[2]
360
361 xc, yc = 0, 0
362 is_same_winding = is_left(p0, p1, p2)
363 for p2 in points[2:] + [p0] + [p1]:
364 if is_same_winding != is_left(p0, p1, p2):
365 return False
366 a = p1[0] - p0[0], p1[1] - p0[1] # p1-p0
367 b = p2[0] - p1[0], p2[1] - p1[1] # p2-p1
368 if sign(a[0]) != sign(b[0]): xc +=1
369 if sign(a[1]) != sign(b[1]): yc +=1
370 p0, p1 = p1, p2
371
372 return xc <= 2 and yc <= 2
373
374 def sign(x):
375 if x < 0: return -1
376 else: return 1
377
378
379 def reduce_poly(points, tolerance=50):
380 """Remove close points to simplify a polyline
381 tolerance is the min distance between two points squared.
382
383 :return: The reduced polygon as a list of (x,y)
384 """
385 curr_p = points[0]
386 reduced_ps = [points[0]]
387
388 for p in points[1:]:
389 x1, y1 = curr_p
390 x2, y2 = p
391 dx = fabs(x2 - x1)
392 dy = fabs(y2 - y1)
393 l = sqrt((dx*dx) + (dy*dy))
394 if l > tolerance:
395 curr_p = p
396 reduced_ps.append(p)
397
398 return reduced_ps
399
400 def convex_hull(points):
401 """Create a convex hull from a list of points.
402 This function uses the Graham Scan Algorithm.
403
404 :return: Convex hull as a list of (x,y)
405 """
406 ### Find lowest rightmost point
407 p0 = points[0]
408 for p in points[1:]:
409 if p[1] < p0[1]:
410 p0 = p
411 elif p[1] == p0[1] and p[0] > p0[0]:
412 p0 = p
413 points.remove(p0)
414
415 ### Sort the points angularly about p0 as center
416 f = partial(is_left, p0)
417 points.sort(cmp = f)
418 points.reverse()
419 points.insert(0, p0)
420
421 ### Find the hull points
422 hull = [p0, points[1]]
423
424 for p in points[2:]:
425
426 pt1 = hull[-1]
427 pt2 = hull[-2]
428 l = is_left(pt2, pt1, p)
429 if l > 0:
430 hull.append(p)
431 else:
432 while l <= 0 and len(hull) > 2:
433 hull.pop()
434 pt1 = hull[-1]
435 pt2 = hull[-2]
436 l = is_left(pt2, pt1, p)
437 hull.append(p)
438 return hull
439
150150
151151 def playWave(sound='horse', pitch=1, amplitude=1, loop=False, duration=1, starttime=0, pitch_envelope='default', amplitude_envelope='default'):
152152 """Play a wave file (sound = ['horse'], pitch = [1], amplitude = [1], loop = [False], duration = [1], starttime = [0], pitch_envelope=['default'], amplitude_envelope=['default'])"""
153 fullname = finddir() + str(sound)
153 if '/' in sound:
154 fullname = sound
155 else:
156 fullname = finddir() + str(sound)
154157
155158 if loop == False: lp = 0
156159 else: lp = 1
0 #!/usr/bin/python
1 # -*- coding: utf-8 -*-
02 # Copyright 2007 Chris Ball, based on Collabora's "hellomesh" demo.
13 #
24 # This program is free software; you can redistribute it and/or modify
4244 PATH = "/org/laptop/Pippy"
4345
4446 text_buffer = None
47 # magic prefix to use utf-8 source encoding
48 PYTHON_PREFIX="""#!/usr/bin/python
49 # -*- coding: utf-8 -*-
50 """
4551
4652 class PippyActivity(ViewSourceActivity):
4753 """Pippy Activity as specified in activity.info"""
136142 self.text_view.set_cursor_visible(True)
137143 self.text_view.set_show_line_numbers(True)
138144 self.text_view.set_wrap_mode(gtk.WRAP_CHAR)
139 self.text_view.modify_font(pango.FontDescription("Monospace 10"))
145 self.text_view.modify_font(pango.FontDescription("Monospace 8"))
140146
141147 # We could change the color theme here, if we want to.
142148 #mgr = gtksourceview2.style_manager_get_default()
180186
181187 # The vte python window
182188 self._vte = vte.Terminal()
189 self._vte.set_encoding('utf-8')
183190 self._vte.set_size(30, 5)
184191 self._vte.set_size_request(200, 300)
185 font = 'Monospace 10'
192 font = 'Monospace 8'
186193 self._vte.set_font(pango.FontDescription(font))
187194 self._vte.set_colors(gtk.gdk.color_parse ('#000000'),
188195 gtk.gdk.color_parse ('#E7E7E7'),
266273 text = text_buffer.get_text(start, end)
267274
268275 with open(filename, 'w') as f:
276 # write utf-8 coding prefix if there's not already one
277 if re.match(r'coding[:=]\s*([-\w.]+)',
278 '\n'.join(text.splitlines()[:2])) is None:
279 f.write(PYTHON_PREFIX)
269280 for line in text:
270281 f.write(line)
271282 def _reset_vte(self):
399410
400411 def read_file(self, file_path):
401412 text = open(file_path).read()
413 # discard the '#!/usr/bin/python' and 'coding: utf-8' lines, if present
414 text = re.sub(r'^' + re.escape(PYTHON_PREFIX), '', text)
402415 global text_buffer
403416 text_buffer.set_text(text)
404417
600613 """
601614
602615 PIPPY_DEFAULT_ICON = \
603 """<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
604 <!ENTITY stroke_color "#010101">
605 <!ENTITY fill_color "#FFFFFF">
606 ]><svg enable-background="new 0 0 55 55" height="55px" version="1.1"
607 viewBox="0 0 55 55" width="55px" x="0px" y="0px" xml:space="preserve"
608 xmlns="http://www.w3.org/2000/svg"
609 xmlns:xlink="http://www.w3.org/1999/xlink"
610 ><g display="block" id="activity-icon"><path
611 d="M 28.497,48.507 C 34.485,48.507 43.377,45.669 43.377,37.322 C 43.377,32.6795 41.44125,30.14375 39.104125,28.651125 C 36.767,27.1585 38.482419,26.816027 39.758087,25.662766 C 39.42248,24.275242 37.206195,22.826987 36.262179,21.037968 C 34.005473,20.582994 27.526,19.113 30.314,19.113 C 30.314,19.113 36.946,22.777 42.58,19.853 C 44.168,19.03 47.012,15.185 47.012,12.533 C 47.012,9.88 37.831,6.814 35.045,6.814 C 32.257,6.814 29.886,10.661 29.886,10.661 C 24.312,10.661 12.043878,16.258005 12.043878,21.564005 C 12.043878,24.216505 16.585399,30.069973 19.144694,33.736352 C 22.438716,38.455279 27.257,31.3065 30.444,31.885 C 33.407,32.354 35.885,34.105 35.322,37.323 C 34.865,39.936 32.327,42.629 26.961,42.629 C 22.709,42.629 13.661,42.41 12.216,38.55 C 11.287,36.064 12.384,33.345 13.778,33.345 L 13.751,33.185 C 12.331,33.027 8.203,33.345 8.203,38.65 C 8.202,45.452 17.347,48.507 28.497,48.507 z "
612 fill="&fill_color;" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" />
613 <path d="M42.579,19.854c-2.623-0.287-6.611-2-7.467-5.022" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-width="3"/>
614 <circle cx="35.805" cy="10.96" fill="&stroke_color;" r="1.676"/>
615 </g></svg><!-- " -->
616 """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
617 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
618 <!ENTITY ns_svg "http://www.w3.org/2000/svg">
619 <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
620 <!ENTITY stroke_color "#000000">
621 <!ENTITY fill_color "#FFFFFF">
622 ]><!--"-->
623 <svg version="1.1" id="Pippy_activity" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="47.585" height="49.326"
624 viewBox="0 0 47.585 49.326" overflow="visible" enable-background="new 0 0 47.585 49.326" xml:space="preserve">
625
626 <path
627 fill="&fill_color;" stroke="&stroke_color;" stroke-width="2" d="M 30.689595,16.460324 L 24.320145,12.001708 L 2.7550028,23.830689 L 23.319231,38.662412 L 45.157349,26.742438 L 36.877062,21.100925" id="path3195" />
628 <path
629 fill="&fill_color;" stroke="&stroke_color;" stroke-width="2"
630 nodetypes="cscscssscsssssccc"
631 d="M 12.201296,21.930888 C 13.063838,20.435352 17.035411,18.617621 20.372026,18.965837 C 22.109464,19.147161 24.231003,20.786115 24.317406,21.584638 C 24.401593,22.43057 25.386617,24.647417 26.88611,24.600494 C 28.114098,24.562065 28.61488,23.562481 28.992123,22.444401 C 28.992123,22.444401 28.564434,17.493894 31.897757,15.363536 C 32.836646,14.763482 35.806711,14.411448 37.249047,15.221493 C 38.691382,16.031536 37.648261,19.495598 36.785717,20.991133 C 35.923174,22.48667 32.967872,24.980813 32.967872,24.980813 C 31.242783,27.971884 29.235995,28.5001 26.338769,28.187547 C 23.859153,27.920046 22.434219,26.128159 21.837191,24.708088 C 21.323835,23.487033 20.047743,22.524906 18.388178,22.52176 C 17.218719,22.519542 14.854476,23.017137 16.212763,25.620664 C 16.687174,26.53 18.919175,28.917592 21.08204,29.521929 C 22.919903,30.035455 26.713699,31.223552 30.30027,31.418089 C 26.770532,33.262079 21.760623,32.530604 18.909599,31.658168 C 17.361253,30.887002 9.0350995,26.651992 12.201296,21.930888 z "
632 id="path2209" />
633 <path
634 fill="&fill_color;" stroke="&stroke_color;" stroke-width="1"
635 d="M 37.832194,18.895786 C 36.495131,19.851587 34.017797,22.097672 32.3528,21.069911"
636 id="path2211"
637 transform-center-y="-3.6171625"
638 transform-center-x="-0.50601649" />
639 <circle
640 fill="&stroke_color;" stroke="none" stroke-width="0"
641 cx="33.926998"
642 cy="6.073"
643 r="1.927"
644 id="circle2213"
645 transform="matrix(0.269108,-0.4665976,-0.472839,-0.2655557,26.503175,35.608682)"
646 />
647 </svg>
616648 """
617649
618650 ############# ACTIVITY META-INFORMATION ###############
620652
621653 def pippy_activity_version():
622654 """Returns the version number of the generated activity bundle."""
623 return 14
655 return 29
624656 def pippy_activity_extra_files():
625657 """Returns a map of 'extra' files which should be included in the
626658 generated activity bundle."""
650682 def pippy_activity_mime_types():
651683 """Return the mime types handled by the generated activity, as a list."""
652684 return 'text/x-python'
685 def pippy_activity_extra_info():
686 return """
687 license = GPLv2+
688 update_url = http://wiki.laptop.org/go/Activities/G1G1"""
653689
654690 ################# ACTIVITY BUNDLER ################
655691
738774 copy2(sourcefile, '%s/pippy_app.py' % app_temp)
739775 # write MANIFEST file.
740776 with open('%s/MANIFEST' % app_temp, 'w') as f:
741 for dirpath, dirnames, filenames in os.walk(app_temp):
742 for name in filenames:
777 for dirpath, dirnames, filenames in sorted(os.walk(app_temp)):
778 for name in sorted(filenames):
743779 fn = os.path.join(dirpath, name).replace(app_temp+'/', '')
744780 if fn=='MANIFEST': continue
745781 f.write('%s\n' % fn)
747783 olddir = os.getcwd()
748784 oldargv = sys.argv
749785 os.chdir(app_temp)
750 sys.argv = [ 'setup.py', 'dist' ]
751 bundlebuilder.start(pytitle)
786 sys.argv = [ 'setup.py', 'dist_xo' ]
787 bundlebuilder.start()
752788 sys.argv = oldargv
753789 os.chdir(olddir)
754790 # move to destination directory.
755 copy2('%s/%s-%d.xo' % (app_temp, pytitle, bundle_info['version']),
791 copy2('%s/dist/%s-%d.xo' % (app_temp, pytitle, bundle_info['version']),
756792 '%s/%s-%d.xo' % (options.dir, pytitle, bundle_info['version']))
757793 finally:
758794 rmtree(app_temp, ignore_errors=True)
11 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22 # This file is distributed under the same license as the PACKAGE package.
33 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #, fuzzy
54 msgid ""
65 msgstr ""
76 "Project-Id-Version: PACKAGE VERSION\n"
87 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2008-02-12 00:30-0500\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8 "POT-Creation-Date: 2008-05-27 00:30-0400\n"
9 "PO-Revision-Date: 2008-06-26 13:44-0400\n"
10 "Last-Translator: Jude Augusma <jayme2901@yahoo.com>\n"
1211 "Language-Team: LANGUAGE <LL@li.org>\n"
1312 "MIME-Version: 1.0\n"
1413 "Content-Type: text/plain; charset=UTF-8\n"
1514 "Content-Transfer-Encoding: 8bit\n"
16 "X-Generator: Translate Toolkit 1.0.1\n"
15 "X-Generator: Pootle 1.1.0rc2\n"
1716
1817 #: activity/activity.info:2
1918 msgid "Pippy"
20 msgstr ""
19 msgstr "Pippy"
2120
2221 #: activity.py:26
2322 #, python-format
2423 msgid "%s Source"
25 msgstr ""
24 msgstr "%s Sous"
25
26 #: activity.py:62
27 msgid "Copy selected text to clipboard"
28 msgstr "Kopye tèks chwazi-a sou ekritwa"
29
30 #: activity.py:67
31 msgid "Edit"
32 msgstr "Korije"
2633
2734 #: library/pippy/game.py:19
2835 msgid "PAUSED"
29 msgstr ""
36 msgstr "Poze"
3037
31 #: pippy_app.py:57
38 #: library/pippy/sound.py:179
39 msgid "Please install TamTamEdit's sound library."
40 msgstr "Souple intale korektè TamTam librèri son."
41
42 #: pippy_app.py:61
3243 msgid "As Pippy Document"
33 msgstr ""
44 msgstr "Kòm dokiman Pippy"
3445
35 #: pippy_app.py:62
46 #: pippy_app.py:66
3647 msgid "As Activity Bundle"
37 msgstr ""
48 msgstr "Kòm pakè aktivite"
3849
39 #: pippy_app.py:79
50 #: pippy_app.py:83
4051 msgid "Examples"
41 msgstr ""
52 msgstr "Ezanp yo"
4253
43 #: pippy_app.py:147
54 #: pippy_app.py:152
4455 msgid "_Run!"
45 msgstr ""
56 msgstr "_Fè mache!"
4657
47 #: pippy_app.py:235
58 #: pippy_app.py:252
4859 #, python-format
4960 msgid "%s Activity"
50 msgstr ""
61 msgstr "%s Aktivite"
5162
52 #: pippy_app.py:290
63 #: pippy_app.py:308
5364 msgid "Save as Activity Error"
54 msgstr ""
65 msgstr "Sove kòm Aktivite Erè"
5566
56 #: pippy_app.py:291
67 #: pippy_app.py:309
5768 msgid ""
5869 "Please give your activity a meaningful name before attempting to save it as "
5970 "an activity."
6071 msgstr ""
72 "Souple bay aktivite ou-a yon non siyifikatif avan ou tante sove-l kòm yon "
73 "aktivite."
6174
62 #: pippy_app.py:293
75 #: pippy_app.py:311
6376 msgid "Ok"
64 msgstr ""
77 msgstr "Ok"
6578
66 #: pippy_app.py:299
79 #: pippy_app.py:317
6780 msgid "Creating activity bundle..."
68 msgstr ""
81 msgstr "pakè aktivite an kreyasyon..."
6982
70 #: pippy_app.py:358
83 #: pippy_app.py:376
7184 msgid "Activity saved to journal."
72 msgstr ""
85 msgstr "Aktivite sove nan jounal."
0 # SOME DESCRIPTIVE TITLE.
0 # translation of pippy-activity.po to Sinhalese
11 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22 # This file is distributed under the same license as the PACKAGE package.
33 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #, fuzzy
54 msgid ""
65 msgstr ""
7 "Project-Id-Version: PACKAGE VERSION\n"
6 "Project-Id-Version: pippy-activity\n"
87 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2008-01-08 18:47+0000\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
8 "POT-Creation-Date: 2008-05-27 00:30-0400\n"
9 "PO-Revision-Date: 2008-07-18 06:33-0400\n"
10 "Last-Translator: Rashan Anushka <rashan.uoc@gmail.com>\n"
11 "Language-Team: Sinhalese <en@li.org>\n"
1312 "MIME-Version: 1.0\n"
1413 "Content-Type: text/plain; charset=UTF-8\n"
1514 "Content-Transfer-Encoding: 8bit\n"
16 "X-Generator: Translate Toolkit 1.0.1\n"
15 "X-Generator: Pootle 1.1.0rc2\n"
1716
1817 #: activity/activity.info:2
1918 msgid "Pippy"
20 msgstr ""
19 msgstr "පිපී"
2120
2221 #: activity.py:26
2322 #, python-format
2423 msgid "%s Source"
25 msgstr ""
24 msgstr "%s මූලය"
25
26 #: activity.py:62
27 msgid "Copy selected text to clipboard"
28 msgstr "තෝරන ලද පෙළ පසුරු පුවරුවට පිටපත් කරන්න"
29
30 #: activity.py:67
31 msgid "Edit"
32 msgstr "සකසන්න"
2633
2734 #: library/pippy/game.py:19
2835 msgid "PAUSED"
29 msgstr ""
36 msgstr "විරාමයක් ගෙන ඇත"
3037
31 #: pippy_app.py:57
38 #: library/pippy/sound.py:179
39 msgid "Please install TamTamEdit's sound library."
40 msgstr "කරුණාකර ටැම්ටැම්එඩිට් හි නාද ආගාරය ස්ථාපනය කරන්න"
41
42 #: pippy_app.py:61
3243 msgid "As Pippy Document"
33 msgstr ""
44 msgstr "පිපී ලිපියක් ලෙස"
3445
35 #: pippy_app.py:62
46 #: pippy_app.py:66
3647 msgid "As Activity Bundle"
37 msgstr ""
48 msgstr "ක්‍රියාකාරකම් පොදියක් ලෙස"
3849
39 #: pippy_app.py:79
50 #: pippy_app.py:83
4051 msgid "Examples"
41 msgstr ""
52 msgstr "උදාහරණ"
4253
43 #: pippy_app.py:147
54 #: pippy_app.py:152
4455 msgid "_Run!"
45 msgstr ""
56 msgstr "දුවන්න!(_R)"
4657
47 #: pippy_app.py:235
58 #: pippy_app.py:252
4859 #, python-format
4960 msgid "%s Activity"
50 msgstr ""
61 msgstr "%s ක්‍රියාකාරකම"
5162
52 #: pippy_app.py:290
63 #: pippy_app.py:308
5364 msgid "Save as Activity Error"
54 msgstr ""
65 msgstr "ක්‍රියාකාරකම් දෝෂයක් ලෙස සුරකින්න"
5566
56 #: pippy_app.py:291
67 #: pippy_app.py:309
5768 msgid ""
5869 "Please give your activity a meaningful name before attempting to save it as "
5970 "an activity."
6071 msgstr ""
72 "ක්‍රියාකාරකමක් ලෙස සුරකීමට පෙර කරුණාකර ඔබගේ ක්‍රියාකාරකමට අර්ථවත් නමක් "
73 "දෙන්න."
6174
62 #: pippy_app.py:293
75 #: pippy_app.py:311
6376 msgid "Ok"
64 msgstr ""
77 msgstr "හරි"
6578
66 #: pippy_app.py:299
79 #: pippy_app.py:317
6780 msgid "Creating activity bundle..."
68 msgstr ""
81 msgstr "ක්‍රියාකාරකම් පොදියක් සාදයි..."
6982
70 #: pippy_app.py:358
83 #: pippy_app.py:376
7184 msgid "Activity saved to journal."
72 msgstr ""
85 msgstr "ක්‍රියාකාරකම ජ'නලයට සුරකින ලදි."
66 "Project-Id-Version: PACKAGE VERSION\n"
77 "Report-Msgid-Bugs-To: \n"
88 "POT-Creation-Date: 2008-05-27 00:30-0400\n"
9 "PO-Revision-Date: 2008-08-26 06:30-0400\n"
9 "PO-Revision-Date: 2008-08-27 10:58-0400\n"
1010 "Last-Translator: abdullah kocabas <abdullah.kocabas@abcdizustu.com>\n"
1111 "Language-Team: LANGUAGE <LL@li.org>\n"
1212 "MIME-Version: 1.0\n"