Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Jordan <brian@laptop.org>2008-06-27 18:17:45 (GMT)
committer Brian Jordan <brian@laptop.org>2008-06-27 18:22:14 (GMT)
commit392a0c5a4d19da8f06b3ccab8b9d7fdcd558e64d (patch)
tree7fefd02a04479932b4afe7ccd14b12de3c6294c6
Initial commit
-rwxr-xr-xactivity.py13
-rwxr-xr-xactivity/activity-physics.svg97
-rwxr-xr-xactivity/activity.info7
-rwxr-xr-xelements/Box2D2.py3773
-rwxr-xr-xelements/__init__.py2
-rwxr-xr-xelements/add_objects.py509
-rwxr-xr-xelements/box2d/__init__.py22
-rwxr-xr-xelements/box2d/box2d_linux32/Box2D2.py3728
-rwxr-xr-xelements/box2d/box2d_linux32/_Box2D2.sobin0 -> 1401064 bytes
-rwxr-xr-xelements/box2d/box2d_linux32/__init__.py1
-rwxr-xr-xelements/box2d/box2d_linux32ppc/Box2D2.py1857
-rwxr-xr-xelements/box2d/box2d_linux32ppc/_Box2D2.sobin0 -> 1353272 bytes
-rwxr-xr-xelements/box2d/box2d_linux32ppc/__init__.py1
-rwxr-xr-xelements/box2d/box2d_linux64/Box2D2.py3728
-rwxr-xr-xelements/box2d/box2d_linux64/_Box2D2.sobin0 -> 1209512 bytes
-rwxr-xr-xelements/box2d/box2d_linux64/__init__.py1
-rwxr-xr-xelements/box2d/box2d_macosx/Box2D2.py3773
-rwxr-xr-xelements/box2d/box2d_macosx/_Box2D2.sobin0 -> 1066452 bytes
-rwxr-xr-xelements/box2d/box2d_macosx/__init__.py1
-rwxr-xr-xelements/box2d/box2d_win/Box2D2.py2845
-rwxr-xr-xelements/box2d/box2d_win/_Box2D2.pydbin0 -> 1515023 bytes
-rwxr-xr-xelements/box2d/box2d_win/__init__.py1
-rwxr-xr-xelements/callbacks.py122
-rwxr-xr-xelements/camera.py124
-rwxr-xr-xelements/drawing.py376
-rwxr-xr-xelements/elements.py384
-rwxr-xr-xelements/locals.py37
-rwxr-xr-xelements/menu.py237
-rwxr-xr-xelements/tools.py65
-rwxr-xr-xelements/tools_poly.py440
-rwxr-xr-xolpcgames/__init__.py102
-rwxr-xr-xolpcgames/_cairoimage.py135
-rwxr-xr-xolpcgames/_gtkmain.py70
-rwxr-xr-xolpcgames/_version.py2
-rwxr-xr-xolpcgames/activity.py241
-rwxr-xr-xolpcgames/buildmanifest.py33
-rwxr-xr-xolpcgames/camera.py221
-rwxr-xr-xolpcgames/canvas.py171
-rwxr-xr-xolpcgames/copying24
-rwxr-xr-xolpcgames/data/__init__.py36
-rwxr-xr-xolpcgames/data/sleeping.svg52
-rwxr-xr-xolpcgames/data/sleeping_svg.py61
-rwxr-xr-xolpcgames/dbusproxy.py93
-rwxr-xr-xolpcgames/eventwrap.py388
-rwxr-xr-xolpcgames/gtkEvent.py289
-rwxr-xr-xolpcgames/mesh.py583
-rwxr-xr-xolpcgames/pangofont.py346
-rwxr-xr-xolpcgames/pausescreen.py116
-rwxr-xr-xolpcgames/svg.py71
-rwxr-xr-xolpcgames/svgsprite.py52
-rwxr-xr-xolpcgames/textsprite.py40
-rwxr-xr-xolpcgames/util.py85
-rwxr-xr-xolpcgames/video.py178
-rwxr-xr-xphysics.py152
54 files changed, 25685 insertions, 0 deletions
diff --git a/activity.py b/activity.py
new file mode 100755
index 0000000..cc4e15b
--- /dev/null
+++ b/activity.py
@@ -0,0 +1,13 @@
+import pygtk
+pygtk.require('2.0')
+import gtk
+import hippo
+
+from sugar.activity import activity
+import olpcgames
+
+class PhysicsActivity(olpcgames.PyGameActivity):
+
+ game_name = 'physics'
+ game_title = 'Physics'
+ game_handler = 'physics:main'
diff --git a/activity/activity-physics.svg b/activity/activity-physics.svg
new file mode 100755
index 0000000..362ecbe
--- /dev/null
+++ b/activity/activity-physics.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#000000">
+]>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="50px"
+ height="50px"
+ viewBox="0 0 50 50"
+ enable-background="new 0 0 50 50"
+ xml:space="preserve"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ sodipodi:docname="activity-physics.svg"
+ sodipodi:docbase="/Users/jminor/Sites/olpc/physics.pymunx/Physics.activity/activity"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
+ id="metadata8"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs6" /><sodipodi:namedview
+ inkscape:window-height="643"
+ inkscape:window-width="753"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="7.56"
+ inkscape:cx="25"
+ inkscape:cy="24.609497"
+ inkscape:window-x="20"
+ inkscape:window-y="20"
+ inkscape:current-layer="Layer_1" />
+
+<path
+ sodipodi:type="arc"
+ fill="&fill_color;" stroke="&stroke_color;" style="fill-opacity:1;fill-rule:nonzero;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path2208"
+ sodipodi:cx="13.558201"
+ sodipodi:cy="15.145503"
+ sodipodi:rx="9.1931219"
+ sodipodi:ry="9.1931219"
+ d="M 22.751323 15.145503 A 9.1931219 9.1931219 0 1 1 4.3650789,15.145503 A 9.1931219 9.1931219 0 1 1 22.751323 15.145503 z"
+ transform="translate(-2.3809524,3.8359789)" /><path
+ sodipodi:type="star"
+ fill="&fill_color;" stroke="&stroke_color;" style="fill-opacity:1;fill-rule:nonzero;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path2210"
+ sodipodi:sides="3"
+ sodipodi:cx="29.100529"
+ sodipodi:cy="17.328041"
+ sodipodi:r1="12.436676"
+ sodipodi:r2="6.218338"
+ sodipodi:arg1="1.0595656"
+ sodipodi:arg2="2.1067632"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 35.185185,28.174601 L 16.664804,17.174228 L 35.451598,6.6352942 L 35.185185,28.174601 z "
+ transform="matrix(0.8539616,-0.5203361,0.5203361,0.8539616,-7.6318759,40.439437)" /><path
+ sodipodi:type="star"
+ fill="&fill_color;" stroke="&stroke_color;" style="fill-opacity:1;fill-rule:nonzero;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path2212"
+ sodipodi:sides="4"
+ sodipodi:cx="17.063492"
+ sodipodi:cy="34.523811"
+ sodipodi:r1="13.251962"
+ sodipodi:r2="6.6259809"
+ sodipodi:arg1="0.47703967"
+ sodipodi:arg2="1.2624378"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 28.835979,40.608468 L 10.978836,46.296298 L 5.2910049,28.439155 L 23.148148,22.751324 L 28.835979,40.608468 z "
+ transform="matrix(0.8992892,-0.4373546,-0.4373546,-0.8992892,36.526622,53.589052)" /><rect
+ fill="&fill_color;" stroke="&stroke_color;" style="fill-opacity:1;fill-rule:nonzero;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect2214"
+ width="45.899471"
+ height="3.7037036"
+ x="-1.8733307"
+ y="30.09301"
+ ry="1.0486668"
+ transform="matrix(0.9895466,-0.1442134,0.1442134,0.9895466,0,0)" /></svg> \ No newline at end of file
diff --git a/activity/activity.info b/activity/activity.info
new file mode 100755
index 0000000..c61c1a9
--- /dev/null
+++ b/activity/activity.info
@@ -0,0 +1,7 @@
+[Activity]
+name = Physics
+activity_version = 1
+host_version = 1
+service_name = net.coderanger.olpc.PhysicsActivity
+icon = activity-physics
+class = activity.PhysicsActivity
diff --git a/elements/Box2D2.py b/elements/Box2D2.py
new file mode 100755
index 0000000..5d444e2
--- /dev/null
+++ b/elements/Box2D2.py
@@ -0,0 +1,3773 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.31
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+try:
+ _swig_property = property
+except NameError:
+ pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+try:
+ import weakref
+ weakref_proxy = weakref.proxy
+except:
+ weakref_proxy = lambda x: x
+
+
+
+def b2Alloc(*args):
+ """b2Alloc(int32 size) -> void"""
+ return _Box2D2.b2Alloc(*args)
+
+def b2Free(*args):
+ """b2Free(void mem)"""
+ return _Box2D2.b2Free(*args)
+class b2Version(_object):
+ """Proxy of C++ b2Version class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
+ __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
+ if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
+ __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
+ __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
+ if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
+ __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
+ __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
+ if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Version"""
+ this = _Box2D2.new_b2Version(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Version
+ __del__ = lambda self : None;
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+
+def b2IsValid(*args):
+ """b2IsValid(float32 x) -> bool"""
+ return _Box2D2.b2IsValid(*args)
+
+def b2InvSqrt(*args):
+ """b2InvSqrt(float32 x) -> float32"""
+ return _Box2D2.b2InvSqrt(*args)
+class b2Vec2(_object):
+ """Proxy of C++ b2Vec2 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Vec2
+ __init__(self, float32 x, float32 y) -> b2Vec2
+ """
+ this = _Box2D2.new_b2Vec2(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Vec2_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, float32 x_, float32 y_)"""
+ return _Box2D2.b2Vec2_Set(*args)
+
+ def __neg__(*args):
+ """__neg__(self) -> b2Vec2"""
+ return _Box2D2.b2Vec2___neg__(*args)
+
+ def __iadd__(*args):
+ """__iadd__(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2___iadd__(*args)
+
+ def __isub__(*args):
+ """__isub__(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2___isub__(*args)
+
+ def __imul__(*args):
+ """__imul__(self, float32 a)"""
+ return _Box2D2.b2Vec2___imul__(*args)
+
+ def Length(*args):
+ """Length(self) -> float32"""
+ return _Box2D2.b2Vec2_Length(*args)
+
+ def LengthSquared(*args):
+ """LengthSquared(self) -> float32"""
+ return _Box2D2.b2Vec2_LengthSquared(*args)
+
+ def Normalize(*args):
+ """Normalize(self) -> float32"""
+ return _Box2D2.b2Vec2_Normalize(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Vec2_IsValid(*args)
+
+ __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
+ __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
+ if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
+ __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
+ __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
+ if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
+ def __repr__(self):
+ return "b2Vec2(%g,%g)" % (self.x, self.y)
+ def tuple(self):
+ return (self.x, self.y)
+
+ def __mul__(*args):
+ """__mul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___mul__(*args)
+
+ def __add__(*args):
+ """__add__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___add__(*args)
+
+ def __sub__(*args):
+ """__sub__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___sub__(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+ __del__ = lambda self : None;
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22(_object):
+ """Proxy of C++ b2Mat22 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Mat22
+ __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
+ __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
+ __init__(self, float32 angle) -> b2Mat22
+ """
+ this = _Box2D2.new_b2Mat22(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Set(*args):
+ """
+ Set(self, b2Vec2 c1, b2Vec2 c2)
+ Set(self, float32 angle)
+ """
+ return _Box2D2.b2Mat22_Set(*args)
+
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2Mat22_SetIdentity(*args)
+
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Mat22_SetZero(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Mat22_GetAngle(*args)
+
+ def Invert(*args):
+ """Invert(self) -> b2Mat22"""
+ return _Box2D2.b2Mat22_Invert(*args)
+
+ def Solve(*args):
+ """Solve(self, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Mat22_Solve(*args)
+
+ __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
+ __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
+ if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
+ __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
+ __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
+ if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+ __del__ = lambda self : None;
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm(_object):
+ """Proxy of C++ b2XForm class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2XForm
+ __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
+ """
+ this = _Box2D2.new_b2XForm(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2XForm_SetIdentity(*args)
+
+ __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
+ __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+ __del__ = lambda self : None;
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep(_object):
+ """Proxy of C++ b2Sweep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
+ __repr__ = _swig_repr
+ def GetXForm(*args):
+ """GetXForm(self, b2XForm xf, float32 t)"""
+ return _Box2D2.b2Sweep_GetXForm(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Sweep_Advance(*args)
+
+ __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
+ __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
+ if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
+ __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
+ __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
+ if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
+ __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
+ __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
+ if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
+ __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
+ __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
+ if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
+ __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
+ __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
+ if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
+ __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
+ __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
+ if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Sweep"""
+ this = _Box2D2.new_b2Sweep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+ __del__ = lambda self : None;
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+
+def b2Dot(*args):
+ """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2Dot(*args)
+
+def b2_VaddV(*args):
+ """b2_VaddV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2_VaddV(*args)
+
+def b2_VsubV(*args):
+ """b2_VsubV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2_VsubV(*args)
+
+def b2_VmulF(*args):
+ """b2_VmulF(float32 s, b2Vec2 a) -> b2Vec2"""
+ return _Box2D2.b2_VmulF(*args)
+
+def b2_VequV(*args):
+ """b2_VequV(b2Vec2 a, b2Vec2 b) -> bool"""
+ return _Box2D2.b2_VequV(*args)
+
+def b2DistanceSquared(*args):
+ """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2DistanceSquared(*args)
+
+def b2_MaddM(*args):
+ """b2_MaddM(b2Mat22 A, b2Mat22 B) -> b2Mat22"""
+ return _Box2D2.b2_MaddM(*args)
+
+def b2Min(*args):
+ """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Min(*args)
+
+def b2Max(*args):
+ """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Max(*args)
+
+def b2Clamp(*args):
+ """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
+ return _Box2D2.b2Clamp(*args)
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+
+def b2NextPowerOfTwo(*args):
+ """b2NextPowerOfTwo(uint32 x) -> uint32"""
+ return _Box2D2.b2NextPowerOfTwo(*args)
+
+def b2IsPowerOfTwo(*args):
+ """b2IsPowerOfTwo(uint32 x) -> bool"""
+ return _Box2D2.b2IsPowerOfTwo(*args)
+class b2ContactID(_object):
+ """Proxy of C++ b2ContactID class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
+ __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
+ if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
+ __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
+ if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID"""
+ this = _Box2D2.new_b2ContactID(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+ __del__ = lambda self : None;
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+
+def b2Cross(*args):
+ """
+ b2Cross(b2Vec2 a, b2Vec2 b) -> float32
+ b2Cross(b2Vec2 a, float32 s) -> b2Vec2
+ b2Cross(float32 s, b2Vec2 a) -> b2Vec2
+ """
+ return _Box2D2.b2Cross(*args)
+
+def b2Mul(*args):
+ """
+ b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2Mul(*args)
+
+def b2MulT(*args):
+ """
+ b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2MulT(*args)
+
+def b2Abs(*args):
+ """
+ b2Abs(float32 a) -> float32
+ b2Abs(b2Vec2 a) -> b2Vec2
+ b2Abs(b2Mat22 A) -> b2Mat22
+ """
+ return _Box2D2.b2Abs(*args)
+
+def b2Random(*args):
+ """
+ b2Random() -> float32
+ b2Random(float32 lo, float32 hi) -> float32
+ """
+ return _Box2D2.b2Random(*args)
+b2_nullFeature = cvar.b2_nullFeature
+b2_newPoint = cvar.b2_newPoint
+b2_oldPoint = cvar.b2_oldPoint
+
+class b2ContactID_features(_object):
+ """Proxy of C++ b2ContactID_features class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
+ __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
+ if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
+ __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
+ __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
+ if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
+ __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
+ __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
+ if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
+ __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
+ __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
+ if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID_features"""
+ this = _Box2D2.new_b2ContactID_features(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+ __del__ = lambda self : None;
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint(_object):
+ """Proxy of C++ b2ManifoldPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
+ __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
+ if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
+ __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
+ __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
+ if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_get
+ if _newclass:normalForce = _swig_property(_Box2D2.b2ManifoldPoint_normalForce_get, _Box2D2.b2ManifoldPoint_normalForce_set)
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_get
+ if _newclass:tangentForce = _swig_property(_Box2D2.b2ManifoldPoint_tangentForce_get, _Box2D2.b2ManifoldPoint_tangentForce_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ManifoldPoint"""
+ this = _Box2D2.new_b2ManifoldPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+ __del__ = lambda self : None;
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold(_object):
+ """Proxy of C++ b2Manifold class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
+ __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
+ if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
+ __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
+ __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
+ if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Manifold"""
+ this = _Box2D2.new_b2Manifold(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+ __del__ = lambda self : None;
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment(_object):
+ """Proxy of C++ b2Segment class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
+ __repr__ = _swig_repr
+ def TestSegment(*args):
+ """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
+ return _Box2D2.b2Segment_TestSegment(*args)
+
+ __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
+ __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
+ if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
+ __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
+ __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
+ if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Segment"""
+ this = _Box2D2.new_b2Segment(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+ __del__ = lambda self : None;
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB(_object):
+ """Proxy of C++ b2AABB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
+ __repr__ = _swig_repr
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2AABB_IsValid(*args)
+
+ __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
+ __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
+ if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
+ __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
+ __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
+ if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2AABB"""
+ this = _Box2D2.new_b2AABB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+ __del__ = lambda self : None;
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB(_object):
+ """Proxy of C++ b2OBB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
+ __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
+ __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
+ __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
+ if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2OBB"""
+ this = _Box2D2.new_b2OBB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+ __del__ = lambda self : None;
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+
+def b2CollideCircles(*args):
+ """
+ b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
+ b2CircleShape circle2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollideCircles(*args)
+
+def b2CollidePolygonAndCircle(*args):
+ """
+ b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
+ b2CircleShape circle, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygonAndCircle(*args)
+
+def b2CollidePolygons(*args):
+ """
+ b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
+ b2PolygonShape polygon2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygons(*args)
+
+def b2TimeOfImpact(*args):
+ """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
+ return _Box2D2.b2TimeOfImpact(*args)
+
+def b2TestOverlap(*args):
+ """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
+ return _Box2D2.b2TestOverlap(*args)
+class b2MassData(_object):
+ """Proxy of C++ b2MassData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
+ __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
+ if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
+ __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
+ __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
+ __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
+ if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2MassData"""
+ this = _Box2D2.new_b2MassData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+ __del__ = lambda self : None;
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+
+def b2Distance(*args):
+ """
+ b2Distance(b2Vec2 a, b2Vec2 b) -> float32
+ b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
+ b2Shape shape2, b2XForm xf2) -> float32
+ """
+ return _Box2D2.b2Distance(*args)
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef(_object):
+ """Proxy of C++ b2ShapeDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ShapeDef"""
+ this = _Box2D2.new_b2ShapeDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ __del__ = lambda self : None;
+ __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
+ __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
+ __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
+ if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
+ __swig_setmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_set
+ __swig_getmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_get
+ if _newclass:categoryBits = _swig_property(_Box2D2.b2ShapeDef_categoryBits_get, _Box2D2.b2ShapeDef_categoryBits_set)
+ __swig_setmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_set
+ __swig_getmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_get
+ if _newclass:maskBits = _swig_property(_Box2D2.b2ShapeDef_maskBits_get, _Box2D2.b2ShapeDef_maskBits_set)
+ __swig_setmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_set
+ __swig_getmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_get
+ if _newclass:groupIndex = _swig_property(_Box2D2.b2ShapeDef_groupIndex_get, _Box2D2.b2ShapeDef_groupIndex_set)
+ __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
+ __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
+ if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape(_object):
+ """Proxy of C++ b2Shape class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Shape_GetType(*args)
+
+ def IsSensor(*args):
+ """IsSensor(self) -> bool"""
+ return _Box2D2.b2Shape_IsSensor(*args)
+
+ def GetBody(*args):
+ """GetBody(self) -> b2Body"""
+ return _Box2D2.b2Shape_GetBody(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Shape"""
+ return _Box2D2.b2Shape_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Shape_GetUserData(*args)
+
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
+ return _Box2D2.b2Shape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2Shape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
+ return _Box2D2.b2Shape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
+ return _Box2D2.b2Shape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2Shape_ComputeMass(*args)
+
+ def Create(*args):
+ """Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
+ return _Box2D2.b2Shape_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Shape shape, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Shape_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Shape
+ __del__ = lambda self : None;
+ def CreateProxy(*args):
+ """CreateProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
+ return _Box2D2.b2Shape_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, b2BroadPhase broadPhase)"""
+ return _Box2D2.b2Shape_DestroyProxy(*args)
+
+ def Synchronize(*args):
+ """Synchronize(self, b2BroadPhase broadPhase, b2XForm xf1, b2XForm xf2) -> bool"""
+ return _Box2D2.b2Shape_Synchronize(*args)
+
+ def ResetProxy(*args):
+ """ResetProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
+ return _Box2D2.b2Shape_ResetProxy(*args)
+
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2Shape_UpdateSweepRadius(*args)
+
+ def GetSweepRadius(*args):
+ """GetSweepRadius(self) -> float32"""
+ return _Box2D2.b2Shape_GetSweepRadius(*args)
+
+ __swig_setmethods__["m_type"] = _Box2D2.b2Shape_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Shape_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Shape_m_type_get, _Box2D2.b2Shape_m_type_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Shape_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Shape_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Shape_m_next_get, _Box2D2.b2Shape_m_next_set)
+ __swig_setmethods__["m_body"] = _Box2D2.b2Shape_m_body_set
+ __swig_getmethods__["m_body"] = _Box2D2.b2Shape_m_body_get
+ if _newclass:m_body = _swig_property(_Box2D2.b2Shape_m_body_get, _Box2D2.b2Shape_m_body_set)
+ __swig_setmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_set
+ __swig_getmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_get
+ if _newclass:m_sweepRadius = _swig_property(_Box2D2.b2Shape_m_sweepRadius_get, _Box2D2.b2Shape_m_sweepRadius_set)
+ __swig_setmethods__["m_density"] = _Box2D2.b2Shape_m_density_set
+ __swig_getmethods__["m_density"] = _Box2D2.b2Shape_m_density_get
+ if _newclass:m_density = _swig_property(_Box2D2.b2Shape_m_density_get, _Box2D2.b2Shape_m_density_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Shape_m_friction_get, _Box2D2.b2Shape_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Shape_m_restitution_get, _Box2D2.b2Shape_m_restitution_set)
+ __swig_setmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_set
+ __swig_getmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_get
+ if _newclass:m_proxyId = _swig_property(_Box2D2.b2Shape_m_proxyId_get, _Box2D2.b2Shape_m_proxyId_set)
+ __swig_setmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_set
+ __swig_getmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_get
+ if _newclass:m_categoryBits = _swig_property(_Box2D2.b2Shape_m_categoryBits_get, _Box2D2.b2Shape_m_categoryBits_set)
+ __swig_setmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_set
+ __swig_getmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_get
+ if _newclass:m_maskBits = _swig_property(_Box2D2.b2Shape_m_maskBits_get, _Box2D2.b2Shape_m_maskBits_set)
+ __swig_setmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_set
+ __swig_getmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_get
+ if _newclass:m_groupIndex = _swig_property(_Box2D2.b2Shape_m_groupIndex_get, _Box2D2.b2Shape_m_groupIndex_set)
+ __swig_setmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_set
+ __swig_getmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_get
+ if _newclass:m_isSensor = _swig_property(_Box2D2.b2Shape_m_isSensor_get, _Box2D2.b2Shape_m_isSensor_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Shape_m_userData_get, _Box2D2.b2Shape_m_userData_set)
+ def __repr__(self):
+ return "b2Shape(from Body %s )" % (self.GetBody())
+ def typeName(self):
+ types = { e_unknownShape : "Unknown",
+ e_circleShape : "Circle",
+ e_polygonShape : "Polygon",
+ e_shapeTypeCount: "ShapeType" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the shape"""
+ return (getattr(self, "as%s" % self.typeName())) ()
+
+ def asCircle(*args):
+ """asCircle(self) -> b2CircleShape"""
+ return _Box2D2.b2Shape_asCircle(*args)
+
+ def asPolygon(*args):
+ """asPolygon(self) -> b2PolygonShape"""
+ return _Box2D2.b2Shape_asPolygon(*args)
+
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+
+def b2Shape_Create(*args):
+ """b2Shape_Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
+ return _Box2D2.b2Shape_Create(*args)
+
+def b2Shape_Destroy(*args):
+ """b2Shape_Destroy(b2Shape shape, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Shape_Destroy(*args)
+
+class b2CircleDef(b2ShapeDef):
+ """Proxy of C++ b2CircleDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2CircleDef"""
+ this = _Box2D2.new_b2CircleDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
+ __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
+ if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
+ __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
+ __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
+ if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+ __del__ = lambda self : None;
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ """Proxy of C++ b2CircleShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2CircleShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2CircleShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2CircleShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2CircleShape_ComputeMass(*args)
+
+ def GetLocalPosition(*args):
+ """GetLocalPosition(self) -> b2Vec2"""
+ return _Box2D2.b2CircleShape_GetLocalPosition(*args)
+
+ def GetRadius(*args):
+ """GetRadius(self) -> float32"""
+ return _Box2D2.b2CircleShape_GetRadius(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2ShapeDef def) -> b2CircleShape"""
+ this = _Box2D2.new_b2CircleShape(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2CircleShape_UpdateSweepRadius(*args)
+
+ __swig_setmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_set
+ __swig_getmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_get
+ if _newclass:m_localPosition = _swig_property(_Box2D2.b2CircleShape_m_localPosition_get, _Box2D2.b2CircleShape_m_localPosition_set)
+ __swig_setmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_set
+ __swig_getmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_get
+ if _newclass:m_radius = _swig_property(_Box2D2.b2CircleShape_m_radius_get, _Box2D2.b2CircleShape_m_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+ __del__ = lambda self : None;
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ """Proxy of C++ b2PolygonDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PolygonDef"""
+ this = _Box2D2.new_b2PolygonDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetAsBox(*args):
+ """
+ SetAsBox(self, float32 hx, float32 hy)
+ SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
+ """
+ return _Box2D2.b2PolygonDef_SetAsBox(*args)
+
+ __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
+ __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
+ if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
+ __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
+ __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
+ if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonDef_getVertex(*args)
+
+ def setVertex(*args):
+ """setVertex(self, uint16 vnum, b2Vec2 value)"""
+ return _Box2D2.b2PolygonDef_setVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+ __del__ = lambda self : None;
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ """Proxy of C++ b2PolygonShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2PolygonShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2PolygonShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2PolygonShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2PolygonShape_ComputeMass(*args)
+
+ def GetOBB(*args):
+ """GetOBB(self) -> b2OBB"""
+ return _Box2D2.b2PolygonShape_GetOBB(*args)
+
+ def GetCentroid(*args):
+ """GetCentroid(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCentroid(*args)
+
+ def GetVertexCount(*args):
+ """GetVertexCount(self) -> int32"""
+ return _Box2D2.b2PolygonShape_GetVertexCount(*args)
+
+ def GetVertices(*args):
+ """GetVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetVertices(*args)
+
+ def GetCoreVertices(*args):
+ """GetCoreVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2ShapeDef def) -> b2PolygonShape"""
+ this = _Box2D2.new_b2PolygonShape(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2PolygonShape_UpdateSweepRadius(*args)
+
+ def GetFirstVertex(*args):
+ """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
+
+ def Centroid(*args):
+ """Centroid(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Centroid(*args)
+
+ def Support(*args):
+ """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Support(*args)
+
+ __swig_setmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_set
+ __swig_getmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_get
+ if _newclass:m_centroid = _swig_property(_Box2D2.b2PolygonShape_m_centroid_get, _Box2D2.b2PolygonShape_m_centroid_set)
+ __swig_setmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_set
+ __swig_getmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_get
+ if _newclass:m_obb = _swig_property(_Box2D2.b2PolygonShape_m_obb_get, _Box2D2.b2PolygonShape_m_obb_set)
+ __swig_setmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_set
+ __swig_getmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_get
+ if _newclass:m_vertices = _swig_property(_Box2D2.b2PolygonShape_m_vertices_get, _Box2D2.b2PolygonShape_m_vertices_set)
+ __swig_setmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_set
+ __swig_getmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_get
+ if _newclass:m_normals = _swig_property(_Box2D2.b2PolygonShape_m_normals_get, _Box2D2.b2PolygonShape_m_normals_set)
+ __swig_setmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_set
+ __swig_getmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_get
+ if _newclass:m_coreVertices = _swig_property(_Box2D2.b2PolygonShape_m_coreVertices_get, _Box2D2.b2PolygonShape_m_coreVertices_set)
+ __swig_setmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_set
+ __swig_getmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_get
+ if _newclass:m_vertexCount = _swig_property(_Box2D2.b2PolygonShape_m_vertexCount_get, _Box2D2.b2PolygonShape_m_vertexCount_set)
+ def __repr__(self):
+ return "b2PolygonShape()"
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_getVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+ __del__ = lambda self : None;
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair(_object):
+ """Proxy of C++ b2Pair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ def SetBuffered(*args):
+ """SetBuffered(self)"""
+ return _Box2D2.b2Pair_SetBuffered(*args)
+
+ def ClearBuffered(*args):
+ """ClearBuffered(self)"""
+ return _Box2D2.b2Pair_ClearBuffered(*args)
+
+ def IsBuffered(*args):
+ """IsBuffered(self) -> bool"""
+ return _Box2D2.b2Pair_IsBuffered(*args)
+
+ def SetRemoved(*args):
+ """SetRemoved(self)"""
+ return _Box2D2.b2Pair_SetRemoved(*args)
+
+ def ClearRemoved(*args):
+ """ClearRemoved(self)"""
+ return _Box2D2.b2Pair_ClearRemoved(*args)
+
+ def IsRemoved(*args):
+ """IsRemoved(self) -> bool"""
+ return _Box2D2.b2Pair_IsRemoved(*args)
+
+ def SetFinal(*args):
+ """SetFinal(self)"""
+ return _Box2D2.b2Pair_SetFinal(*args)
+
+ def IsFinal(*args):
+ """IsFinal(self) -> bool"""
+ return _Box2D2.b2Pair_IsFinal(*args)
+
+ __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
+ __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
+ __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
+ __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
+ if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Pair"""
+ this = _Box2D2.new_b2Pair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+ __del__ = lambda self : None;
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair(_object):
+ """Proxy of C++ b2BufferedPair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2BufferedPair"""
+ this = _Box2D2.new_b2BufferedPair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+ __del__ = lambda self : None;
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback(_object):
+ """Proxy of C++ b2PairCallback class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+ __del__ = lambda self : None;
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2PairCallback_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2PairCallback_PairRemoved(*args)
+
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager(_object):
+ """Proxy of C++ b2PairManager class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PairManager"""
+ this = _Box2D2.new_b2PairManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
+ return _Box2D2.b2PairManager_Initialize(*args)
+
+ def AddBufferedPair(*args):
+ """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_AddBufferedPair(*args)
+
+ def RemoveBufferedPair(*args):
+ """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2PairManager_Commit(*args)
+
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
+ __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
+ __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
+ if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
+ __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
+ __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
+ if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
+ __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
+ __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
+ if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
+ __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
+ __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
+ if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
+ __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
+ __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
+ if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
+ __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
+ __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
+ if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
+ __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
+ __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
+ if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+ __del__ = lambda self : None;
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound(_object):
+ """Proxy of C++ b2Bound class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
+ __repr__ = _swig_repr
+ def IsLower(*args):
+ """IsLower(self) -> bool"""
+ return _Box2D2.b2Bound_IsLower(*args)
+
+ def IsUpper(*args):
+ """IsUpper(self) -> bool"""
+ return _Box2D2.b2Bound_IsUpper(*args)
+
+ __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
+ __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
+ if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
+ __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
+ __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
+ if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
+ __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
+ __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
+ if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Bound"""
+ this = _Box2D2.new_b2Bound(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+ __del__ = lambda self : None;
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy(_object):
+ """Proxy of C++ b2Proxy class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
+ __repr__ = _swig_repr
+ def GetNext(*args):
+ """GetNext(self) -> uint16"""
+ return _Box2D2.b2Proxy_GetNext(*args)
+
+ def SetNext(*args):
+ """SetNext(self, uint16 next)"""
+ return _Box2D2.b2Proxy_SetNext(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Proxy_IsValid(*args)
+
+ __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
+ __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
+ if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
+ __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
+ __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
+ if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
+ __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
+ __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
+ if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
+ __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
+ __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
+ if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Proxy"""
+ this = _Box2D2.new_b2Proxy(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+ __del__ = lambda self : None;
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase(_object):
+ """Proxy of C++ b2BroadPhase class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
+ this = _Box2D2.new_b2BroadPhase(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ __del__ = lambda self : None;
+ def InRange(*args):
+ """InRange(self, b2AABB aabb) -> bool"""
+ return _Box2D2.b2BroadPhase_InRange(*args)
+
+ def CreateProxy(*args):
+ """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
+ return _Box2D2.b2BroadPhase_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, int32 proxyId)"""
+ return _Box2D2.b2BroadPhase_DestroyProxy(*args)
+
+ def MoveProxy(*args):
+ """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
+ return _Box2D2.b2BroadPhase_MoveProxy(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2BroadPhase_Commit(*args)
+
+ def GetProxy(*args):
+ """GetProxy(self, int32 proxyId) -> b2Proxy"""
+ return _Box2D2.b2BroadPhase_GetProxy(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
+ return _Box2D2.b2BroadPhase_Query(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2BroadPhase_Validate(*args)
+
+ def ValidatePairs(*args):
+ """ValidatePairs(self)"""
+ return _Box2D2.b2BroadPhase_ValidatePairs(*args)
+
+ __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
+ __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
+ if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
+ __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
+ __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
+ if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
+ __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
+ __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
+ if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
+ __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
+ __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
+ if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
+ __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
+ __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
+ if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
+ __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
+ __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
+ if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
+ __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
+ __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
+ if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
+ __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
+ __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
+ if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
+ __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
+ __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
+ if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
+ __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
+ __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
+ if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
+ __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
+ __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
+ if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener(_object):
+ """Proxy of C++ b2DestructionListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+ __del__ = lambda self : None;
+ def SayGoodbye(*args):
+ """
+ SayGoodbye(self, b2Joint joint)
+ SayGoodbye(self, b2Shape shape)
+ """
+ return _Box2D2.b2DestructionListener_SayGoodbye(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2DestructionListener"""
+ if self.__class__ == b2DestructionListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DestructionListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DestructionListener(self)
+ return weakref_proxy(self)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener(_object):
+ """Proxy of C++ b2BoundaryListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+ __del__ = lambda self : None;
+ def Violation(*args):
+ """Violation(self, b2Body body)"""
+ return _Box2D2.b2BoundaryListener_Violation(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2BoundaryListener"""
+ if self.__class__ == b2BoundaryListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2BoundaryListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2BoundaryListener(self)
+ return weakref_proxy(self)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter(_object):
+ """Proxy of C++ b2ContactFilter class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ __del__ = lambda self : None;
+ def ShouldCollide(*args):
+ """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
+ return _Box2D2.b2ContactFilter_ShouldCollide(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactFilter"""
+ this = _Box2D2.new_b2ContactFilter(*args)
+ try: self.this.append(this)
+ except: self.this = this
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener(_object):
+ """Proxy of C++ b2ContactListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+ __del__ = lambda self : None;
+ def Add(*args):
+ """Add(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Add(*args)
+
+ def Persist(*args):
+ """Persist(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Persist(*args)
+
+ def Remove(*args):
+ """Remove(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Remove(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactListener"""
+ if self.__class__ == b2ContactListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2ContactListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2ContactListener(self)
+ return weakref_proxy(self)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color(_object):
+ """Proxy of C++ b2Color class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Color
+ __init__(self, float32 r, float32 g, float32 b) -> b2Color
+ """
+ this = _Box2D2.new_b2Color(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
+ __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
+ if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
+ __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
+ __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
+ if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
+ __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
+ __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
+ if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
+ __swig_destroy__ = _Box2D2.delete_b2Color
+ __del__ = lambda self : None;
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw(_object):
+ """Proxy of C++ b2DebugDraw class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DebugDraw"""
+ if self.__class__ == b2DebugDraw:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DebugDraw(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ __del__ = lambda self : None;
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+ def SetFlags(*args):
+ """SetFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_SetFlags(*args)
+
+ def GetFlags(*args):
+ """GetFlags(self) -> uint32"""
+ return _Box2D2.b2DebugDraw_GetFlags(*args)
+
+ def AppendFlags(*args):
+ """AppendFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_AppendFlags(*args)
+
+ def ClearFlags(*args):
+ """ClearFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_ClearFlags(*args)
+
+ def DrawPolygon(*args):
+ """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawPolygon(*args)
+
+ def DrawSolidPolygon(*args):
+ """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
+
+ def DrawCircle(*args):
+ """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawCircle(*args)
+
+ def DrawSolidCircle(*args):
+ """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
+
+ def DrawSegment(*args):
+ """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSegment(*args)
+
+ def DrawXForm(*args):
+ """DrawXForm(self, b2XForm xf)"""
+ return _Box2D2.b2DebugDraw_DrawXForm(*args)
+
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DebugDraw(self)
+ return weakref_proxy(self)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator(_object):
+ """Proxy of C++ b2BlockAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BlockAllocator"""
+ this = _Box2D2.new_b2BlockAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2BlockAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p, int32 size)"""
+ return _Box2D2.b2BlockAllocator_Free(*args)
+
+ def Clear(*args):
+ """Clear(self)"""
+ return _Box2D2.b2BlockAllocator_Clear(*args)
+
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry(_object):
+ """Proxy of C++ b2StackEntry class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
+ __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
+ if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
+ __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
+ __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
+ if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
+ __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
+ __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
+ if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2StackEntry"""
+ this = _Box2D2.new_b2StackEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+ __del__ = lambda self : None;
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator(_object):
+ """Proxy of C++ b2StackAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2StackAllocator"""
+ this = _Box2D2.new_b2StackAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2StackAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p)"""
+ return _Box2D2.b2StackAllocator_Free(*args)
+
+ def GetMaxAllocation(*args):
+ """GetMaxAllocation(self) -> int32"""
+ return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
+
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister(_object):
+ """Proxy of C++ b2ContactRegister class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
+ __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
+ if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
+ __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
+ __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
+ if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
+ __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
+ __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
+ if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactRegister"""
+ this = _Box2D2.new_b2ContactRegister(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+ __del__ = lambda self : None;
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge(_object):
+ """Proxy of C++ b2ContactEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
+ __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
+ __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
+ if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactEdge"""
+ this = _Box2D2.new_b2ContactEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+ __del__ = lambda self : None;
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint(_object):
+ """Proxy of C++ b2ContactPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_get
+ if _newclass:normalForce = _swig_property(_Box2D2.b2ContactPoint_normalForce_get, _Box2D2.b2ContactPoint_normalForce_set)
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_get
+ if _newclass:tangentForce = _swig_property(_Box2D2.b2ContactPoint_tangentForce_get, _Box2D2.b2ContactPoint_tangentForce_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
+ def __repr__(self):
+ return "b2ContactPoint(\n\tShape1: %s\n\tShape2:%s\n\tPosition: %s\n\tNormal: %s)" % (self.shape1, self.shape2, self.position, self.normal)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactPoint"""
+ this = _Box2D2.new_b2ContactPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+ __del__ = lambda self : None;
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2Contact(_object):
+ """Proxy of C++ b2Contact class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2Contact_GetManifolds(*args)
+
+ def GetManifoldCount(*args):
+ """GetManifoldCount(self) -> int32"""
+ return _Box2D2.b2Contact_GetManifoldCount(*args)
+
+ def IsSolid(*args):
+ """IsSolid(self) -> bool"""
+ return _Box2D2.b2Contact_IsSolid(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Contact"""
+ return _Box2D2.b2Contact_GetNext(*args)
+
+ def GetShape1(*args):
+ """GetShape1(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape1(*args)
+
+ def GetShape2(*args):
+ """GetShape2(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape2(*args)
+
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ def AddType(*args):
+ """
+ AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+ if _newclass:AddType = staticmethod(AddType)
+ __swig_getmethods__["AddType"] = lambda x: AddType
+ def InitializeRegisters(*args):
+ """InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+ if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
+ __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
+ def Create(*args):
+ """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ __del__ = lambda self : None;
+ def Update(*args):
+ """Update(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Update(*args)
+
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Evaluate(*args)
+
+ __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
+ __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
+ if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
+ __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
+ __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
+ if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
+ __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
+ __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
+ if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
+ __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
+ __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
+ if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
+ __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
+ __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
+ if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
+ __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
+ __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
+ if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+
+def b2Contact_AddType(*args):
+ """
+ b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+def b2Contact_InitializeRegisters(*args):
+ """b2Contact_InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+def b2Contact_Create(*args):
+ """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+def b2Contact_Destroy(*args):
+ """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+class b2NullContact(b2Contact):
+ """Proxy of C++ b2NullContact class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2NullContact"""
+ this = _Box2D2.new_b2NullContact(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener ?)"""
+ return _Box2D2.b2NullContact_Evaluate(*args)
+
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2NullContact_GetManifolds(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+ __del__ = lambda self : None;
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ """Proxy of C++ b2ContactManager class"""
+ __swig_setmethods__ = {}
+ for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactManager"""
+ this = _Box2D2.new_b2ContactManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2ContactManager_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2ContactManager_PairRemoved(*args)
+
+ def Destroy(*args):
+ """Destroy(self, b2Contact c)"""
+ return _Box2D2.b2ContactManager_Destroy(*args)
+
+ def Collide(*args):
+ """Collide(self)"""
+ return _Box2D2.b2ContactManager_Collide(*args)
+
+ __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
+ __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
+ __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
+ if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
+ __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
+ __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
+ if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+ __del__ = lambda self : None;
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep(_object):
+ """Proxy of C++ b2TimeStep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
+ __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
+ if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
+ __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
+ __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
+ if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
+ __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
+ __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
+ if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2TimeStep"""
+ this = _Box2D2.new_b2TimeStep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+ __del__ = lambda self : None;
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World(_object):
+ """Proxy of C++ b2World class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
+ this = _Box2D2.new_b2World(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2World
+ __del__ = lambda self : None;
+ def SetFilter(*args):
+ """SetFilter(self, b2ContactFilter filter)"""
+ return _Box2D2.b2World_SetFilter(*args)
+
+ def SetListener(*args):
+ """
+ SetListener(self, b2DestructionListener listener)
+ SetListener(self, b2BoundaryListener listener)
+ SetListener(self, b2ContactListener listener)
+ """
+ return _Box2D2.b2World_SetListener(*args)
+
+ def SetDebugDraw(*args):
+ """SetDebugDraw(self, b2DebugDraw debugDraw)"""
+ return _Box2D2.b2World_SetDebugDraw(*args)
+
+ def CreateStaticBody(*args):
+ """CreateStaticBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateStaticBody(*args)
+
+ def CreateDynamicBody(*args):
+ """CreateDynamicBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateDynamicBody(*args)
+
+ def DestroyBody(*args):
+ """DestroyBody(self, b2Body body)"""
+ return _Box2D2.b2World_DestroyBody(*args)
+
+ def CreateJoint(*args):
+ """CreateJoint(self, b2JointDef def) -> b2Joint"""
+ return _Box2D2.b2World_CreateJoint(*args)
+
+ def DestroyJoint(*args):
+ """DestroyJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DestroyJoint(*args)
+
+ def GetGroundBody(*args):
+ """GetGroundBody(self) -> b2Body"""
+ return _Box2D2.b2World_GetGroundBody(*args)
+
+ def Step(*args):
+ """Step(self, float32 timeStep, int32 iterations)"""
+ return _Box2D2.b2World_Step(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32"""
+ return _Box2D2.b2World_Query(*args)
+
+ def GetBodyList(*args):
+ """GetBodyList(self) -> b2Body"""
+ return _Box2D2.b2World_GetBodyList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2Joint"""
+ return _Box2D2.b2World_GetJointList(*args)
+
+ def SetGravity(*args):
+ """SetGravity(self, b2Vec2 g)"""
+ return _Box2D2.b2World_SetGravity(*args)
+
+ def Solve(*args):
+ """Solve(self, b2TimeStep step)"""
+ return _Box2D2.b2World_Solve(*args)
+
+ def SolveTOI(*args):
+ """SolveTOI(self, b2TimeStep step)"""
+ return _Box2D2.b2World_SolveTOI(*args)
+
+ def DrawJoint(*args):
+ """DrawJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DrawJoint(*args)
+
+ def DrawShape(*args):
+ """DrawShape(self, b2Shape shape, b2XForm xf, b2Color color, bool core)"""
+ return _Box2D2.b2World_DrawShape(*args)
+
+ def DrawDebugData(*args):
+ """DrawDebugData(self)"""
+ return _Box2D2.b2World_DrawDebugData(*args)
+
+ __swig_setmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_set
+ __swig_getmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_get
+ if _newclass:m_blockAllocator = _swig_property(_Box2D2.b2World_m_blockAllocator_get, _Box2D2.b2World_m_blockAllocator_set)
+ __swig_setmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_set
+ __swig_getmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_get
+ if _newclass:m_stackAllocator = _swig_property(_Box2D2.b2World_m_stackAllocator_get, _Box2D2.b2World_m_stackAllocator_set)
+ __swig_setmethods__["m_lock"] = _Box2D2.b2World_m_lock_set
+ __swig_getmethods__["m_lock"] = _Box2D2.b2World_m_lock_get
+ if _newclass:m_lock = _swig_property(_Box2D2.b2World_m_lock_get, _Box2D2.b2World_m_lock_set)
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2World_m_broadPhase_get, _Box2D2.b2World_m_broadPhase_set)
+ __swig_setmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_set
+ __swig_getmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_get
+ if _newclass:m_contactManager = _swig_property(_Box2D2.b2World_m_contactManager_get, _Box2D2.b2World_m_contactManager_set)
+ __swig_setmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_set
+ __swig_getmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_get
+ if _newclass:m_bodyList = _swig_property(_Box2D2.b2World_m_bodyList_get, _Box2D2.b2World_m_bodyList_set)
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_get
+ if _newclass:m_jointList = _swig_property(_Box2D2.b2World_m_jointList_get, _Box2D2.b2World_m_jointList_set)
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_get
+ if _newclass:m_contactList = _swig_property(_Box2D2.b2World_m_contactList_get, _Box2D2.b2World_m_contactList_set)
+ __swig_setmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_set
+ __swig_getmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_get
+ if _newclass:m_bodyCount = _swig_property(_Box2D2.b2World_m_bodyCount_get, _Box2D2.b2World_m_bodyCount_set)
+ __swig_setmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_set
+ __swig_getmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_get
+ if _newclass:m_contactCount = _swig_property(_Box2D2.b2World_m_contactCount_get, _Box2D2.b2World_m_contactCount_set)
+ __swig_setmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_set
+ __swig_getmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_get
+ if _newclass:m_jointCount = _swig_property(_Box2D2.b2World_m_jointCount_get, _Box2D2.b2World_m_jointCount_set)
+ __swig_setmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_set
+ __swig_getmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_get
+ if _newclass:m_gravity = _swig_property(_Box2D2.b2World_m_gravity_get, _Box2D2.b2World_m_gravity_set)
+ __swig_setmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_set
+ __swig_getmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_get
+ if _newclass:m_allowSleep = _swig_property(_Box2D2.b2World_m_allowSleep_get, _Box2D2.b2World_m_allowSleep_set)
+ __swig_setmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_set
+ __swig_getmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_get
+ if _newclass:m_groundBody = _swig_property(_Box2D2.b2World_m_groundBody_get, _Box2D2.b2World_m_groundBody_set)
+ __swig_setmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_set
+ __swig_getmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_get
+ if _newclass:m_destructionListener = _swig_property(_Box2D2.b2World_m_destructionListener_get, _Box2D2.b2World_m_destructionListener_set)
+ __swig_setmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_set
+ __swig_getmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_get
+ if _newclass:m_boundaryListener = _swig_property(_Box2D2.b2World_m_boundaryListener_get, _Box2D2.b2World_m_boundaryListener_set)
+ __swig_setmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_set
+ __swig_getmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_get
+ if _newclass:m_contactFilter = _swig_property(_Box2D2.b2World_m_contactFilter_get, _Box2D2.b2World_m_contactFilter_set)
+ __swig_setmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_set
+ __swig_getmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_get
+ if _newclass:m_contactListener = _swig_property(_Box2D2.b2World_m_contactListener_get, _Box2D2.b2World_m_contactListener_set)
+ __swig_setmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_set
+ __swig_getmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_get
+ if _newclass:m_debugDraw = _swig_property(_Box2D2.b2World_m_debugDraw_get, _Box2D2.b2World_m_debugDraw_set)
+ __swig_setmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_set
+ __swig_getmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_get
+ if _newclass:m_positionIterationCount = _swig_property(_Box2D2.b2World_m_positionIterationCount_get, _Box2D2.b2World_m_positionIterationCount_set)
+ __swig_setmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_set
+ __swig_getmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_get
+ if _newclass:s_enablePositionCorrection = _swig_property(_Box2D2.b2World_s_enablePositionCorrection_get, _Box2D2.b2World_s_enablePositionCorrection_set)
+ __swig_setmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_set
+ __swig_getmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_get
+ if _newclass:s_enableWarmStarting = _swig_property(_Box2D2.b2World_s_enableWarmStarting_get, _Box2D2.b2World_s_enableWarmStarting_set)
+ __swig_setmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_set
+ __swig_getmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_get
+ if _newclass:s_enableTOI = _swig_property(_Box2D2.b2World_s_enableTOI_get, _Box2D2.b2World_s_enableTOI_set)
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian(_object):
+ """Proxy of C++ b2Jacobian class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
+ __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
+ if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
+ __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
+ __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
+ if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
+ __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
+ __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
+ if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
+ __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
+ __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
+ if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Jacobian_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
+ return _Box2D2.b2Jacobian_Set(*args)
+
+ def Compute(*args):
+ """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
+ return _Box2D2.b2Jacobian_Compute(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2Jacobian"""
+ this = _Box2D2.new_b2Jacobian(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+ __del__ = lambda self : None;
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge(_object):
+ """Proxy of C++ b2JointEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
+ __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
+ __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
+ if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2JointEdge"""
+ this = _Box2D2.new_b2JointEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+ __del__ = lambda self : None;
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef(_object):
+ """Proxy of C++ b2JointDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2JointDef"""
+ this = _Box2D2.new_b2JointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
+ __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
+ __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
+ if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
+ __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
+ __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
+ if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
+ __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
+ __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
+ if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+ __del__ = lambda self : None;
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint(_object):
+ """Proxy of C++ b2Joint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Joint_GetType(*args)
+
+ def GetBody1(*args):
+ """GetBody1(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody1(*args)
+
+ def GetBody2(*args):
+ """GetBody2(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody2(*args)
+
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2Joint_GetReactionTorque(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Joint"""
+ return _Box2D2.b2Joint_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Joint_GetUserData(*args)
+
+ def Create(*args):
+ """Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
+ return _Box2D2.b2Joint_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Joint joint, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Joint_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Joint
+ __del__ = lambda self : None;
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2Joint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2Joint_SolveVelocityConstraints(*args)
+
+ def InitPositionConstraints(*args):
+ """InitPositionConstraints(self)"""
+ return _Box2D2.b2Joint_InitPositionConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2Joint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_type"] = _Box2D2.b2Joint_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Joint_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Joint_m_type_get, _Box2D2.b2Joint_m_type_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Joint_m_prev_get, _Box2D2.b2Joint_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Joint_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Joint_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Joint_m_next_get, _Box2D2.b2Joint_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Joint_m_node1_get, _Box2D2.b2Joint_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Joint_m_node2_get, _Box2D2.b2Joint_m_node2_set)
+ __swig_setmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_set
+ __swig_getmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_get
+ if _newclass:m_body1 = _swig_property(_Box2D2.b2Joint_m_body1_get, _Box2D2.b2Joint_m_body1_set)
+ __swig_setmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_set
+ __swig_getmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_get
+ if _newclass:m_body2 = _swig_property(_Box2D2.b2Joint_m_body2_get, _Box2D2.b2Joint_m_body2_set)
+ __swig_setmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_set
+ __swig_getmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_get
+ if _newclass:m_islandFlag = _swig_property(_Box2D2.b2Joint_m_islandFlag_get, _Box2D2.b2Joint_m_islandFlag_set)
+ __swig_setmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_set
+ __swig_getmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_get
+ if _newclass:m_collideConnected = _swig_property(_Box2D2.b2Joint_m_collideConnected_get, _Box2D2.b2Joint_m_collideConnected_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Joint_m_userData_get, _Box2D2.b2Joint_m_userData_set)
+ def __repr__(self):
+ return "b2Joint(body1: %s body2: %s)" % (self.body1, self.body2)
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the joint"""
+ return (getattr(self, "as%sJoint" % self.typeName())) ()
+
+ def asMouseJoint(*args):
+ """asMouseJoint(self) -> b2MouseJoint"""
+ return _Box2D2.b2Joint_asMouseJoint(*args)
+
+ def asGearJoint(*args):
+ """asGearJoint(self) -> b2GearJoint"""
+ return _Box2D2.b2Joint_asGearJoint(*args)
+
+ def asDistanceJoint(*args):
+ """asDistanceJoint(self) -> b2DistanceJoint"""
+ return _Box2D2.b2Joint_asDistanceJoint(*args)
+
+ def asPrismaticJoint(*args):
+ """asPrismaticJoint(self) -> b2PrismaticJoint"""
+ return _Box2D2.b2Joint_asPrismaticJoint(*args)
+
+ def asPulleyJoint(*args):
+ """asPulleyJoint(self) -> b2PulleyJoint"""
+ return _Box2D2.b2Joint_asPulleyJoint(*args)
+
+ def asRevoluteJoint(*args):
+ """asRevoluteJoint(self) -> b2RevoluteJoint"""
+ return _Box2D2.b2Joint_asRevoluteJoint(*args)
+
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+
+def b2Joint_Create(*args):
+ """b2Joint_Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
+ return _Box2D2.b2Joint_Create(*args)
+
+def b2Joint_Destroy(*args):
+ """b2Joint_Destroy(b2Joint joint, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Joint_Destroy(*args)
+
+class b2BodyDef(_object):
+ """Proxy of C++ b2BodyDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BodyDef"""
+ this = _Box2D2.new_b2BodyDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
+ __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
+ if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
+ __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
+ __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
+ __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
+ if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
+ __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
+ __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
+ if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
+ __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
+ __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
+ if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
+ __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
+ __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
+ if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
+ __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
+ __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
+ if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
+ __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
+ __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
+ if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
+ __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
+ __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
+ if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+ __del__ = lambda self : None;
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body(_object):
+ """Proxy of C++ b2Body class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
+ __repr__ = _swig_repr
+ def CreateShape(*args):
+ """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
+ return _Box2D2.b2Body_CreateShape(*args)
+
+ def DestroyShape(*args):
+ """DestroyShape(self, b2Shape shape)"""
+ return _Box2D2.b2Body_DestroyShape(*args)
+
+ def SetMass(*args):
+ """SetMass(self, b2MassData massData)"""
+ return _Box2D2.b2Body_SetMass(*args)
+
+ def SetMassFromShapes(*args):
+ """SetMassFromShapes(self)"""
+ return _Box2D2.b2Body_SetMassFromShapes(*args)
+
+ def SetXForm(*args):
+ """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
+ return _Box2D2.b2Body_SetXForm(*args)
+
+ def GetXForm(*args):
+ """GetXForm(self) -> b2XForm"""
+ return _Box2D2.b2Body_GetXForm(*args)
+
+ def GetPosition(*args):
+ """GetPosition(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetPosition(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Body_GetAngle(*args)
+
+ def GetWorldCenter(*args):
+ """GetWorldCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldCenter(*args)
+
+ def GetLocalCenter(*args):
+ """GetLocalCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalCenter(*args)
+
+ def SetLinearVelocity(*args):
+ """SetLinearVelocity(self, b2Vec2 v)"""
+ return _Box2D2.b2Body_SetLinearVelocity(*args)
+
+ def GetLinearVelocity(*args):
+ """GetLinearVelocity(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocity(*args)
+
+ def SetAngularVelocity(*args):
+ """SetAngularVelocity(self, float32 omega)"""
+ return _Box2D2.b2Body_SetAngularVelocity(*args)
+
+ def GetAngularVelocity(*args):
+ """GetAngularVelocity(self) -> float32"""
+ return _Box2D2.b2Body_GetAngularVelocity(*args)
+
+ def ApplyForce(*args):
+ """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyForce(*args)
+
+ def ApplyTorque(*args):
+ """ApplyTorque(self, float32 torque)"""
+ return _Box2D2.b2Body_ApplyTorque(*args)
+
+ def ApplyImpulse(*args):
+ """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyImpulse(*args)
+
+ def GetMass(*args):
+ """GetMass(self) -> float32"""
+ return _Box2D2.b2Body_GetMass(*args)
+
+ def GetInertia(*args):
+ """GetInertia(self) -> float32"""
+ return _Box2D2.b2Body_GetInertia(*args)
+
+ def GetWorldPoint(*args):
+ """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldPoint(*args)
+
+ def GetWorldVector(*args):
+ """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldVector(*args)
+
+ def GetLocalPoint(*args):
+ """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalPoint(*args)
+
+ def GetLocalVector(*args):
+ """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalVector(*args)
+
+ def IsBullet(*args):
+ """IsBullet(self) -> bool"""
+ return _Box2D2.b2Body_IsBullet(*args)
+
+ def SetBullet(*args):
+ """SetBullet(self, bool flag)"""
+ return _Box2D2.b2Body_SetBullet(*args)
+
+ def IsStatic(*args):
+ """IsStatic(self) -> bool"""
+ return _Box2D2.b2Body_IsStatic(*args)
+
+ def IsDynamic(*args):
+ """IsDynamic(self) -> bool"""
+ return _Box2D2.b2Body_IsDynamic(*args)
+
+ def IsFrozen(*args):
+ """IsFrozen(self) -> bool"""
+ return _Box2D2.b2Body_IsFrozen(*args)
+
+ def IsSleeping(*args):
+ """IsSleeping(self) -> bool"""
+ return _Box2D2.b2Body_IsSleeping(*args)
+
+ def AllowSleeping(*args):
+ """AllowSleeping(self, bool flag)"""
+ return _Box2D2.b2Body_AllowSleeping(*args)
+
+ def WakeUp(*args):
+ """WakeUp(self)"""
+ return _Box2D2.b2Body_WakeUp(*args)
+
+ def GetShapeList(*args):
+ """GetShapeList(self) -> b2Shape"""
+ return _Box2D2.b2Body_GetShapeList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2JointEdge"""
+ return _Box2D2.b2Body_GetJointList(*args)
+
+ def GetContactList(*args):
+ """GetContactList(self) -> b2ContactEdge"""
+ return _Box2D2.b2Body_GetContactList(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Body"""
+ return _Box2D2.b2Body_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Body_GetUserData(*args)
+
+ e_frozenFlag = _Box2D2.b2Body_e_frozenFlag
+ e_islandFlag = _Box2D2.b2Body_e_islandFlag
+ e_sleepFlag = _Box2D2.b2Body_e_sleepFlag
+ e_allowSleepFlag = _Box2D2.b2Body_e_allowSleepFlag
+ e_bulletFlag = _Box2D2.b2Body_e_bulletFlag
+ e_fixedRotationFlag = _Box2D2.b2Body_e_fixedRotationFlag
+ e_staticType = _Box2D2.b2Body_e_staticType
+ e_dynamicType = _Box2D2.b2Body_e_dynamicType
+ e_maxTypes = _Box2D2.b2Body_e_maxTypes
+ def __init__(self, *args):
+ """__init__(self, b2BodyDef bd, uint16 type, b2World world) -> b2Body"""
+ this = _Box2D2.new_b2Body(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Body
+ __del__ = lambda self : None;
+ def ComputeMass(*args):
+ """ComputeMass(self)"""
+ return _Box2D2.b2Body_ComputeMass(*args)
+
+ def SynchronizeShapes(*args):
+ """SynchronizeShapes(self) -> bool"""
+ return _Box2D2.b2Body_SynchronizeShapes(*args)
+
+ def SynchronizeTransform(*args):
+ """SynchronizeTransform(self)"""
+ return _Box2D2.b2Body_SynchronizeTransform(*args)
+
+ def IsConnected(*args):
+ """IsConnected(self, b2Body other) -> bool"""
+ return _Box2D2.b2Body_IsConnected(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Body_Advance(*args)
+
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Body_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Body_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Body_m_flags_get, _Box2D2.b2Body_m_flags_set)
+ __swig_setmethods__["m_type"] = _Box2D2.b2Body_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Body_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Body_m_type_get, _Box2D2.b2Body_m_type_set)
+ __swig_setmethods__["m_xf"] = _Box2D2.b2Body_m_xf_set
+ __swig_getmethods__["m_xf"] = _Box2D2.b2Body_m_xf_get
+ if _newclass:m_xf = _swig_property(_Box2D2.b2Body_m_xf_get, _Box2D2.b2Body_m_xf_set)
+ __swig_setmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_set
+ __swig_getmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_get
+ if _newclass:m_sweep = _swig_property(_Box2D2.b2Body_m_sweep_get, _Box2D2.b2Body_m_sweep_set)
+ __swig_setmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_set
+ __swig_getmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_get
+ if _newclass:m_linearVelocity = _swig_property(_Box2D2.b2Body_m_linearVelocity_get, _Box2D2.b2Body_m_linearVelocity_set)
+ __swig_setmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_set
+ __swig_getmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_get
+ if _newclass:m_angularVelocity = _swig_property(_Box2D2.b2Body_m_angularVelocity_get, _Box2D2.b2Body_m_angularVelocity_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2Body_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2Body_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2Body_m_force_get, _Box2D2.b2Body_m_force_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2Body_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2Body_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2Body_m_torque_get, _Box2D2.b2Body_m_torque_set)
+ __swig_setmethods__["m_world"] = _Box2D2.b2Body_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2Body_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2Body_m_world_get, _Box2D2.b2Body_m_world_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Body_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Body_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Body_m_prev_get, _Box2D2.b2Body_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Body_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Body_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Body_m_next_get, _Box2D2.b2Body_m_next_set)
+ __swig_setmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_set
+ __swig_getmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_get
+ if _newclass:m_shapeList = _swig_property(_Box2D2.b2Body_m_shapeList_get, _Box2D2.b2Body_m_shapeList_set)
+ __swig_setmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_set
+ __swig_getmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_get
+ if _newclass:m_shapeCount = _swig_property(_Box2D2.b2Body_m_shapeCount_get, _Box2D2.b2Body_m_shapeCount_set)
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_get
+ if _newclass:m_jointList = _swig_property(_Box2D2.b2Body_m_jointList_get, _Box2D2.b2Body_m_jointList_set)
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_get
+ if _newclass:m_contactList = _swig_property(_Box2D2.b2Body_m_contactList_get, _Box2D2.b2Body_m_contactList_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2Body_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2Body_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2Body_m_mass_get, _Box2D2.b2Body_m_mass_set)
+ __swig_setmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_set
+ __swig_getmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_get
+ if _newclass:m_invMass = _swig_property(_Box2D2.b2Body_m_invMass_get, _Box2D2.b2Body_m_invMass_set)
+ __swig_setmethods__["m_I"] = _Box2D2.b2Body_m_I_set
+ __swig_getmethods__["m_I"] = _Box2D2.b2Body_m_I_get
+ if _newclass:m_I = _swig_property(_Box2D2.b2Body_m_I_get, _Box2D2.b2Body_m_I_set)
+ __swig_setmethods__["m_invI"] = _Box2D2.b2Body_m_invI_set
+ __swig_getmethods__["m_invI"] = _Box2D2.b2Body_m_invI_get
+ if _newclass:m_invI = _swig_property(_Box2D2.b2Body_m_invI_get, _Box2D2.b2Body_m_invI_set)
+ __swig_setmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_set
+ __swig_getmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_get
+ if _newclass:m_linearDamping = _swig_property(_Box2D2.b2Body_m_linearDamping_get, _Box2D2.b2Body_m_linearDamping_set)
+ __swig_setmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_set
+ __swig_getmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_get
+ if _newclass:m_angularDamping = _swig_property(_Box2D2.b2Body_m_angularDamping_get, _Box2D2.b2Body_m_angularDamping_set)
+ __swig_setmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_set
+ __swig_getmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_get
+ if _newclass:m_sleepTime = _swig_property(_Box2D2.b2Body_m_sleepTime_get, _Box2D2.b2Body_m_sleepTime_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Body_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Body_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Body_m_userData_get, _Box2D2.b2Body_m_userData_set)
+ def __repr__(self):
+ return "b2Body(Position: %s)" % (self.GetPosition())
+
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ """Proxy of C++ b2DistanceJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DistanceJointDef"""
+ this = _Box2D2.new_b2DistanceJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
+ return _Box2D2.b2DistanceJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
+ __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
+ __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
+ if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+ __del__ = lambda self : None;
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ """Proxy of C++ b2DistanceJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
+ this = _Box2D2.new_b2DistanceJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
+ __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
+ if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2DistanceJoint_m_force_get, _Box2D2.b2DistanceJoint_m_force_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
+ __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
+ __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
+ if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+ __del__ = lambda self : None;
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ """Proxy of C++ b2MouseJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2MouseJointDef"""
+ this = _Box2D2.new_b2MouseJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
+ __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
+ if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
+ __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
+ __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
+ if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
+ __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
+ __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
+ if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+ __del__ = lambda self : None;
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ """Proxy of C++ b2MouseJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
+
+ def SetTarget(*args):
+ """SetTarget(self, b2Vec2 target)"""
+ return _Box2D2.b2MouseJoint_SetTarget(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
+ this = _Box2D2.new_b2MouseJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
+ __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
+ if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
+ __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
+ __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
+ if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2MouseJoint_m_force_get, _Box2D2.b2MouseJoint_m_force_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
+ __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
+ __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
+ if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
+ __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
+ __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
+ if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
+ __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
+ __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
+ if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+ __del__ = lambda self : None;
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ """Proxy of C++ b2PrismaticJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PrismaticJointDef"""
+ this = _Box2D2.new_b2PrismaticJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
+ return _Box2D2.b2PrismaticJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
+ __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
+ __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
+ if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
+ __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
+ __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
+ if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
+ __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
+ __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
+ if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
+ __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
+ __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
+ if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+ __del__ = lambda self : None;
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ """Proxy of C++ b2PrismaticJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
+
+ def GetJointTranslation(*args):
+ """GetJointTranslation(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2PrismaticJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorForce(*args):
+ """SetMaxMotorForce(self, float32 force)"""
+ return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
+
+ def GetMotorForce(*args):
+ """GetMotorForce(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
+ this = _Box2D2.new_b2PrismaticJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
+ __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
+ if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
+ __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
+ __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
+ if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
+ __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
+ __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
+ if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
+ __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
+ __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
+ if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
+ __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
+ __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
+ if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
+ __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
+ __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
+ if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
+ __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
+ __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
+ if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
+ __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
+ if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
+ __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
+ __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
+ if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
+ __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
+ __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
+ if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+ __del__ = lambda self : None;
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ """Proxy of C++ b2RevoluteJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2RevoluteJointDef"""
+ this = _Box2D2.new_b2RevoluteJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
+ return _Box2D2.b2RevoluteJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
+ __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
+ __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
+ if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
+ __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
+ __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
+ if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
+ __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
+ __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
+ if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+ __del__ = lambda self : None;
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ """Proxy of C++ b2RevoluteJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
+
+ def GetJointAngle(*args):
+ """GetJointAngle(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2RevoluteJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorTorque(*args):
+ """SetMaxMotorTorque(self, float32 torque)"""
+ return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
+
+ def GetMotorTorque(*args):
+ """GetMotorTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
+ this = _Box2D2.new_b2RevoluteJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
+ __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
+ if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
+ __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
+ if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
+ __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
+ __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
+ if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
+ __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
+ __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
+ if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
+ __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
+ __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
+ if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
+ __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
+ __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
+ if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+ __del__ = lambda self : None;
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ """Proxy of C++ b2PulleyJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PulleyJointDef"""
+ this = _Box2D2.new_b2PulleyJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """
+ Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
+ b2Vec2 anchor1, b2Vec2 anchor2,
+ float32 ratio)
+ """
+ return _Box2D2.b2PulleyJointDef_Initialize(*args)
+
+ __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
+ __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
+ if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
+ __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
+ __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
+ if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
+ __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
+ __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
+ if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
+ __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
+ __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
+ if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
+ __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
+ __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
+ if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
+ __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
+ __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
+ if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+ __del__ = lambda self : None;
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ """Proxy of C++ b2PulleyJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
+
+ def GetGroundAnchor1(*args):
+ """GetGroundAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
+
+ def GetGroundAnchor2(*args):
+ """GetGroundAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
+
+ def GetLength1(*args):
+ """GetLength1(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength1(*args)
+
+ def GetLength2(*args):
+ """GetLength2(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength2(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
+ this = _Box2D2.new_b2PulleyJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
+ __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
+ if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
+ __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
+ if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
+ __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
+ __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
+ if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
+ __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
+ __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
+ if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
+ __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
+ __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
+ if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
+ __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
+ __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
+ if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
+ __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
+ __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
+ if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
+ __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
+ __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
+ if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
+ __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
+ __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
+ if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
+ __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
+ __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
+ if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
+ __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
+ __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
+ if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
+ __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
+ __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
+ if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
+ __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
+ __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
+ if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
+ __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
+ __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
+ if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
+ __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
+ __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
+ if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
+ __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
+ __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
+ if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+ __del__ = lambda self : None;
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ """Proxy of C++ b2GearJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2GearJointDef"""
+ this = _Box2D2.new_b2GearJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
+ __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
+ if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
+ __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
+ __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
+ if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+ __del__ = lambda self : None;
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ """Proxy of C++ b2GearJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetReactionTorque(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2GearJointDef data) -> b2GearJoint"""
+ this = _Box2D2.new_b2GearJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
+ __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
+ if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
+ __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
+ __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
+ if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
+ __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
+ __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
+ if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
+ __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
+ __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
+ if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
+ __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
+ __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
+ if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
+ __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
+ __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
+ if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
+ __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
+ if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+ __del__ = lambda self : None;
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/__init__.py b/elements/__init__.py
new file mode 100755
index 0000000..723c2cc
--- /dev/null
+++ b/elements/__init__.py
@@ -0,0 +1,2 @@
+__all__ = ['locals', 'menu']
+from elements import Elements
diff --git a/elements/add_objects.py b/elements/add_objects.py
new file mode 100755
index 0000000..b93c479
--- /dev/null
+++ b/elements/add_objects.py
@@ -0,0 +1,509 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+from locals import *
+from elements import box2d
+
+# Imports
+from math import pi
+from math import sqrt
+from math import asin
+
+import tools_poly
+
+class Add:
+ element_count = 0
+
+ def __init__(self, parent):
+ self.parent = parent
+
+ def ground(self):
+ """ Add a static ground to the scene
+
+ Return: box2d.b2Body
+ """
+ return self._rect((-10.0, 0.0), 50.0, 0.1, dynamic=False)
+
+ def triangle(self, pos, sidelength, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ """ Add a triangle | pos & a in the current input unit system (meters or pixels)
+
+ Parameters:
+ pos .... position (x,y)
+ sidelength ...... sidelength
+ other .. see [physics parameters]
+
+ Return: box2d.b2Body
+ """
+ vertices = [(-sidelength, 0.0), (sidelength, 0.0), (0.0, 2*sidelength)]
+ return self.poly(pos, vertices, dynamic, density, restitution, friction, screenCoord)
+
+ def ball(self, pos, radius, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ """ Add a dynamic ball at pos after correcting the positions and legths to the internal
+ meter system if neccessary (if INPUT_PIXELS), then call self._add_ball(...)
+
+ Parameters:
+ pos ..... position (x,y)
+ radius .. circle radius
+ other ... see [physics parameters]
+
+ Return: box2d.b2Body
+ """
+ # Bring coordinates into the world coordinate system (flip, camera offset, ...)
+ if screenCoord: x, y = self.parent.to_world(pos)
+ else: x, y = pos
+
+
+ if self.parent.input == INPUT_PIXELS:
+ x /= self.parent.ppm
+ y /= self.parent.ppm
+ radius /= self.parent.ppm
+
+ return self._ball((x,y), radius, dynamic, density, restitution, friction)
+
+ def _ball(self, pos, radius, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
+ # Add a ball without correcting any settings
+ # meaning, pos and vertices are in meters
+ # Define the body
+ x, y = pos
+ bodyDef = box2d.b2BodyDef()
+ bodyDef.position.Set(x, y)
+ bodyDef.sleepFlag = True
+# bodyDef.allowSleep(True)
+
+ userData = { 'color' : self.parent.get_color() }
+ bodyDef.userData = userData
+
+ # Create the Body
+ if not dynamic:
+ density = 0
+
+ body = self.parent.world.CreateBody(bodyDef)
+
+ self.parent.element_count += 1
+
+ # Add a shape to the Body
+ circleDef = box2d.b2CircleDef()
+ circleDef.density = density
+ circleDef.radius = radius
+ circleDef.restitution = restitution
+ circleDef.friction = friction
+
+ body.CreateShape(circleDef)
+ body.SetMassFromShapes();
+
+ return body
+
+ def rect(self, pos, width, height, angle=0, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ """ Add a dynamic rectangle with input unit according to self.input (INPUT_PIXELS or INPUT_METERS)
+ Correcting the positions to meters and calling self._add_rect()
+
+ Parameters:
+ pos ..... position (x,y)
+ width ....... horizontal line
+ height ....... vertical line
+ angle ........ in degrees (0 .. 360)
+ other ... see [physics parameters]
+
+ Return: box2d.b2Body
+ """
+ # Bring coordinates into the world coordinate system (flip, camera offset, ...)
+ if screenCoord: x, y = self.parent.to_world(pos)
+ else: x, y = pos
+
+ # If required, translate pixel -> meters
+ if self.parent.input == INPUT_PIXELS:
+ x /= self.parent.ppm
+ y /= self.parent.ppm
+ width /= self.parent.ppm
+ height /= self.parent.ppm
+
+ # grad -> radians
+ angle = (angle * pi) / 180
+
+ return self._rect((x,y), width, height, angle, dynamic, density, restitution, friction)
+
+
+ def wall(self, pos1, pos2, width=5, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ """ Add a static rectangle between two arbitrary points with input unit according to self.input
+ (INPUT_PIXELS or INPUT_METERS) Correcting the positions to meters and calling self._add_rect()
+
+ Return: box2d.b2Body
+ """
+ if width < 5: width = 5
+
+ if (pos1[0] < pos2[0]):
+ x1, y1 = pos1
+ x2, y2 = pos2
+ else:
+ x1, y1 = pos2
+ x2, y2 = pos1
+
+ # Bring coordinates into the world coordinate system (flip, camera offset, ...)
+ if screenCoord:
+ x1, y1 = self.parent.to_world((x1, y1))
+ x2, y2 = self.parent.to_world((x2, y2))
+
+ # If required, translate pixel -> meters
+ if self.parent.input == INPUT_PIXELS:
+ x1 /= self.parent.ppm
+ y1 /= self.parent.ppm
+ x2 /= self.parent.ppm
+ y2 /= self.parent.ppm
+ width /= self.parent.ppm
+
+ length = sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) )*0.5
+
+ if width > 0:
+ halfX = x1 + (x2-x1)*0.5
+ halfY = y1 + (y2-y1)*0.5
+
+ angle = asin( (y2-halfY)/length )
+ return self._rect((halfX, halfY), length, width, angle, False, density, restitution, friction)
+
+ def _rect(self, pos, width, height, angle=0, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
+ # Add a rect without correcting any settings
+ # meaning, pos and vertices are in meters
+ # angle is now in radians ((degrees * pi) / 180))
+ x, y = pos
+ bodyDef = box2d.b2BodyDef()
+ bodyDef.position.Set(x, y)
+
+ userData = { 'color' : self.parent.get_color() }
+ bodyDef.userData = userData
+
+ # Create the Body
+ if not dynamic:
+ density = 0
+
+ bodyDef.sleepFlag = True
+
+ body = self.parent.world.CreateBody(bodyDef)
+
+ self.parent.element_count += 1
+
+ # Add a shape to the Body
+ boxDef = box2d.b2PolygonDef()
+
+ boxDef.SetAsBox(width, height, box2d.b2Vec2(0,0), angle)
+ boxDef.density = density
+ boxDef.restitution = restitution
+ boxDef.friction = friction
+ body.CreateShape(boxDef)
+
+ body.SetMassFromShapes()
+
+ return body
+
+ def poly(self, pos, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ """ Add a dynamic polygon, which has the vertices arranged around the poly's center at pos
+ Correcting the positions to meters if INPUT_PIXELS, and calling self._add_poly()
+
+ Parameters:
+ pos ....... position (x,y)
+ vertices .. vertices arranged around the center
+ other ... see [physics parameters]
+
+ Return: box2d.b2Body
+ """
+ # Bring coordinates into the world coordinate system (flip, camera offset, ...)
+ if screenCoord: x, y = self.parent.to_world(pos)
+ else: x, y = pos
+
+ # If required, translate pixel -> meters
+ if self.parent.input == INPUT_PIXELS:
+ # translate pixel -> meters
+ x /= self.parent.ppm
+ y /= self.parent.ppm
+
+ # Translate vertices from pixels to meters
+ v_new = []
+ for v in vertices:
+ vx, vy = v
+ v_new.append((vx/self.parent.ppm, vy/self.parent.ppm))
+ vertices = v_new
+
+ return self._poly((x,y), vertices, dynamic, density, restitution, friction)
+
+ def _poly(self, pos, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
+ # add a centered poly at pos without correcting any settings
+ # meaning, pos and vertices are in meters
+ x, y = pos
+ bodyDef = box2d.b2BodyDef()
+ bodyDef.position.Set(x, y)
+ bodyDef.sleepFlag = True
+
+ userData = { 'color' : self.parent.get_color() }
+ bodyDef.userData = userData
+
+ # Create the Body
+ if not dynamic:
+ density = 0
+
+ body = self.parent.world.CreateBody(bodyDef)
+
+ self.parent.element_count += 1
+
+ # Add a shape to the Body
+ polyDef = box2d.b2PolygonDef()
+ polyDef.vertexCount = len(vertices)
+ for i in range(len(vertices)):
+ vx, vy = vertices[i]
+ polyDef.setVertex(i, box2d.b2Vec2(vx, vy))
+
+ polyDef.density = density
+ polyDef.restitution = restitution
+ polyDef.friction = friction
+
+ body.CreateShape(polyDef)
+ body.SetMassFromShapes()
+
+ return body
+
+ def concavePoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=True):
+ # 1. Step: Reduce
+ # Detect if the polygon is closed or open
+ if vertices[0] != vertices[-1]:
+ is_closed = False
+ else:
+ is_closed = True
+
+ # Continue reducing the vertecs
+ x, y = c = tools_poly.calc_center(vertices)
+ vertices = tools_poly.poly_center_vertices(vertices)
+
+ # Bring coordinates into the world coordinate system (flip, camera offset, ...)
+ if screenCoord: x, y = self.parent.to_world(c)
+ else: x, y = c
+
+ # If required, translate pixel -> meters
+ if self.parent.input == INPUT_PIXELS:
+ # translate pixel -> meters
+ x /= self.parent.ppm
+ y /= self.parent.ppm
+
+ # Let's add the body
+ bodyDef = box2d.b2BodyDef()
+ bodyDef.position.Set(x, y)
+ bodyDef.sleepFlag = True
+
+ userData = { 'color' : self.parent.get_color() }
+ bodyDef.userData = userData
+
+ # Create the Body
+ if not dynamic:
+ density = 0
+
+ body = self.parent.world.CreateBody(bodyDef)
+
+ self.parent.element_count += 1
+
+ # Create the reusable Box2D polygon and circle definitions
+ polyDef = box2d.b2PolygonDef()
+ polyDef.vertexCount = 4 # rectangle
+ polyDef.density = density
+ polyDef.restitution = restitution
+ polyDef.friction = friction
+
+ circleDef = box2d.b2CircleDef()
+ circleDef.density = density
+ circleDef.radius = 0.086
+ circleDef.restitution = restitution
+ circleDef.friction = friction
+
+ # Set the scale factor
+ factor = 8.0
+
+ v2 = box2d.b2Vec2().fromTuple(vertices[0])
+ for v in vertices[1:]:
+ v1 = v2.copy()
+ v2 = box2d.b2Vec2().fromTuple(v)
+
+ vdir = v2-v1 # (v2x-v1x, v2y-v1y)
+ vdir.Normalize()
+
+ # we need a little size for the end part
+ vn = box2d.b2Vec2(-vdir.y*factor, vdir.x*factor)
+
+ v = [ v1+vn, v1-vn, v2-vn, v2+vn ]
+
+ # Create a line (rect) for each part of the polygon,
+ # and attach it to the body
+ for i in range(len(v)):
+ polyDef.setVertex(i, v[i] / self.parent.ppm)
+
+ if not tools_poly.checkDef(polyDef):
+ print "concavePoly: Created an invalid polygon!"
+ return [], 0
+
+ body.CreateShape(polyDef)
+
+ # Now add a circle to the points between the rects
+ # to avoid sharp edges and gaps
+ if not is_closed and v2.tuple() == vertices[-1]:
+ # Don't add a circle at the end
+ break
+
+ circleDef.localPosition = v2 / self.parent.ppm
+ body.CreateShape(circleDef)
+
+ # Now, all shapes have been attached
+ body.SetMassFromShapes()
+
+ # Return hard and soft reduced vertices
+ return body
+
+ def complexPoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
+ # 1. Step: Reduce
+ # 2. Step: See if start and end are close, if so then close the polygon
+ # 3. Step: Detect if convex or concave
+ # 4. Step: Start self.convexPoly or self.concavePoly
+ vertices, is_convex = tools_poly.reduce_poly_by_angle(vertices)
+ #print "->", is_convex
+
+ # If start and endpoints are close to each other, close polygon
+ x1, y1 = vertices[0]
+ x2, y2 = vertices[-1]
+ dx = x2 - x1
+ dy = y2 - y1
+ l = sqrt((dx*dx)+(dy*dy))
+
+ if l < 50:
+ vertices[-1] = vertices[0]
+ else:
+ # Never convex if open (we decide so :)
+ is_convex = False
+
+ if tools_poly.is_line(vertices):
+ # Lines shall be drawn by self.concavePoly(...)
+ print "is line"
+ is_convex = False
+
+ if is_convex:
+ print "convex"
+ return self.convexPoly(vertices, dynamic, density, restitution, friction), vertices
+ else:
+ print "concave"
+ return self.concavePoly(vertices, dynamic, density, restitution, friction), vertices
+
+
+ def convexPoly(self, vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5):
+ """ Add a complex polygon with vertices in absolute positions (meters or pixels, according
+ to INPUT_PIXELS or INPUT_METERS). This function does the reduction and convec hulling
+ of the poly, and calls add_poly(...)
+
+ Parameters:
+ vertices .. absolute vertices positions
+ other ..... see [physics parameters]
+
+ Return: box2d.b2Body
+ """
+ # NOTE: Box2D has a maximum poly vertex count, defined in Common/box2d.b2Settings.h (box2d.b2_maxPolygonVertices)
+ # We need to make sure, that we reach that by reducing the poly with increased tolerance
+ # Reduce Polygon
+ tolerance = 10 #5
+ v_new = vertices
+ while len(v_new) > box2d.b2_maxPolygonVertices:
+ tolerance += 1
+ v_new = tools_poly.reduce_poly(vertices, tolerance)
+
+ print "convexPoly: Polygon reduced from %i to %i vertices | tolerance: %i" % (len(vertices), len(v_new), tolerance)
+ vertices = v_new
+
+ # So poly should be alright now
+ # Continue reducing the vertecs
+ vertices_orig_reduced = vertices
+ vertices = tools_poly.poly_center_vertices(vertices)
+
+ vertices = tools_poly.convex_hull(vertices)
+
+ if len(vertices) < 3:
+ return
+
+ # Define the body
+ x, y = c = tools_poly.calc_center(vertices_orig_reduced)
+ return self.poly((x,y), vertices, dynamic, density, restitution, friction)
+
+ def joint(self, *args):
+ print "* Add Joint:", args
+
+ if len(args) == 4:
+ # Distance Joint
+ b1, b2, p1, p2 = args
+
+ p1 = self.parent.to_world(p1)
+ p2 = self.parent.to_world(p2)
+
+ p1x, p1y = p1
+ p2x, p2y = p2
+
+ p1x /= self.parent.ppm
+ p1y /= self.parent.ppm
+ p2x /= self.parent.ppm
+ p2y /= self.parent.ppm
+
+ p1 = box2d.b2Vec2(p1x, p1y)
+ p2 = box2d.b2Vec2(p2x, p2y)
+
+ jointDef = box2d.b2DistanceJointDef()
+ jointDef.Initialize(b1, b2, p1, p2)
+ jointDef.collideConnected = True
+
+ self.parent.world.CreateJoint(jointDef)
+
+ elif len(args) == 3:
+ # Revolute Joint
+ pass
+
+ elif len(args) == 1:
+ # Revolute Joint to the Background
+ b1 = self.parent.world.GetGroundBody()
+ b2 = args[0]
+ p1 = b2.GetWorldCenter()
+
+ jointDef = box2d.b2RevoluteJointDef()
+ jointDef.Initialize(b1, b2, p1)
+
+ self.parent.world.CreateJoint(jointDef)
+
+ def mouseJoint(self, body, pos):
+ pos = self.parent.to_world(pos)
+ x, y = pos
+ x /= self.parent.ppm
+ y /= self.parent.ppm
+
+ mj = box2d.b2MouseJointDef()
+ mj.body1 = self.parent.world.GetGroundBody()
+ mj.body2 = body
+ mj.target = box2d.b2Vec2(x, y)
+ mj.maxForce = 50.0 * body.GetMass()
+ self.parent.mouseJoint = self.parent.world.CreateJoint(mj).getAsType()
+ body.WakeUp()
+
+ def remove_mouseJoint(self):
+ if self.parent.mouseJoint:
+ self.parent.world.DestroyJoint(self.parent.mouseJoint)
+ self.parent.mouseJoint = None
+
diff --git a/elements/box2d/__init__.py b/elements/box2d/__init__.py
new file mode 100755
index 0000000..57a0cad
--- /dev/null
+++ b/elements/box2d/__init__.py
@@ -0,0 +1,22 @@
+from platform import architecture
+from platform import system as platformsystem
+
+s = platformsystem()
+arch, arch2 = architecture()
+
+print "Loading box2d for %s (%s)" % (s, arch)
+
+if s == 'Linux':
+ if arch == "64bit":
+ from box2d_linux64 import *
+ else:
+ try:
+ from box2d_linux32 import *
+ except:
+ from box2d_linux32ppc import *
+
+elif s == 'Windows':
+ from box2d_win import *
+
+elif s == 'Darwin':
+ from box2d_macosx import *
diff --git a/elements/box2d/box2d_linux32/Box2D2.py b/elements/box2d/box2d_linux32/Box2D2.py
new file mode 100755
index 0000000..060842c
--- /dev/null
+++ b/elements/box2d/box2d_linux32/Box2D2.py
@@ -0,0 +1,3728 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.31
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+try:
+ _swig_property = property
+except NameError:
+ pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+try:
+ import weakref
+ weakref_proxy = weakref.proxy
+except:
+ weakref_proxy = lambda x: x
+
+
+
+def b2Alloc(*args):
+ """b2Alloc(int32 size) -> void"""
+ return _Box2D2.b2Alloc(*args)
+
+def b2Free(*args):
+ """b2Free(void mem)"""
+ return _Box2D2.b2Free(*args)
+class b2Version(_object):
+ """Proxy of C++ b2Version class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
+ __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
+ if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
+ __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
+ __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
+ if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
+ __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
+ __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
+ if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Version"""
+ this = _Box2D2.new_b2Version(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Version
+ __del__ = lambda self : None;
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+
+def b2MixFriction(*args):
+ """b2MixFriction(float32 friction1, float32 friction2) -> float32"""
+ return _Box2D2.b2MixFriction(*args)
+
+def b2MixRestitution(*args):
+ """b2MixRestitution(float32 restitution1, float32 restitution2) -> float32"""
+ return _Box2D2.b2MixRestitution(*args)
+
+def b2IsValid(*args):
+ """b2IsValid(float32 x) -> bool"""
+ return _Box2D2.b2IsValid(*args)
+
+def b2InvSqrt(*args):
+ """b2InvSqrt(float32 x) -> float32"""
+ return _Box2D2.b2InvSqrt(*args)
+class b2Vec2(_object):
+ """Proxy of C++ b2Vec2 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Vec2
+ __init__(self, float32 x, float32 y) -> b2Vec2
+ """
+ this = _Box2D2.new_b2Vec2(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Vec2_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, float32 x_, float32 y_)"""
+ return _Box2D2.b2Vec2_Set(*args)
+
+ def __neg__(*args):
+ """__neg__(self) -> b2Vec2"""
+ return _Box2D2.b2Vec2___neg__(*args)
+
+ def add_vector(*args):
+ """add_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_add_vector(*args)
+
+ def sub_vector(*args):
+ """sub_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_sub_vector(*args)
+
+ def mul_float(*args):
+ """mul_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_mul_float(*args)
+
+ def Length(*args):
+ """Length(self) -> float32"""
+ return _Box2D2.b2Vec2_Length(*args)
+
+ def LengthSquared(*args):
+ """LengthSquared(self) -> float32"""
+ return _Box2D2.b2Vec2_LengthSquared(*args)
+
+ def Normalize(*args):
+ """Normalize(self) -> float32"""
+ return _Box2D2.b2Vec2_Normalize(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Vec2_IsValid(*args)
+
+ __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
+ __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
+ if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
+ __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
+ __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
+ if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
+ def __repr__(self):
+ return "b2Vec2(%g,%g)" % (self.x, self.y)
+ def tuple(self):
+ return (self.x, self.y)
+ def fromTuple(self, tuple):
+ self.x, self.y = tuple
+ return self
+ def copy(self):
+ return b2Vec2(self.x, self.y)
+ def __iadd__(self, other):
+ self.add_vector(other)
+ return self
+ def __isub__(self, other):
+ self.sub_vector(other)
+ return self
+ def __imul__(self, a):
+ self.mul_float(a)
+ return self
+ def __idiv__(self, a):
+ self.div_float(a)
+ return self
+
+
+ def __div__(*args):
+ """__div__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___div__(*args)
+
+ def __mul__(*args):
+ """__mul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___mul__(*args)
+
+ def __add__(*args):
+ """__add__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___add__(*args)
+
+ def __sub__(*args):
+ """__sub__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___sub__(*args)
+
+ def __rmul__(*args):
+ """__rmul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rmul__(*args)
+
+ def __rdiv__(*args):
+ """__rdiv__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rdiv__(*args)
+
+ def div_float(*args):
+ """div_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_div_float(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+ __del__ = lambda self : None;
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22(_object):
+ """Proxy of C++ b2Mat22 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Mat22
+ __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
+ __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
+ __init__(self, float32 angle) -> b2Mat22
+ """
+ this = _Box2D2.new_b2Mat22(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Set(*args):
+ """
+ Set(self, b2Vec2 c1, b2Vec2 c2)
+ Set(self, float32 angle)
+ """
+ return _Box2D2.b2Mat22_Set(*args)
+
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2Mat22_SetIdentity(*args)
+
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Mat22_SetZero(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Mat22_GetAngle(*args)
+
+ def Invert(*args):
+ """Invert(self) -> b2Mat22"""
+ return _Box2D2.b2Mat22_Invert(*args)
+
+ def Solve(*args):
+ """Solve(self, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Mat22_Solve(*args)
+
+ __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
+ __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
+ if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
+ __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
+ __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
+ if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
+ def __repr__(self):
+ return "b2Mat22(col1: %s col2: %s)" % (self.col1, self.col2)
+
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+ __del__ = lambda self : None;
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm(_object):
+ """Proxy of C++ b2XForm class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2XForm
+ __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
+ """
+ this = _Box2D2.new_b2XForm(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2XForm_SetIdentity(*args)
+
+ __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
+ __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+ __del__ = lambda self : None;
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep(_object):
+ """Proxy of C++ b2Sweep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
+ __repr__ = _swig_repr
+ def GetXForm(*args):
+ """GetXForm(self, b2XForm xf, float32 t)"""
+ return _Box2D2.b2Sweep_GetXForm(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Sweep_Advance(*args)
+
+ __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
+ __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
+ if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
+ __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
+ __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
+ if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
+ __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
+ __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
+ if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
+ __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
+ __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
+ if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
+ __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
+ __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
+ if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
+ __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
+ __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
+ if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Sweep"""
+ this = _Box2D2.new_b2Sweep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+ __del__ = lambda self : None;
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+
+def b2Dot(*args):
+ """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2Dot(*args)
+
+def b2sub(*args):
+ """b2sub(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2sub(*args)
+
+def b2mul(*args):
+ """b2mul(float32 s, b2Vec2 a) -> b2Vec2"""
+ return _Box2D2.b2mul(*args)
+
+def b2equ(*args):
+ """b2equ(b2Vec2 a, b2Vec2 b) -> bool"""
+ return _Box2D2.b2equ(*args)
+
+def b2DistanceSquared(*args):
+ """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2DistanceSquared(*args)
+
+def b2Min(*args):
+ """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Min(*args)
+
+def b2Max(*args):
+ """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Max(*args)
+
+def b2Clamp(*args):
+ """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
+ return _Box2D2.b2Clamp(*args)
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+
+def b2NextPowerOfTwo(*args):
+ """b2NextPowerOfTwo(uint32 x) -> uint32"""
+ return _Box2D2.b2NextPowerOfTwo(*args)
+
+def b2IsPowerOfTwo(*args):
+ """b2IsPowerOfTwo(uint32 x) -> bool"""
+ return _Box2D2.b2IsPowerOfTwo(*args)
+class b2ContactID(_object):
+ """Proxy of C++ b2ContactID class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
+ __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
+ if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
+ __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
+ if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
+ def __repr__(self):
+ return "b2ContactID(key: %d Features: \n\t%s)" % \
+ (self.key, self.features)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID"""
+ this = _Box2D2.new_b2ContactID(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+ __del__ = lambda self : None;
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+
+def b2Cross(*args):
+ """
+ b2Cross(b2Vec2 a, b2Vec2 b) -> float32
+ b2Cross(b2Vec2 a, float32 s) -> b2Vec2
+ b2Cross(float32 s, b2Vec2 a) -> b2Vec2
+ """
+ return _Box2D2.b2Cross(*args)
+
+def b2add(*args):
+ """
+ b2add(b2Vec2 a, b2Vec2 b) -> b2Vec2
+ b2add(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ """
+ return _Box2D2.b2add(*args)
+
+def b2Mul(*args):
+ """
+ b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2Mul(*args)
+
+def b2MulT(*args):
+ """
+ b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2MulT(*args)
+
+def b2Abs(*args):
+ """
+ b2Abs(float32 a) -> float32
+ b2Abs(b2Vec2 a) -> b2Vec2
+ b2Abs(b2Mat22 A) -> b2Mat22
+ """
+ return _Box2D2.b2Abs(*args)
+
+def b2Random(*args):
+ """
+ b2Random() -> float32
+ b2Random(float32 lo, float32 hi) -> float32
+ """
+ return _Box2D2.b2Random(*args)
+b2_nullFeature = cvar.b2_nullFeature
+
+class b2ContactID_features(_object):
+ """Proxy of C++ b2ContactID_features class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
+ __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
+ if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
+ __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
+ __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
+ if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
+ __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
+ __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
+ if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
+ __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
+ __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
+ if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
+ def __repr__(self):
+ return "b2ContactID::Features(\n\treferenceFace: %d incidentEdge: %d incidentVertex: %d flip: %d)" % \
+ (self.referenceFace, self.incidentEdge, self.incidentVertex, self.flip)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID_features"""
+ this = _Box2D2.new_b2ContactID_features(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+ __del__ = lambda self : None;
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint(_object):
+ """Proxy of C++ b2ManifoldPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
+ __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
+ if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
+ __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
+ __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
+ if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
+ __swig_setmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_set
+ __swig_getmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_get
+ if _newclass:normalImpulse = _swig_property(_Box2D2.b2ManifoldPoint_normalImpulse_get, _Box2D2.b2ManifoldPoint_normalImpulse_set)
+ __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_set
+ __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_get
+ if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ManifoldPoint_tangentImpulse_get, _Box2D2.b2ManifoldPoint_tangentImpulse_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ManifoldPoint"""
+ this = _Box2D2.new_b2ManifoldPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+ __del__ = lambda self : None;
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold(_object):
+ """Proxy of C++ b2Manifold class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
+ __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
+ if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
+ __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
+ __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
+ if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Manifold"""
+ this = _Box2D2.new_b2Manifold(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+ __del__ = lambda self : None;
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment(_object):
+ """Proxy of C++ b2Segment class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
+ __repr__ = _swig_repr
+ def TestSegment(*args):
+ """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
+ return _Box2D2.b2Segment_TestSegment(*args)
+
+ __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
+ __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
+ if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
+ __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
+ __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
+ if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Segment"""
+ this = _Box2D2.new_b2Segment(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+ __del__ = lambda self : None;
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB(_object):
+ """Proxy of C++ b2AABB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
+ __repr__ = _swig_repr
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2AABB_IsValid(*args)
+
+ __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
+ __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
+ if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
+ __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
+ __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
+ if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2AABB"""
+ this = _Box2D2.new_b2AABB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+ __del__ = lambda self : None;
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB(_object):
+ """Proxy of C++ b2OBB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
+ __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
+ __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
+ __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
+ if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2OBB"""
+ this = _Box2D2.new_b2OBB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+ __del__ = lambda self : None;
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+
+def b2CollideCircles(*args):
+ """
+ b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
+ b2CircleShape circle2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollideCircles(*args)
+
+def b2CollidePolygonAndCircle(*args):
+ """
+ b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
+ b2CircleShape circle, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygonAndCircle(*args)
+
+def b2CollidePolygons(*args):
+ """
+ b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
+ b2PolygonShape polygon2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygons(*args)
+
+def b2TimeOfImpact(*args):
+ """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
+ return _Box2D2.b2TimeOfImpact(*args)
+
+def b2TestOverlap(*args):
+ """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
+ return _Box2D2.b2TestOverlap(*args)
+class b2MassData(_object):
+ """Proxy of C++ b2MassData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
+ __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
+ if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
+ __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
+ __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
+ __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
+ if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2MassData"""
+ this = _Box2D2.new_b2MassData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+ __del__ = lambda self : None;
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+
+def b2Distance(*args):
+ """
+ b2Distance(b2Vec2 a, b2Vec2 b) -> float32
+ b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
+ b2Shape shape2, b2XForm xf2) -> float32
+ """
+ return _Box2D2.b2Distance(*args)
+
+class b2FilterData(_object):
+ """Proxy of C++ b2FilterData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2FilterData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2FilterData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_set
+ __swig_getmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_get
+ if _newclass:categoryBits = _swig_property(_Box2D2.b2FilterData_categoryBits_get, _Box2D2.b2FilterData_categoryBits_set)
+ __swig_setmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_set
+ __swig_getmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_get
+ if _newclass:maskBits = _swig_property(_Box2D2.b2FilterData_maskBits_get, _Box2D2.b2FilterData_maskBits_set)
+ __swig_setmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_set
+ __swig_getmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_get
+ if _newclass:groupIndex = _swig_property(_Box2D2.b2FilterData_groupIndex_get, _Box2D2.b2FilterData_groupIndex_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2FilterData"""
+ this = _Box2D2.new_b2FilterData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2FilterData
+ __del__ = lambda self : None;
+b2FilterData_swigregister = _Box2D2.b2FilterData_swigregister
+b2FilterData_swigregister(b2FilterData)
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef(_object):
+ """Proxy of C++ b2ShapeDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ShapeDef"""
+ this = _Box2D2.new_b2ShapeDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ __del__ = lambda self : None;
+ __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
+ __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
+ __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
+ if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
+ __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
+ __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
+ if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
+ __swig_setmethods__["filter"] = _Box2D2.b2ShapeDef_filter_set
+ __swig_getmethods__["filter"] = _Box2D2.b2ShapeDef_filter_get
+ if _newclass:filter = _swig_property(_Box2D2.b2ShapeDef_filter_get, _Box2D2.b2ShapeDef_filter_set)
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape(_object):
+ """Proxy of C++ b2Shape class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Shape_GetType(*args)
+
+ def IsSensor(*args):
+ """IsSensor(self) -> bool"""
+ return _Box2D2.b2Shape_IsSensor(*args)
+
+ def SetFilterData(*args):
+ """SetFilterData(self, b2FilterData filter)"""
+ return _Box2D2.b2Shape_SetFilterData(*args)
+
+ def GetFilterData(*args):
+ """GetFilterData(self) -> b2FilterData"""
+ return _Box2D2.b2Shape_GetFilterData(*args)
+
+ def GetBody(*args):
+ """GetBody(self) -> b2Body"""
+ return _Box2D2.b2Shape_GetBody(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Shape"""
+ return _Box2D2.b2Shape_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Shape_SetUserData(*args)
+
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
+ return _Box2D2.b2Shape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2Shape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
+ return _Box2D2.b2Shape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
+ return _Box2D2.b2Shape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2Shape_ComputeMass(*args)
+
+ def GetSweepRadius(*args):
+ """GetSweepRadius(self) -> float32"""
+ return _Box2D2.b2Shape_GetSweepRadius(*args)
+
+ def GetFriction(*args):
+ """GetFriction(self) -> float32"""
+ return _Box2D2.b2Shape_GetFriction(*args)
+
+ def GetRestitution(*args):
+ """GetRestitution(self) -> float32"""
+ return _Box2D2.b2Shape_GetRestitution(*args)
+
+ def __repr__(self):
+ return "b2Shape(from Body %s )" % (self.GetBody())
+ def typeName(self):
+ types = { e_unknownShape : "Unknown",
+ e_circleShape : "Circle",
+ e_polygonShape : "Polygon",
+ e_shapeTypeCount: "ShapeType" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the shape"""
+ return (getattr(self, "as%s" % self.typeName())) ()
+
+ def asCircle(*args):
+ """asCircle(self) -> b2CircleShape"""
+ return _Box2D2.b2Shape_asCircle(*args)
+
+ def asPolygon(*args):
+ """asPolygon(self) -> b2PolygonShape"""
+ return _Box2D2.b2Shape_asPolygon(*args)
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Shape_pyGetUserData(*args)
+
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+
+def b2JointInfo(self):
+ """Return a rather verbose string representation of a joint"""
+ props = dir(self)
+ ignoreList = ('this', 'thisown', 'next', 'prev', 'm_next', 'm_prev')
+ info = []
+ for prop in dir(self):
+ if prop[:2]=='__' or prop in ignoreList: continue
+ if not callable(getattr(self, prop)):
+ info.append(prop + ":")
+ info.append(str(getattr(self, prop)))
+ return "%s(%s)" % (self.__class__.__name__, " ".join(info))
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian(_object):
+ """Proxy of C++ b2Jacobian class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
+ __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
+ if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
+ __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
+ __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
+ if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
+ __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
+ __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
+ if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
+ __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
+ __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
+ if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Jacobian_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
+ return _Box2D2.b2Jacobian_Set(*args)
+
+ def Compute(*args):
+ """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
+ return _Box2D2.b2Jacobian_Compute(*args)
+
+ def __repr__(self):
+ return "b2Jacobian(linear1: %s: linear2: %s angular1: %s angular2: %s)" %\
+ (self.linear1, self.linear2, self.angular1, self.angular2)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2Jacobian"""
+ this = _Box2D2.new_b2Jacobian(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+ __del__ = lambda self : None;
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge(_object):
+ """Proxy of C++ b2JointEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
+ __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
+ __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
+ if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
+ def __repr__(self):
+ return "b2JointEdge(other: %s)" % (self.other)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2JointEdge"""
+ this = _Box2D2.new_b2JointEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+ __del__ = lambda self : None;
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef(_object):
+ """Proxy of C++ b2JointDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2JointDef"""
+ this = _Box2D2.new_b2JointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
+ __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
+ __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
+ if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
+ __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
+ __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
+ if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
+ __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
+ __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
+ if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
+ def __repr__(self):
+ return "b2JointDef(body1: %s body2: %s)" % (self.body1, self.body2)
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+ __del__ = lambda self : None;
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint(_object):
+ """Proxy of C++ b2Joint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Joint_GetType(*args)
+
+ def GetBody1(*args):
+ """GetBody1(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody1(*args)
+
+ def GetBody2(*args):
+ """GetBody2(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody2(*args)
+
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2Joint_GetReactionTorque(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Joint"""
+ return _Box2D2.b2Joint_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Joint_SetUserData(*args)
+
+ def __repr__(self):
+ return "b2Joint(m_body1: %s m_body2: %s getAsType(): %s)" % (self.m_body1, self.m_body2, self.getAsType())
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the joint"""
+ return (getattr(self, "as%sJoint" % self.typeName())) ()
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Joint_pyGetUserData(*args)
+
+ def asMouseJoint(*args):
+ """asMouseJoint(self) -> b2MouseJoint"""
+ return _Box2D2.b2Joint_asMouseJoint(*args)
+
+ def asGearJoint(*args):
+ """asGearJoint(self) -> b2GearJoint"""
+ return _Box2D2.b2Joint_asGearJoint(*args)
+
+ def asDistanceJoint(*args):
+ """asDistanceJoint(self) -> b2DistanceJoint"""
+ return _Box2D2.b2Joint_asDistanceJoint(*args)
+
+ def asPrismaticJoint(*args):
+ """asPrismaticJoint(self) -> b2PrismaticJoint"""
+ return _Box2D2.b2Joint_asPrismaticJoint(*args)
+
+ def asPulleyJoint(*args):
+ """asPulleyJoint(self) -> b2PulleyJoint"""
+ return _Box2D2.b2Joint_asPulleyJoint(*args)
+
+ def asRevoluteJoint(*args):
+ """asRevoluteJoint(self) -> b2RevoluteJoint"""
+ return _Box2D2.b2Joint_asRevoluteJoint(*args)
+
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+
+class b2CircleDef(b2ShapeDef):
+ """Proxy of C++ b2CircleDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2CircleDef"""
+ this = _Box2D2.new_b2CircleDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
+ __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
+ if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
+ __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
+ __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
+ if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+ __del__ = lambda self : None;
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ """Proxy of C++ b2CircleShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2CircleShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2CircleShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2CircleShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2CircleShape_ComputeMass(*args)
+
+ def GetLocalPosition(*args):
+ """GetLocalPosition(self) -> b2Vec2"""
+ return _Box2D2.b2CircleShape_GetLocalPosition(*args)
+
+ def GetRadius(*args):
+ """GetRadius(self) -> float32"""
+ return _Box2D2.b2CircleShape_GetRadius(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+ __del__ = lambda self : None;
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ """Proxy of C++ b2PolygonDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PolygonDef"""
+ this = _Box2D2.new_b2PolygonDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetAsBox(*args):
+ """
+ SetAsBox(self, float32 hx, float32 hy)
+ SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
+ """
+ return _Box2D2.b2PolygonDef_SetAsBox(*args)
+
+ __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
+ __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
+ if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
+ __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
+ __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
+ if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
+ def __repr__(self):
+ return "b2PolygonDef(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append(self.getVertex(i))
+ return vertices
+ def setVertices_tuple(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) )"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i][0], vertices[i][1])
+ def setVertices_b2Vec2(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) ) where each vertex
+ is a b2Vec2"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i])
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonDef_getVertex(*args)
+
+ def setVertex(*args):
+ """
+ setVertex(self, uint16 vnum, b2Vec2 value)
+ setVertex(self, uint16 vnum, float32 x, float32 y)
+ """
+ return _Box2D2.b2PolygonDef_setVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+ __del__ = lambda self : None;
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ """Proxy of C++ b2PolygonShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2PolygonShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2PolygonShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2PolygonShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2PolygonShape_ComputeMass(*args)
+
+ def GetOBB(*args):
+ """GetOBB(self) -> b2OBB"""
+ return _Box2D2.b2PolygonShape_GetOBB(*args)
+
+ def GetCentroid(*args):
+ """GetCentroid(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCentroid(*args)
+
+ def GetVertexCount(*args):
+ """GetVertexCount(self) -> int32"""
+ return _Box2D2.b2PolygonShape_GetVertexCount(*args)
+
+ def GetCoreVertices(*args):
+ """GetCoreVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
+
+ def GetNormals(*args):
+ """GetNormals(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetNormals(*args)
+
+ def GetFirstVertex(*args):
+ """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
+
+ def Centroid(*args):
+ """Centroid(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Centroid(*args)
+
+ def Support(*args):
+ """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Support(*args)
+
+ def __repr__(self):
+ return "b2PolygonShape(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.GetVertexCount()):
+ vertices.append(self.getVertex(i))
+ return vertices
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_getVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+ __del__ = lambda self : None;
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair(_object):
+ """Proxy of C++ b2Pair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ def SetBuffered(*args):
+ """SetBuffered(self)"""
+ return _Box2D2.b2Pair_SetBuffered(*args)
+
+ def ClearBuffered(*args):
+ """ClearBuffered(self)"""
+ return _Box2D2.b2Pair_ClearBuffered(*args)
+
+ def IsBuffered(*args):
+ """IsBuffered(self) -> bool"""
+ return _Box2D2.b2Pair_IsBuffered(*args)
+
+ def SetRemoved(*args):
+ """SetRemoved(self)"""
+ return _Box2D2.b2Pair_SetRemoved(*args)
+
+ def ClearRemoved(*args):
+ """ClearRemoved(self)"""
+ return _Box2D2.b2Pair_ClearRemoved(*args)
+
+ def IsRemoved(*args):
+ """IsRemoved(self) -> bool"""
+ return _Box2D2.b2Pair_IsRemoved(*args)
+
+ def SetFinal(*args):
+ """SetFinal(self)"""
+ return _Box2D2.b2Pair_SetFinal(*args)
+
+ def IsFinal(*args):
+ """IsFinal(self) -> bool"""
+ return _Box2D2.b2Pair_IsFinal(*args)
+
+ __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
+ __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
+ __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
+ __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
+ if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Pair"""
+ this = _Box2D2.new_b2Pair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+ __del__ = lambda self : None;
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair(_object):
+ """Proxy of C++ b2BufferedPair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2BufferedPair"""
+ this = _Box2D2.new_b2BufferedPair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+ __del__ = lambda self : None;
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback(_object):
+ """Proxy of C++ b2PairCallback class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+ __del__ = lambda self : None;
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2PairCallback_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2PairCallback_PairRemoved(*args)
+
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager(_object):
+ """Proxy of C++ b2PairManager class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PairManager"""
+ this = _Box2D2.new_b2PairManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
+ return _Box2D2.b2PairManager_Initialize(*args)
+
+ def AddBufferedPair(*args):
+ """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_AddBufferedPair(*args)
+
+ def RemoveBufferedPair(*args):
+ """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2PairManager_Commit(*args)
+
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
+ __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
+ __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
+ if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
+ __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
+ __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
+ if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
+ __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
+ __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
+ if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
+ __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
+ __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
+ if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
+ __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
+ __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
+ if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
+ __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
+ __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
+ if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
+ __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
+ __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
+ if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+ __del__ = lambda self : None;
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound(_object):
+ """Proxy of C++ b2Bound class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
+ __repr__ = _swig_repr
+ def IsLower(*args):
+ """IsLower(self) -> bool"""
+ return _Box2D2.b2Bound_IsLower(*args)
+
+ def IsUpper(*args):
+ """IsUpper(self) -> bool"""
+ return _Box2D2.b2Bound_IsUpper(*args)
+
+ __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
+ __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
+ if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
+ __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
+ __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
+ if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
+ __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
+ __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
+ if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Bound"""
+ this = _Box2D2.new_b2Bound(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+ __del__ = lambda self : None;
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy(_object):
+ """Proxy of C++ b2Proxy class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
+ __repr__ = _swig_repr
+ def GetNext(*args):
+ """GetNext(self) -> uint16"""
+ return _Box2D2.b2Proxy_GetNext(*args)
+
+ def SetNext(*args):
+ """SetNext(self, uint16 next)"""
+ return _Box2D2.b2Proxy_SetNext(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Proxy_IsValid(*args)
+
+ __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
+ __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
+ if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
+ __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
+ __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
+ if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
+ __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
+ __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
+ if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
+ __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
+ __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
+ if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Proxy"""
+ this = _Box2D2.new_b2Proxy(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+ __del__ = lambda self : None;
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase(_object):
+ """Proxy of C++ b2BroadPhase class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
+ this = _Box2D2.new_b2BroadPhase(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ __del__ = lambda self : None;
+ def InRange(*args):
+ """InRange(self, b2AABB aabb) -> bool"""
+ return _Box2D2.b2BroadPhase_InRange(*args)
+
+ def CreateProxy(*args):
+ """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
+ return _Box2D2.b2BroadPhase_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, int32 proxyId)"""
+ return _Box2D2.b2BroadPhase_DestroyProxy(*args)
+
+ def MoveProxy(*args):
+ """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
+ return _Box2D2.b2BroadPhase_MoveProxy(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2BroadPhase_Commit(*args)
+
+ def GetProxy(*args):
+ """GetProxy(self, int32 proxyId) -> b2Proxy"""
+ return _Box2D2.b2BroadPhase_GetProxy(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
+ return _Box2D2.b2BroadPhase_Query(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2BroadPhase_Validate(*args)
+
+ def ValidatePairs(*args):
+ """ValidatePairs(self)"""
+ return _Box2D2.b2BroadPhase_ValidatePairs(*args)
+
+ __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
+ __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
+ if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
+ __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
+ __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
+ if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
+ __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
+ __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
+ if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
+ __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
+ __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
+ if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
+ __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
+ __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
+ if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
+ __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
+ __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
+ if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
+ __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
+ __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
+ if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
+ __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
+ __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
+ if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
+ __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
+ __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
+ if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
+ __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
+ __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
+ if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
+ __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
+ __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
+ if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener(_object):
+ """Proxy of C++ b2DestructionListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+ __del__ = lambda self : None;
+ def SayGoodbye(*args):
+ """
+ SayGoodbye(self, b2Joint joint)
+ SayGoodbye(self, b2Shape shape)
+ """
+ return _Box2D2.b2DestructionListener_SayGoodbye(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2DestructionListener"""
+ if self.__class__ == b2DestructionListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DestructionListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DestructionListener(self)
+ return weakref_proxy(self)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener(_object):
+ """Proxy of C++ b2BoundaryListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+ __del__ = lambda self : None;
+ def Violation(*args):
+ """Violation(self, b2Body body)"""
+ return _Box2D2.b2BoundaryListener_Violation(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2BoundaryListener"""
+ if self.__class__ == b2BoundaryListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2BoundaryListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2BoundaryListener(self)
+ return weakref_proxy(self)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter(_object):
+ """Proxy of C++ b2ContactFilter class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ __del__ = lambda self : None;
+ def ShouldCollide(*args):
+ """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
+ return _Box2D2.b2ContactFilter_ShouldCollide(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactFilter"""
+ this = _Box2D2.new_b2ContactFilter(*args)
+ try: self.this.append(this)
+ except: self.this = this
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener(_object):
+ """Proxy of C++ b2ContactListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+ __del__ = lambda self : None;
+ def Add(*args):
+ """Add(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Add(*args)
+
+ def Persist(*args):
+ """Persist(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Persist(*args)
+
+ def Remove(*args):
+ """Remove(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Remove(*args)
+
+ def Result(*args):
+ """Result(self, b2ContactResult point)"""
+ return _Box2D2.b2ContactListener_Result(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactListener"""
+ if self.__class__ == b2ContactListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2ContactListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2ContactListener(self)
+ return weakref_proxy(self)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color(_object):
+ """Proxy of C++ b2Color class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Color
+ __init__(self, float32 r, float32 g, float32 b) -> b2Color
+ """
+ this = _Box2D2.new_b2Color(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
+ __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
+ if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
+ __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
+ __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
+ if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
+ __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
+ __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
+ if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
+ __swig_destroy__ = _Box2D2.delete_b2Color
+ __del__ = lambda self : None;
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw(_object):
+ """Proxy of C++ b2DebugDraw class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DebugDraw"""
+ if self.__class__ == b2DebugDraw:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DebugDraw(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ __del__ = lambda self : None;
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+ def SetFlags(*args):
+ """SetFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_SetFlags(*args)
+
+ def GetFlags(*args):
+ """GetFlags(self) -> uint32"""
+ return _Box2D2.b2DebugDraw_GetFlags(*args)
+
+ def AppendFlags(*args):
+ """AppendFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_AppendFlags(*args)
+
+ def ClearFlags(*args):
+ """ClearFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_ClearFlags(*args)
+
+ def DrawPolygon(*args):
+ """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawPolygon(*args)
+
+ def DrawSolidPolygon(*args):
+ """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
+
+ def DrawCircle(*args):
+ """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawCircle(*args)
+
+ def DrawSolidCircle(*args):
+ """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
+
+ def DrawSegment(*args):
+ """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSegment(*args)
+
+ def DrawXForm(*args):
+ """DrawXForm(self, b2XForm xf)"""
+ return _Box2D2.b2DebugDraw_DrawXForm(*args)
+
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DebugDraw(self)
+ return weakref_proxy(self)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator(_object):
+ """Proxy of C++ b2BlockAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BlockAllocator"""
+ this = _Box2D2.new_b2BlockAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2BlockAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p, int32 size)"""
+ return _Box2D2.b2BlockAllocator_Free(*args)
+
+ def Clear(*args):
+ """Clear(self)"""
+ return _Box2D2.b2BlockAllocator_Clear(*args)
+
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry(_object):
+ """Proxy of C++ b2StackEntry class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
+ __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
+ if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
+ __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
+ __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
+ if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
+ __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
+ __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
+ if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2StackEntry"""
+ this = _Box2D2.new_b2StackEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+ __del__ = lambda self : None;
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator(_object):
+ """Proxy of C++ b2StackAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2StackAllocator"""
+ this = _Box2D2.new_b2StackAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2StackAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p)"""
+ return _Box2D2.b2StackAllocator_Free(*args)
+
+ def GetMaxAllocation(*args):
+ """GetMaxAllocation(self) -> int32"""
+ return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
+
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister(_object):
+ """Proxy of C++ b2ContactRegister class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
+ __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
+ if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
+ __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
+ __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
+ if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
+ __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
+ __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
+ if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactRegister"""
+ this = _Box2D2.new_b2ContactRegister(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+ __del__ = lambda self : None;
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge(_object):
+ """Proxy of C++ b2ContactEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
+ __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
+ __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
+ if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactEdge"""
+ this = _Box2D2.new_b2ContactEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+ __del__ = lambda self : None;
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint(_object):
+ """Proxy of C++ b2ContactPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
+ __swig_setmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_set
+ __swig_getmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_get
+ if _newclass:velocity = _swig_property(_Box2D2.b2ContactPoint_velocity_get, _Box2D2.b2ContactPoint_velocity_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ContactPoint_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ContactPoint_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ContactPoint_friction_get, _Box2D2.b2ContactPoint_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ContactPoint_restitution_get, _Box2D2.b2ContactPoint_restitution_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
+ def __repr__(self):
+ return "b2ContactPoint(\n\tid: %s\n\tshape1: %s\n\tshape2: %s\n\tposition: %s\n\tnormal: %s\n\tseparation: %f normalForce: %f tangentForce: %f)" % \
+ (self.id, self.shape1, self.shape2, self.position, self.normal, self.separation, self.normalForce, self.tangentForce)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactPoint"""
+ this = _Box2D2.new_b2ContactPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+ __del__ = lambda self : None;
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2ContactResult(_object):
+ """Proxy of C++ b2ContactResult class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactResult, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactResult, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactResult_shape1_get, _Box2D2.b2ContactResult_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactResult_shape2_get, _Box2D2.b2ContactResult_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactResult_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactResult_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactResult_position_get, _Box2D2.b2ContactResult_position_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactResult_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactResult_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactResult_normal_get, _Box2D2.b2ContactResult_normal_set)
+ __swig_setmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_set
+ __swig_getmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_get
+ if _newclass:normalImpulse = _swig_property(_Box2D2.b2ContactResult_normalImpulse_get, _Box2D2.b2ContactResult_normalImpulse_set)
+ __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_set
+ __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_get
+ if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ContactResult_tangentImpulse_get, _Box2D2.b2ContactResult_tangentImpulse_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactResult_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactResult_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactResult_id_get, _Box2D2.b2ContactResult_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactResult"""
+ this = _Box2D2.new_b2ContactResult(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactResult
+ __del__ = lambda self : None;
+b2ContactResult_swigregister = _Box2D2.b2ContactResult_swigregister
+b2ContactResult_swigregister(b2ContactResult)
+
+class b2Contact(_object):
+ """Proxy of C++ b2Contact class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2Contact_GetManifolds(*args)
+
+ def GetManifoldCount(*args):
+ """GetManifoldCount(self) -> int32"""
+ return _Box2D2.b2Contact_GetManifoldCount(*args)
+
+ def IsSolid(*args):
+ """IsSolid(self) -> bool"""
+ return _Box2D2.b2Contact_IsSolid(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Contact"""
+ return _Box2D2.b2Contact_GetNext(*args)
+
+ def GetShape1(*args):
+ """GetShape1(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape1(*args)
+
+ def GetShape2(*args):
+ """GetShape2(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape2(*args)
+
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ def AddType(*args):
+ """
+ AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+ if _newclass:AddType = staticmethod(AddType)
+ __swig_getmethods__["AddType"] = lambda x: AddType
+ def InitializeRegisters(*args):
+ """InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+ if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
+ __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
+ def Create(*args):
+ """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ __del__ = lambda self : None;
+ def Update(*args):
+ """Update(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Update(*args)
+
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Evaluate(*args)
+
+ __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
+ __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
+ if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
+ __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
+ __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
+ if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
+ __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
+ __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
+ if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
+ __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
+ __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
+ if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
+ __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
+ __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
+ if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
+ __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
+ __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
+ if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+
+def b2Contact_AddType(*args):
+ """
+ b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+def b2Contact_InitializeRegisters(*args):
+ """b2Contact_InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+def b2Contact_Create(*args):
+ """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+def b2Contact_Destroy(*args):
+ """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+class b2NullContact(b2Contact):
+ """Proxy of C++ b2NullContact class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2NullContact"""
+ this = _Box2D2.new_b2NullContact(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener ?)"""
+ return _Box2D2.b2NullContact_Evaluate(*args)
+
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2NullContact_GetManifolds(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+ __del__ = lambda self : None;
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ """Proxy of C++ b2ContactManager class"""
+ __swig_setmethods__ = {}
+ for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactManager"""
+ this = _Box2D2.new_b2ContactManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2ContactManager_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2ContactManager_PairRemoved(*args)
+
+ def Destroy(*args):
+ """Destroy(self, b2Contact c)"""
+ return _Box2D2.b2ContactManager_Destroy(*args)
+
+ def Collide(*args):
+ """Collide(self)"""
+ return _Box2D2.b2ContactManager_Collide(*args)
+
+ __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
+ __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
+ __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
+ if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
+ __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
+ __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
+ if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+ __del__ = lambda self : None;
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep(_object):
+ """Proxy of C++ b2TimeStep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
+ __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
+ if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
+ __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
+ __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
+ if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
+ __swig_setmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_set
+ __swig_getmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_get
+ if _newclass:dtRatio = _swig_property(_Box2D2.b2TimeStep_dtRatio_get, _Box2D2.b2TimeStep_dtRatio_set)
+ __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
+ __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
+ if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
+ __swig_setmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_set
+ __swig_getmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_get
+ if _newclass:warmStarting = _swig_property(_Box2D2.b2TimeStep_warmStarting_get, _Box2D2.b2TimeStep_warmStarting_set)
+ __swig_setmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_set
+ __swig_getmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_get
+ if _newclass:positionCorrection = _swig_property(_Box2D2.b2TimeStep_positionCorrection_get, _Box2D2.b2TimeStep_positionCorrection_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2TimeStep"""
+ this = _Box2D2.new_b2TimeStep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+ __del__ = lambda self : None;
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World(_object):
+ """Proxy of C++ b2World class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
+ this = _Box2D2.new_b2World(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2World
+ __del__ = lambda self : None;
+ def SetDestructionListener(*args):
+ """SetDestructionListener(self, b2DestructionListener listener)"""
+ return _Box2D2.b2World_SetDestructionListener(*args)
+
+ def SetBoundaryListener(*args):
+ """SetBoundaryListener(self, b2BoundaryListener listener)"""
+ return _Box2D2.b2World_SetBoundaryListener(*args)
+
+ def SetContactFilter(*args):
+ """SetContactFilter(self, b2ContactFilter filter)"""
+ return _Box2D2.b2World_SetContactFilter(*args)
+
+ def SetContactListener(*args):
+ """SetContactListener(self, b2ContactListener listener)"""
+ return _Box2D2.b2World_SetContactListener(*args)
+
+ def SetDebugDraw(*args):
+ """SetDebugDraw(self, b2DebugDraw debugDraw)"""
+ return _Box2D2.b2World_SetDebugDraw(*args)
+
+ def CreateBody(*args):
+ """CreateBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateBody(*args)
+
+ def DestroyBody(*args):
+ """DestroyBody(self, b2Body body)"""
+ return _Box2D2.b2World_DestroyBody(*args)
+
+ def CreateJoint(*args):
+ """CreateJoint(self, b2JointDef def) -> b2Joint"""
+ return _Box2D2.b2World_CreateJoint(*args)
+
+ def DestroyJoint(*args):
+ """DestroyJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DestroyJoint(*args)
+
+ def GetGroundBody(*args):
+ """GetGroundBody(self) -> b2Body"""
+ return _Box2D2.b2World_GetGroundBody(*args)
+
+ def Step(*args):
+ """Step(self, float32 timeStep, int32 iterations)"""
+ return _Box2D2.b2World_Step(*args)
+
+ def GetBodyList(*args):
+ """GetBodyList(self) -> b2Body"""
+ return _Box2D2.b2World_GetBodyList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2Joint"""
+ return _Box2D2.b2World_GetJointList(*args)
+
+ def Refilter(*args):
+ """Refilter(self, b2Shape shape)"""
+ return _Box2D2.b2World_Refilter(*args)
+
+ def SetWarmStarting(*args):
+ """SetWarmStarting(self, bool flag)"""
+ return _Box2D2.b2World_SetWarmStarting(*args)
+
+ def SetPositionCorrection(*args):
+ """SetPositionCorrection(self, bool flag)"""
+ return _Box2D2.b2World_SetPositionCorrection(*args)
+
+ def SetContinuousPhysics(*args):
+ """SetContinuousPhysics(self, bool flag)"""
+ return _Box2D2.b2World_SetContinuousPhysics(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2World_Validate(*args)
+
+ def GetProxyCount(*args):
+ """GetProxyCount(self) -> int32"""
+ return _Box2D2.b2World_GetProxyCount(*args)
+
+ def GetPairCount(*args):
+ """GetPairCount(self) -> int32"""
+ return _Box2D2.b2World_GetPairCount(*args)
+
+ def GetBodyCount(*args):
+ """GetBodyCount(self) -> int32"""
+ return _Box2D2.b2World_GetBodyCount(*args)
+
+ def GetJointCount(*args):
+ """GetJointCount(self) -> int32"""
+ return _Box2D2.b2World_GetJointCount(*args)
+
+ def GetContactCount(*args):
+ """GetContactCount(self) -> int32"""
+ return _Box2D2.b2World_GetContactCount(*args)
+
+ def SetGravity(*args):
+ """SetGravity(self, b2Vec2 gravity)"""
+ return _Box2D2.b2World_SetGravity(*args)
+
+ def Query(*args):
+ """
+ Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32
+ Query(self, b2AABB aabb, uint32 maxCount) -> PyObject
+ """
+ return _Box2D2.b2World_Query(*args)
+
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+class b2BodyDef(_object):
+ """Proxy of C++ b2BodyDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BodyDef"""
+ this = _Box2D2.new_b2BodyDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
+ __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
+ if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
+ __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
+ __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
+ __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
+ if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
+ __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
+ __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
+ if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
+ __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
+ __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
+ if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
+ __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
+ __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
+ if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
+ __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
+ __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
+ if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
+ __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
+ __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
+ if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
+ __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
+ __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
+ if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+ __del__ = lambda self : None;
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body(_object):
+ """Proxy of C++ b2Body class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def CreateShape(*args):
+ """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
+ return _Box2D2.b2Body_CreateShape(*args)
+
+ def DestroyShape(*args):
+ """DestroyShape(self, b2Shape shape)"""
+ return _Box2D2.b2Body_DestroyShape(*args)
+
+ def SetMass(*args):
+ """SetMass(self, b2MassData massData)"""
+ return _Box2D2.b2Body_SetMass(*args)
+
+ def SetMassFromShapes(*args):
+ """SetMassFromShapes(self)"""
+ return _Box2D2.b2Body_SetMassFromShapes(*args)
+
+ def SetXForm(*args):
+ """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
+ return _Box2D2.b2Body_SetXForm(*args)
+
+ def GetXForm(*args):
+ """GetXForm(self) -> b2XForm"""
+ return _Box2D2.b2Body_GetXForm(*args)
+
+ def GetPosition(*args):
+ """GetPosition(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetPosition(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Body_GetAngle(*args)
+
+ def GetWorldCenter(*args):
+ """GetWorldCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldCenter(*args)
+
+ def GetLocalCenter(*args):
+ """GetLocalCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalCenter(*args)
+
+ def SetLinearVelocity(*args):
+ """SetLinearVelocity(self, b2Vec2 v)"""
+ return _Box2D2.b2Body_SetLinearVelocity(*args)
+
+ def GetLinearVelocity(*args):
+ """GetLinearVelocity(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocity(*args)
+
+ def SetAngularVelocity(*args):
+ """SetAngularVelocity(self, float32 omega)"""
+ return _Box2D2.b2Body_SetAngularVelocity(*args)
+
+ def GetAngularVelocity(*args):
+ """GetAngularVelocity(self) -> float32"""
+ return _Box2D2.b2Body_GetAngularVelocity(*args)
+
+ def ApplyForce(*args):
+ """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyForce(*args)
+
+ def ApplyTorque(*args):
+ """ApplyTorque(self, float32 torque)"""
+ return _Box2D2.b2Body_ApplyTorque(*args)
+
+ def ApplyImpulse(*args):
+ """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyImpulse(*args)
+
+ def GetMass(*args):
+ """GetMass(self) -> float32"""
+ return _Box2D2.b2Body_GetMass(*args)
+
+ def GetInertia(*args):
+ """GetInertia(self) -> float32"""
+ return _Box2D2.b2Body_GetInertia(*args)
+
+ def GetWorldPoint(*args):
+ """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldPoint(*args)
+
+ def GetWorldVector(*args):
+ """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldVector(*args)
+
+ def GetLocalPoint(*args):
+ """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalPoint(*args)
+
+ def GetLocalVector(*args):
+ """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalVector(*args)
+
+ def GetLinearVelocityFromWorldPoint(*args):
+ """GetLinearVelocityFromWorldPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromWorldPoint(*args)
+
+ def GetLinearVelocityFromLocalPoint(*args):
+ """GetLinearVelocityFromLocalPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromLocalPoint(*args)
+
+ def IsBullet(*args):
+ """IsBullet(self) -> bool"""
+ return _Box2D2.b2Body_IsBullet(*args)
+
+ def SetBullet(*args):
+ """SetBullet(self, bool flag)"""
+ return _Box2D2.b2Body_SetBullet(*args)
+
+ def IsStatic(*args):
+ """IsStatic(self) -> bool"""
+ return _Box2D2.b2Body_IsStatic(*args)
+
+ def IsDynamic(*args):
+ """IsDynamic(self) -> bool"""
+ return _Box2D2.b2Body_IsDynamic(*args)
+
+ def IsFrozen(*args):
+ """IsFrozen(self) -> bool"""
+ return _Box2D2.b2Body_IsFrozen(*args)
+
+ def IsSleeping(*args):
+ """IsSleeping(self) -> bool"""
+ return _Box2D2.b2Body_IsSleeping(*args)
+
+ def AllowSleeping(*args):
+ """AllowSleeping(self, bool flag)"""
+ return _Box2D2.b2Body_AllowSleeping(*args)
+
+ def WakeUp(*args):
+ """WakeUp(self)"""
+ return _Box2D2.b2Body_WakeUp(*args)
+
+ def PutToSleep(*args):
+ """PutToSleep(self)"""
+ return _Box2D2.b2Body_PutToSleep(*args)
+
+ def GetShapeList(*args):
+ """GetShapeList(self) -> b2Shape"""
+ return _Box2D2.b2Body_GetShapeList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2JointEdge"""
+ return _Box2D2.b2Body_GetJointList(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Body"""
+ return _Box2D2.b2Body_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Body_SetUserData(*args)
+
+ def GetWorld(*args):
+ """GetWorld(self) -> b2World"""
+ return _Box2D2.b2Body_GetWorld(*args)
+
+ def __repr__(self):
+ return "b2Body(Position: %s)" % (self.GetPosition())
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Body_pyGetUserData(*args)
+
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ """Proxy of C++ b2DistanceJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DistanceJointDef"""
+ this = _Box2D2.new_b2DistanceJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
+ return _Box2D2.b2DistanceJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
+ __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
+ __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
+ if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2DistanceJointDef_frequencyHz_get, _Box2D2.b2DistanceJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2DistanceJointDef_dampingRatio_get, _Box2D2.b2DistanceJointDef_dampingRatio_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+ __del__ = lambda self : None;
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ """Proxy of C++ b2DistanceJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
+ this = _Box2D2.new_b2DistanceJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
+ __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
+ if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
+ __swig_setmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_set
+ __swig_getmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_get
+ if _newclass:m_frequencyHz = _swig_property(_Box2D2.b2DistanceJoint_m_frequencyHz_get, _Box2D2.b2DistanceJoint_m_frequencyHz_set)
+ __swig_setmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_set
+ __swig_getmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_get
+ if _newclass:m_dampingRatio = _swig_property(_Box2D2.b2DistanceJoint_m_dampingRatio_get, _Box2D2.b2DistanceJoint_m_dampingRatio_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2DistanceJoint_m_gamma_get, _Box2D2.b2DistanceJoint_m_gamma_set)
+ __swig_setmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_set
+ __swig_getmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_get
+ if _newclass:m_bias = _swig_property(_Box2D2.b2DistanceJoint_m_bias_get, _Box2D2.b2DistanceJoint_m_bias_set)
+ __swig_setmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_set
+ __swig_getmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_get
+ if _newclass:m_impulse = _swig_property(_Box2D2.b2DistanceJoint_m_impulse_get, _Box2D2.b2DistanceJoint_m_impulse_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
+ __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
+ __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
+ if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+ __del__ = lambda self : None;
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ """Proxy of C++ b2MouseJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2MouseJointDef"""
+ this = _Box2D2.new_b2MouseJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
+ __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
+ if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
+ __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
+ __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
+ if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
+ __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
+ __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
+ if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+ __del__ = lambda self : None;
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ """Proxy of C++ b2MouseJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
+
+ def SetTarget(*args):
+ """SetTarget(self, b2Vec2 target)"""
+ return _Box2D2.b2MouseJoint_SetTarget(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
+ this = _Box2D2.new_b2MouseJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
+ __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
+ if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
+ __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
+ __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
+ if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
+ __swig_setmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_set
+ __swig_getmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_get
+ if _newclass:m_impulse = _swig_property(_Box2D2.b2MouseJoint_m_impulse_get, _Box2D2.b2MouseJoint_m_impulse_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
+ __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
+ __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
+ if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
+ __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
+ __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
+ if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
+ __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
+ __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
+ if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+ __del__ = lambda self : None;
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ """Proxy of C++ b2PrismaticJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PrismaticJointDef"""
+ this = _Box2D2.new_b2PrismaticJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
+ return _Box2D2.b2PrismaticJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
+ __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
+ __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
+ if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
+ __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
+ __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
+ if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
+ __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
+ __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
+ if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
+ __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
+ __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
+ if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+ __del__ = lambda self : None;
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ """Proxy of C++ b2PrismaticJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
+
+ def GetJointTranslation(*args):
+ """GetJointTranslation(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2PrismaticJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorForce(*args):
+ """SetMaxMotorForce(self, float32 force)"""
+ return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
+
+ def GetMotorForce(*args):
+ """GetMotorForce(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
+ this = _Box2D2.new_b2PrismaticJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
+ __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
+ if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
+ __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
+ __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
+ if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
+ __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
+ __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
+ if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
+ __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
+ __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
+ if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
+ __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
+ __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
+ if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
+ __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
+ __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
+ if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
+ __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
+ __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
+ if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
+ __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
+ if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
+ __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
+ __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
+ if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
+ __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
+ __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
+ if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+ __del__ = lambda self : None;
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ """Proxy of C++ b2RevoluteJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2RevoluteJointDef"""
+ this = _Box2D2.new_b2RevoluteJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
+ return _Box2D2.b2RevoluteJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
+ __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
+ __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
+ if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
+ __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
+ __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
+ if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
+ __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
+ __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
+ if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+ __del__ = lambda self : None;
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ """Proxy of C++ b2RevoluteJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
+
+ def GetJointAngle(*args):
+ """GetJointAngle(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2RevoluteJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorTorque(*args):
+ """SetMaxMotorTorque(self, float32 torque)"""
+ return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
+
+ def GetMotorTorque(*args):
+ """GetMotorTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
+ this = _Box2D2.new_b2RevoluteJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
+ __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
+ if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
+ __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
+ if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
+ __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
+ __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
+ if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
+ __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
+ __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
+ if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
+ __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
+ __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
+ if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
+ __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
+ __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
+ if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+ __del__ = lambda self : None;
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ """Proxy of C++ b2PulleyJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PulleyJointDef"""
+ this = _Box2D2.new_b2PulleyJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """
+ Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
+ b2Vec2 anchor1, b2Vec2 anchor2,
+ float32 ratio)
+ """
+ return _Box2D2.b2PulleyJointDef_Initialize(*args)
+
+ __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
+ __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
+ if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
+ __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
+ __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
+ if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
+ __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
+ __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
+ if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
+ __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
+ __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
+ if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
+ __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
+ __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
+ if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
+ __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
+ __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
+ if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+ __del__ = lambda self : None;
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ """Proxy of C++ b2PulleyJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
+
+ def GetGroundAnchor1(*args):
+ """GetGroundAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
+
+ def GetGroundAnchor2(*args):
+ """GetGroundAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
+
+ def GetLength1(*args):
+ """GetLength1(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength1(*args)
+
+ def GetLength2(*args):
+ """GetLength2(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength2(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
+ this = _Box2D2.new_b2PulleyJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
+ __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
+ if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
+ __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
+ if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
+ __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
+ __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
+ if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
+ __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
+ __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
+ if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
+ __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
+ __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
+ if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
+ __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
+ __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
+ if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
+ __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
+ __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
+ if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
+ __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
+ __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
+ if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
+ __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
+ __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
+ if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
+ __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
+ __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
+ if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
+ __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
+ __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
+ if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
+ __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
+ __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
+ if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
+ __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
+ __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
+ if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
+ __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
+ __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
+ if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
+ __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
+ __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
+ if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
+ __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
+ __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
+ if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+ __del__ = lambda self : None;
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ """Proxy of C++ b2GearJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2GearJointDef"""
+ this = _Box2D2.new_b2GearJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
+ __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
+ if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
+ __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
+ __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
+ if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+ __del__ = lambda self : None;
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ """Proxy of C++ b2GearJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetReactionTorque(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2GearJointDef data) -> b2GearJoint"""
+ this = _Box2D2.new_b2GearJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
+ __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
+ if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
+ __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
+ __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
+ if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
+ __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
+ __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
+ if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
+ __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
+ __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
+ if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
+ __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
+ __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
+ if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
+ __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
+ __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
+ if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
+ __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
+ if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+ __del__ = lambda self : None;
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/box2d/box2d_linux32/_Box2D2.so b/elements/box2d/box2d_linux32/_Box2D2.so
new file mode 100755
index 0000000..539d065
--- /dev/null
+++ b/elements/box2d/box2d_linux32/_Box2D2.so
Binary files differ
diff --git a/elements/box2d/box2d_linux32/__init__.py b/elements/box2d/box2d_linux32/__init__.py
new file mode 100755
index 0000000..53d0f25
--- /dev/null
+++ b/elements/box2d/box2d_linux32/__init__.py
@@ -0,0 +1 @@
+from Box2D2 import *
diff --git a/elements/box2d/box2d_linux32ppc/Box2D2.py b/elements/box2d/box2d_linux32ppc/Box2D2.py
new file mode 100755
index 0000000..3aefba5
--- /dev/null
+++ b/elements/box2d/box2d_linux32ppc/Box2D2.py
@@ -0,0 +1,1857 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.31
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+b2Alloc = _Box2D2.b2Alloc
+b2Free = _Box2D2.b2Free
+class b2Version:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
+ __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
+ __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
+ __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
+ __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
+ __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
+ def __init__(self, *args):
+ _Box2D2.b2Version_swiginit(self,apply(_Box2D2.new_b2Version, args))
+ __swig_destroy__ = _Box2D2.delete_b2Version
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+b2IsValid = _Box2D2.b2IsValid
+b2InvSqrt = _Box2D2.b2InvSqrt
+class b2Vec2:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2Vec2_swiginit(self,apply(_Box2D2.new_b2Vec2, args))
+ __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
+ __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
+ __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
+ __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+b2Vec2.SetZero = new_instancemethod(_Box2D2.b2Vec2_SetZero,None,b2Vec2)
+b2Vec2.Set = new_instancemethod(_Box2D2.b2Vec2_Set,None,b2Vec2)
+b2Vec2.__neg__ = new_instancemethod(_Box2D2.b2Vec2___neg__,None,b2Vec2)
+b2Vec2.__iadd__ = new_instancemethod(_Box2D2.b2Vec2___iadd__,None,b2Vec2)
+b2Vec2.__isub__ = new_instancemethod(_Box2D2.b2Vec2___isub__,None,b2Vec2)
+b2Vec2.__imul__ = new_instancemethod(_Box2D2.b2Vec2___imul__,None,b2Vec2)
+b2Vec2.Length = new_instancemethod(_Box2D2.b2Vec2_Length,None,b2Vec2)
+b2Vec2.LengthSquared = new_instancemethod(_Box2D2.b2Vec2_LengthSquared,None,b2Vec2)
+b2Vec2.Normalize = new_instancemethod(_Box2D2.b2Vec2_Normalize,None,b2Vec2)
+b2Vec2.IsValid = new_instancemethod(_Box2D2.b2Vec2_IsValid,None,b2Vec2)
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2Mat22_swiginit(self,apply(_Box2D2.new_b2Mat22, args))
+ __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
+ __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
+ __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
+ __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+b2Mat22.Set = new_instancemethod(_Box2D2.b2Mat22_Set,None,b2Mat22)
+b2Mat22.SetIdentity = new_instancemethod(_Box2D2.b2Mat22_SetIdentity,None,b2Mat22)
+b2Mat22.SetZero = new_instancemethod(_Box2D2.b2Mat22_SetZero,None,b2Mat22)
+b2Mat22.GetAngle = new_instancemethod(_Box2D2.b2Mat22_GetAngle,None,b2Mat22)
+b2Mat22.Invert = new_instancemethod(_Box2D2.b2Mat22_Invert,None,b2Mat22)
+b2Mat22.Solve = new_instancemethod(_Box2D2.b2Mat22_Solve,None,b2Mat22)
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2XForm_swiginit(self,apply(_Box2D2.new_b2XForm, args))
+ __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
+ __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+b2XForm.SetIdentity = new_instancemethod(_Box2D2.b2XForm_SetIdentity,None,b2XForm)
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
+ __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
+ __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
+ __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
+ __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
+ __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
+ __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
+ __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
+ __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
+ __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
+ __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
+ __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
+ def __init__(self, *args):
+ _Box2D2.b2Sweep_swiginit(self,apply(_Box2D2.new_b2Sweep, args))
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+b2Sweep.GetXForm = new_instancemethod(_Box2D2.b2Sweep_GetXForm,None,b2Sweep)
+b2Sweep.Advance = new_instancemethod(_Box2D2.b2Sweep_Advance,None,b2Sweep)
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+b2Dot = _Box2D2.b2Dot
+b2_VaddV = _Box2D2.b2_VaddV
+b2_VsubV = _Box2D2.b2_VsubV
+b2_VmulF = _Box2D2.b2_VmulF
+b2_VequV = _Box2D2.b2_VequV
+b2DistanceSquared = _Box2D2.b2DistanceSquared
+b2_MaddM = _Box2D2.b2_MaddM
+b2Min = _Box2D2.b2Min
+b2Max = _Box2D2.b2Max
+b2Clamp = _Box2D2.b2Clamp
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+b2NextPowerOfTwo = _Box2D2.b2NextPowerOfTwo
+b2IsPowerOfTwo = _Box2D2.b2IsPowerOfTwo
+class b2ContactID:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
+ __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
+ __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
+ def __init__(self, *args):
+ _Box2D2.b2ContactID_swiginit(self,apply(_Box2D2.new_b2ContactID, args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+b2Cross = _Box2D2.b2Cross
+b2Mul = _Box2D2.b2Mul
+b2MulT = _Box2D2.b2MulT
+b2Abs = _Box2D2.b2Abs
+b2Random = _Box2D2.b2Random
+b2_nullFeature = cvar.b2_nullFeature
+b2_newPoint = cvar.b2_newPoint
+b2_oldPoint = cvar.b2_oldPoint
+
+class b2ContactID_features:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
+ __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
+ __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
+ __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
+ __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
+ __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
+ __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
+ __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
+ def __init__(self, *args):
+ _Box2D2.b2ContactID_features_swiginit(self,apply(_Box2D2.new_b2ContactID_features, args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
+ __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
+ __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
+ __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
+ __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_get
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_get
+ __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
+ def __init__(self, *args):
+ _Box2D2.b2ManifoldPoint_swiginit(self,apply(_Box2D2.new_b2ManifoldPoint, args))
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
+ __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
+ __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
+ __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
+ __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
+ def __init__(self, *args):
+ _Box2D2.b2Manifold_swiginit(self,apply(_Box2D2.new_b2Manifold, args))
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
+ __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
+ __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
+ __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
+ def __init__(self, *args):
+ _Box2D2.b2Segment_swiginit(self,apply(_Box2D2.new_b2Segment, args))
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+b2Segment.TestSegment = new_instancemethod(_Box2D2.b2Segment_TestSegment,None,b2Segment)
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
+ __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
+ __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
+ __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
+ def __init__(self, *args):
+ _Box2D2.b2AABB_swiginit(self,apply(_Box2D2.new_b2AABB, args))
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+b2AABB.IsValid = new_instancemethod(_Box2D2.b2AABB_IsValid,None,b2AABB)
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
+ __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
+ __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
+ __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
+ def __init__(self, *args):
+ _Box2D2.b2OBB_swiginit(self,apply(_Box2D2.new_b2OBB, args))
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+b2CollideCircles = _Box2D2.b2CollideCircles
+b2CollidePolygonAndCircle = _Box2D2.b2CollidePolygonAndCircle
+b2CollidePolygons = _Box2D2.b2CollidePolygons
+b2TimeOfImpact = _Box2D2.b2TimeOfImpact
+b2TestOverlap = _Box2D2.b2TestOverlap
+class b2MassData:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
+ __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
+ __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
+ __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
+ __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
+ def __init__(self, *args):
+ _Box2D2.b2MassData_swiginit(self,apply(_Box2D2.new_b2MassData, args))
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+b2Distance = _Box2D2.b2Distance
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2ShapeDef_swiginit(self,apply(_Box2D2.new_b2ShapeDef, args))
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
+ __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
+ __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
+ __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
+ __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
+ __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
+ __swig_setmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_set
+ __swig_getmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_get
+ __swig_setmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_set
+ __swig_getmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_get
+ __swig_setmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_set
+ __swig_getmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_get
+ __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
+ __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_getmethods__["Create"] = lambda x: _Box2D2.b2Shape_Create
+ __swig_getmethods__["Destroy"] = lambda x: _Box2D2.b2Shape_Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Shape
+ __swig_setmethods__["m_type"] = _Box2D2.b2Shape_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Shape_m_type_get
+ __swig_setmethods__["m_next"] = _Box2D2.b2Shape_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Shape_m_next_get
+ __swig_setmethods__["m_body"] = _Box2D2.b2Shape_m_body_set
+ __swig_getmethods__["m_body"] = _Box2D2.b2Shape_m_body_get
+ __swig_setmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_set
+ __swig_getmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_get
+ __swig_setmethods__["m_density"] = _Box2D2.b2Shape_m_density_set
+ __swig_getmethods__["m_density"] = _Box2D2.b2Shape_m_density_get
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_get
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_get
+ __swig_setmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_set
+ __swig_getmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_get
+ __swig_setmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_set
+ __swig_getmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_get
+ __swig_setmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_set
+ __swig_getmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_get
+ __swig_setmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_set
+ __swig_getmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_get
+ __swig_setmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_set
+ __swig_getmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_get
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_get
+b2Shape.GetType = new_instancemethod(_Box2D2.b2Shape_GetType,None,b2Shape)
+b2Shape.IsSensor = new_instancemethod(_Box2D2.b2Shape_IsSensor,None,b2Shape)
+b2Shape.GetBody = new_instancemethod(_Box2D2.b2Shape_GetBody,None,b2Shape)
+b2Shape.GetNext = new_instancemethod(_Box2D2.b2Shape_GetNext,None,b2Shape)
+b2Shape.GetUserData = new_instancemethod(_Box2D2.b2Shape_GetUserData,None,b2Shape)
+b2Shape.TestPoint = new_instancemethod(_Box2D2.b2Shape_TestPoint,None,b2Shape)
+b2Shape.TestSegment = new_instancemethod(_Box2D2.b2Shape_TestSegment,None,b2Shape)
+b2Shape.ComputeAABB = new_instancemethod(_Box2D2.b2Shape_ComputeAABB,None,b2Shape)
+b2Shape.ComputeSweptAABB = new_instancemethod(_Box2D2.b2Shape_ComputeSweptAABB,None,b2Shape)
+b2Shape.ComputeMass = new_instancemethod(_Box2D2.b2Shape_ComputeMass,None,b2Shape)
+b2Shape.CreateProxy = new_instancemethod(_Box2D2.b2Shape_CreateProxy,None,b2Shape)
+b2Shape.DestroyProxy = new_instancemethod(_Box2D2.b2Shape_DestroyProxy,None,b2Shape)
+b2Shape.Synchronize = new_instancemethod(_Box2D2.b2Shape_Synchronize,None,b2Shape)
+b2Shape.ResetProxy = new_instancemethod(_Box2D2.b2Shape_ResetProxy,None,b2Shape)
+b2Shape.UpdateSweepRadius = new_instancemethod(_Box2D2.b2Shape_UpdateSweepRadius,None,b2Shape)
+b2Shape.GetSweepRadius = new_instancemethod(_Box2D2.b2Shape_GetSweepRadius,None,b2Shape)
+b2Shape.asCircle = new_instancemethod(_Box2D2.b2Shape_asCircle,None,b2Shape)
+b2Shape.asPolygon = new_instancemethod(_Box2D2.b2Shape_asPolygon,None,b2Shape)
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+b2Shape_Create = _Box2D2.b2Shape_Create
+b2Shape_Destroy = _Box2D2.b2Shape_Destroy
+
+class b2CircleDef(b2ShapeDef):
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2CircleDef_swiginit(self,apply(_Box2D2.new_b2CircleDef, args))
+ __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
+ __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
+ __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
+ __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2CircleShape_swiginit(self,apply(_Box2D2.new_b2CircleShape, args))
+ __swig_setmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_set
+ __swig_getmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_get
+ __swig_setmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_set
+ __swig_getmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_get
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+b2CircleShape.GetLocalPosition = new_instancemethod(_Box2D2.b2CircleShape_GetLocalPosition,None,b2CircleShape)
+b2CircleShape.GetRadius = new_instancemethod(_Box2D2.b2CircleShape_GetRadius,None,b2CircleShape)
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PolygonDef_swiginit(self,apply(_Box2D2.new_b2PolygonDef, args))
+ __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
+ __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
+ __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
+ __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+b2PolygonDef.SetAsBox = new_instancemethod(_Box2D2.b2PolygonDef_SetAsBox,None,b2PolygonDef)
+b2PolygonDef.getVertex = new_instancemethod(_Box2D2.b2PolygonDef_getVertex,None,b2PolygonDef)
+b2PolygonDef.setVertex = new_instancemethod(_Box2D2.b2PolygonDef_setVertex,None,b2PolygonDef)
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PolygonShape_swiginit(self,apply(_Box2D2.new_b2PolygonShape, args))
+ __swig_setmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_set
+ __swig_getmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_get
+ __swig_setmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_set
+ __swig_getmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_get
+ __swig_setmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_set
+ __swig_getmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_get
+ __swig_setmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_set
+ __swig_getmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_get
+ __swig_setmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_set
+ __swig_getmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_get
+ __swig_setmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_set
+ __swig_getmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_get
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+b2PolygonShape.GetOBB = new_instancemethod(_Box2D2.b2PolygonShape_GetOBB,None,b2PolygonShape)
+b2PolygonShape.GetCentroid = new_instancemethod(_Box2D2.b2PolygonShape_GetCentroid,None,b2PolygonShape)
+b2PolygonShape.GetVertexCount = new_instancemethod(_Box2D2.b2PolygonShape_GetVertexCount,None,b2PolygonShape)
+b2PolygonShape.GetVertices = new_instancemethod(_Box2D2.b2PolygonShape_GetVertices,None,b2PolygonShape)
+b2PolygonShape.GetCoreVertices = new_instancemethod(_Box2D2.b2PolygonShape_GetCoreVertices,None,b2PolygonShape)
+b2PolygonShape.GetFirstVertex = new_instancemethod(_Box2D2.b2PolygonShape_GetFirstVertex,None,b2PolygonShape)
+b2PolygonShape.Centroid = new_instancemethod(_Box2D2.b2PolygonShape_Centroid,None,b2PolygonShape)
+b2PolygonShape.Support = new_instancemethod(_Box2D2.b2PolygonShape_Support,None,b2PolygonShape)
+b2PolygonShape.getVertex = new_instancemethod(_Box2D2.b2PolygonShape_getVertex,None,b2PolygonShape)
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
+ __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
+ __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
+ __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
+ def __init__(self, *args):
+ _Box2D2.b2Pair_swiginit(self,apply(_Box2D2.new_b2Pair, args))
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+b2Pair.SetBuffered = new_instancemethod(_Box2D2.b2Pair_SetBuffered,None,b2Pair)
+b2Pair.ClearBuffered = new_instancemethod(_Box2D2.b2Pair_ClearBuffered,None,b2Pair)
+b2Pair.IsBuffered = new_instancemethod(_Box2D2.b2Pair_IsBuffered,None,b2Pair)
+b2Pair.SetRemoved = new_instancemethod(_Box2D2.b2Pair_SetRemoved,None,b2Pair)
+b2Pair.ClearRemoved = new_instancemethod(_Box2D2.b2Pair_ClearRemoved,None,b2Pair)
+b2Pair.IsRemoved = new_instancemethod(_Box2D2.b2Pair_IsRemoved,None,b2Pair)
+b2Pair.SetFinal = new_instancemethod(_Box2D2.b2Pair_SetFinal,None,b2Pair)
+b2Pair.IsFinal = new_instancemethod(_Box2D2.b2Pair_IsFinal,None,b2Pair)
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
+ def __init__(self, *args):
+ _Box2D2.b2BufferedPair_swiginit(self,apply(_Box2D2.new_b2BufferedPair, args))
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+b2PairCallback.PairAdded = new_instancemethod(_Box2D2.b2PairCallback_PairAdded,None,b2PairCallback)
+b2PairCallback.PairRemoved = new_instancemethod(_Box2D2.b2PairCallback_PairRemoved,None,b2PairCallback)
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PairManager_swiginit(self,apply(_Box2D2.new_b2PairManager, args))
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
+ __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
+ __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
+ __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
+ __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
+ __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
+ __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
+ __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
+ __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
+ __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
+ __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
+ __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
+ __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
+ __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
+ __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+b2PairManager.Initialize = new_instancemethod(_Box2D2.b2PairManager_Initialize,None,b2PairManager)
+b2PairManager.AddBufferedPair = new_instancemethod(_Box2D2.b2PairManager_AddBufferedPair,None,b2PairManager)
+b2PairManager.RemoveBufferedPair = new_instancemethod(_Box2D2.b2PairManager_RemoveBufferedPair,None,b2PairManager)
+b2PairManager.Commit = new_instancemethod(_Box2D2.b2PairManager_Commit,None,b2PairManager)
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
+ __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
+ __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
+ __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
+ __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
+ __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
+ def __init__(self, *args):
+ _Box2D2.b2Bound_swiginit(self,apply(_Box2D2.new_b2Bound, args))
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+b2Bound.IsLower = new_instancemethod(_Box2D2.b2Bound_IsLower,None,b2Bound)
+b2Bound.IsUpper = new_instancemethod(_Box2D2.b2Bound_IsUpper,None,b2Bound)
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
+ __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
+ __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
+ __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
+ __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
+ __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
+ __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
+ __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
+ __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
+ def __init__(self, *args):
+ _Box2D2.b2Proxy_swiginit(self,apply(_Box2D2.new_b2Proxy, args))
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+b2Proxy.GetNext = new_instancemethod(_Box2D2.b2Proxy_GetNext,None,b2Proxy)
+b2Proxy.SetNext = new_instancemethod(_Box2D2.b2Proxy_SetNext,None,b2Proxy)
+b2Proxy.IsValid = new_instancemethod(_Box2D2.b2Proxy_IsValid,None,b2Proxy)
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2BroadPhase_swiginit(self,apply(_Box2D2.new_b2BroadPhase, args))
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
+ __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
+ __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
+ __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
+ __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
+ __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
+ __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
+ __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
+ __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
+ __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
+ __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
+ __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
+ __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
+ __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
+ __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
+ __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
+ __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
+ __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
+ __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
+ __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
+ __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
+ __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
+b2BroadPhase.InRange = new_instancemethod(_Box2D2.b2BroadPhase_InRange,None,b2BroadPhase)
+b2BroadPhase.CreateProxy = new_instancemethod(_Box2D2.b2BroadPhase_CreateProxy,None,b2BroadPhase)
+b2BroadPhase.DestroyProxy = new_instancemethod(_Box2D2.b2BroadPhase_DestroyProxy,None,b2BroadPhase)
+b2BroadPhase.MoveProxy = new_instancemethod(_Box2D2.b2BroadPhase_MoveProxy,None,b2BroadPhase)
+b2BroadPhase.Commit = new_instancemethod(_Box2D2.b2BroadPhase_Commit,None,b2BroadPhase)
+b2BroadPhase.GetProxy = new_instancemethod(_Box2D2.b2BroadPhase_GetProxy,None,b2BroadPhase)
+b2BroadPhase.Query = new_instancemethod(_Box2D2.b2BroadPhase_Query,None,b2BroadPhase)
+b2BroadPhase.Validate = new_instancemethod(_Box2D2.b2BroadPhase_Validate,None,b2BroadPhase)
+b2BroadPhase.ValidatePairs = new_instancemethod(_Box2D2.b2BroadPhase_ValidatePairs,None,b2BroadPhase)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+b2DestructionListener.SayGoodbye = new_instancemethod(_Box2D2.b2DestructionListener_SayGoodbye,None,b2DestructionListener)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+b2BoundaryListener.Violation = new_instancemethod(_Box2D2.b2BoundaryListener_Violation,None,b2BoundaryListener)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ def __init__(self, *args):
+ _Box2D2.b2ContactFilter_swiginit(self,apply(_Box2D2.new_b2ContactFilter, args))
+b2ContactFilter.ShouldCollide = new_instancemethod(_Box2D2.b2ContactFilter_ShouldCollide,None,b2ContactFilter)
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+b2ContactListener.Add = new_instancemethod(_Box2D2.b2ContactListener_Add,None,b2ContactListener)
+b2ContactListener.Persist = new_instancemethod(_Box2D2.b2ContactListener_Persist,None,b2ContactListener)
+b2ContactListener.Remove = new_instancemethod(_Box2D2.b2ContactListener_Remove,None,b2ContactListener)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2Color_swiginit(self,apply(_Box2D2.new_b2Color, args))
+ __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
+ __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
+ __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
+ __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
+ __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
+ __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
+ __swig_destroy__ = _Box2D2.delete_b2Color
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+b2DebugDraw.SetFlags = new_instancemethod(_Box2D2.b2DebugDraw_SetFlags,None,b2DebugDraw)
+b2DebugDraw.GetFlags = new_instancemethod(_Box2D2.b2DebugDraw_GetFlags,None,b2DebugDraw)
+b2DebugDraw.AppendFlags = new_instancemethod(_Box2D2.b2DebugDraw_AppendFlags,None,b2DebugDraw)
+b2DebugDraw.ClearFlags = new_instancemethod(_Box2D2.b2DebugDraw_ClearFlags,None,b2DebugDraw)
+b2DebugDraw.DrawPolygon = new_instancemethod(_Box2D2.b2DebugDraw_DrawPolygon,None,b2DebugDraw)
+b2DebugDraw.DrawSolidPolygon = new_instancemethod(_Box2D2.b2DebugDraw_DrawSolidPolygon,None,b2DebugDraw)
+b2DebugDraw.DrawCircle = new_instancemethod(_Box2D2.b2DebugDraw_DrawCircle,None,b2DebugDraw)
+b2DebugDraw.DrawSolidCircle = new_instancemethod(_Box2D2.b2DebugDraw_DrawSolidCircle,None,b2DebugDraw)
+b2DebugDraw.DrawSegment = new_instancemethod(_Box2D2.b2DebugDraw_DrawSegment,None,b2DebugDraw)
+b2DebugDraw.DrawXForm = new_instancemethod(_Box2D2.b2DebugDraw_DrawXForm,None,b2DebugDraw)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2BlockAllocator_swiginit(self,apply(_Box2D2.new_b2BlockAllocator, args))
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+b2BlockAllocator.Allocate = new_instancemethod(_Box2D2.b2BlockAllocator_Allocate,None,b2BlockAllocator)
+b2BlockAllocator.Free = new_instancemethod(_Box2D2.b2BlockAllocator_Free,None,b2BlockAllocator)
+b2BlockAllocator.Clear = new_instancemethod(_Box2D2.b2BlockAllocator_Clear,None,b2BlockAllocator)
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
+ __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
+ __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
+ __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
+ __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
+ __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
+ def __init__(self, *args):
+ _Box2D2.b2StackEntry_swiginit(self,apply(_Box2D2.new_b2StackEntry, args))
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2StackAllocator_swiginit(self,apply(_Box2D2.new_b2StackAllocator, args))
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+b2StackAllocator.Allocate = new_instancemethod(_Box2D2.b2StackAllocator_Allocate,None,b2StackAllocator)
+b2StackAllocator.Free = new_instancemethod(_Box2D2.b2StackAllocator_Free,None,b2StackAllocator)
+b2StackAllocator.GetMaxAllocation = new_instancemethod(_Box2D2.b2StackAllocator_GetMaxAllocation,None,b2StackAllocator)
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
+ __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
+ __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
+ __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
+ __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
+ __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
+ def __init__(self, *args):
+ _Box2D2.b2ContactRegister_swiginit(self,apply(_Box2D2.new_b2ContactRegister, args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
+ __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
+ __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
+ __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
+ __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
+ def __init__(self, *args):
+ _Box2D2.b2ContactEdge_swiginit(self,apply(_Box2D2.new_b2ContactEdge, args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
+ __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
+ __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_get
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_get
+ __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
+ def __init__(self, *args):
+ _Box2D2.b2ContactPoint_swiginit(self,apply(_Box2D2.new_b2ContactPoint, args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2Contact:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ __swig_getmethods__["AddType"] = lambda x: _Box2D2.b2Contact_AddType
+ __swig_getmethods__["InitializeRegisters"] = lambda x: _Box2D2.b2Contact_InitializeRegisters
+ __swig_getmethods__["Create"] = lambda x: _Box2D2.b2Contact_Create
+ __swig_getmethods__["Destroy"] = lambda x: _Box2D2.b2Contact_Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
+ __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
+ __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
+ __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
+ __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
+ __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
+ __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
+ __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
+ __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
+ __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
+ __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
+ __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
+ __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
+b2Contact.GetManifolds = new_instancemethod(_Box2D2.b2Contact_GetManifolds,None,b2Contact)
+b2Contact.GetManifoldCount = new_instancemethod(_Box2D2.b2Contact_GetManifoldCount,None,b2Contact)
+b2Contact.IsSolid = new_instancemethod(_Box2D2.b2Contact_IsSolid,None,b2Contact)
+b2Contact.GetNext = new_instancemethod(_Box2D2.b2Contact_GetNext,None,b2Contact)
+b2Contact.GetShape1 = new_instancemethod(_Box2D2.b2Contact_GetShape1,None,b2Contact)
+b2Contact.GetShape2 = new_instancemethod(_Box2D2.b2Contact_GetShape2,None,b2Contact)
+b2Contact.Update = new_instancemethod(_Box2D2.b2Contact_Update,None,b2Contact)
+b2Contact.Evaluate = new_instancemethod(_Box2D2.b2Contact_Evaluate,None,b2Contact)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+b2Contact_AddType = _Box2D2.b2Contact_AddType
+b2Contact_InitializeRegisters = _Box2D2.b2Contact_InitializeRegisters
+b2Contact_Create = _Box2D2.b2Contact_Create
+b2Contact_Destroy = _Box2D2.b2Contact_Destroy
+
+class b2NullContact(b2Contact):
+ __swig_setmethods__ = {}
+ for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2NullContact_swiginit(self,apply(_Box2D2.new_b2NullContact, args))
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ __swig_setmethods__ = {}
+ for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2ContactManager_swiginit(self,apply(_Box2D2.new_b2ContactManager, args))
+ __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
+ __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
+ __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
+ __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
+ __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+b2ContactManager.Destroy = new_instancemethod(_Box2D2.b2ContactManager_Destroy,None,b2ContactManager)
+b2ContactManager.Collide = new_instancemethod(_Box2D2.b2ContactManager_Collide,None,b2ContactManager)
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
+ __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
+ __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
+ __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
+ __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
+ __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
+ def __init__(self, *args):
+ _Box2D2.b2TimeStep_swiginit(self,apply(_Box2D2.new_b2TimeStep, args))
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2World_swiginit(self,apply(_Box2D2.new_b2World, args))
+ __swig_destroy__ = _Box2D2.delete_b2World
+ __swig_setmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_set
+ __swig_getmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_get
+ __swig_setmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_set
+ __swig_getmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_get
+ __swig_setmethods__["m_lock"] = _Box2D2.b2World_m_lock_set
+ __swig_getmethods__["m_lock"] = _Box2D2.b2World_m_lock_get
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_get
+ __swig_setmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_set
+ __swig_getmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_get
+ __swig_setmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_set
+ __swig_getmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_get
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_get
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_get
+ __swig_setmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_set
+ __swig_getmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_get
+ __swig_setmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_set
+ __swig_getmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_get
+ __swig_setmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_set
+ __swig_getmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_get
+ __swig_setmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_set
+ __swig_getmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_get
+ __swig_setmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_set
+ __swig_getmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_get
+ __swig_setmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_set
+ __swig_getmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_get
+ __swig_setmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_set
+ __swig_getmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_get
+ __swig_setmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_set
+ __swig_getmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_get
+ __swig_setmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_set
+ __swig_getmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_get
+ __swig_setmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_set
+ __swig_getmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_get
+ __swig_setmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_set
+ __swig_getmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_get
+ __swig_setmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_set
+ __swig_getmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_get
+ __swig_setmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_set
+ __swig_getmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_get
+ __swig_setmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_set
+ __swig_getmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_get
+ __swig_setmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_set
+ __swig_getmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_get
+b2World.SetFilter = new_instancemethod(_Box2D2.b2World_SetFilter,None,b2World)
+b2World.SetListener = new_instancemethod(_Box2D2.b2World_SetListener,None,b2World)
+b2World.SetDebugDraw = new_instancemethod(_Box2D2.b2World_SetDebugDraw,None,b2World)
+b2World.CreateStaticBody = new_instancemethod(_Box2D2.b2World_CreateStaticBody,None,b2World)
+b2World.CreateDynamicBody = new_instancemethod(_Box2D2.b2World_CreateDynamicBody,None,b2World)
+b2World.DestroyBody = new_instancemethod(_Box2D2.b2World_DestroyBody,None,b2World)
+b2World.CreateJoint = new_instancemethod(_Box2D2.b2World_CreateJoint,None,b2World)
+b2World.DestroyJoint = new_instancemethod(_Box2D2.b2World_DestroyJoint,None,b2World)
+b2World.GetGroundBody = new_instancemethod(_Box2D2.b2World_GetGroundBody,None,b2World)
+b2World.Step = new_instancemethod(_Box2D2.b2World_Step,None,b2World)
+b2World.Query = new_instancemethod(_Box2D2.b2World_Query,None,b2World)
+b2World.GetBodyList = new_instancemethod(_Box2D2.b2World_GetBodyList,None,b2World)
+b2World.GetJointList = new_instancemethod(_Box2D2.b2World_GetJointList,None,b2World)
+b2World.SetGravity = new_instancemethod(_Box2D2.b2World_SetGravity,None,b2World)
+b2World.Solve = new_instancemethod(_Box2D2.b2World_Solve,None,b2World)
+b2World.SolveTOI = new_instancemethod(_Box2D2.b2World_SolveTOI,None,b2World)
+b2World.DrawJoint = new_instancemethod(_Box2D2.b2World_DrawJoint,None,b2World)
+b2World.DrawShape = new_instancemethod(_Box2D2.b2World_DrawShape,None,b2World)
+b2World.DrawDebugData = new_instancemethod(_Box2D2.b2World_DrawDebugData,None,b2World)
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
+ __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
+ __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
+ __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
+ __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
+ __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
+ __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
+ __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
+ def __init__(self, *args):
+ _Box2D2.b2Jacobian_swiginit(self,apply(_Box2D2.new_b2Jacobian, args))
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+b2Jacobian.SetZero = new_instancemethod(_Box2D2.b2Jacobian_SetZero,None,b2Jacobian)
+b2Jacobian.Set = new_instancemethod(_Box2D2.b2Jacobian_Set,None,b2Jacobian)
+b2Jacobian.Compute = new_instancemethod(_Box2D2.b2Jacobian_Compute,None,b2Jacobian)
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
+ __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
+ __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
+ __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
+ __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
+ def __init__(self, *args):
+ _Box2D2.b2JointEdge_swiginit(self,apply(_Box2D2.new_b2JointEdge, args))
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2JointDef_swiginit(self,apply(_Box2D2.new_b2JointDef, args))
+ __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
+ __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
+ __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
+ __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
+ __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
+ __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
+ __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
+ __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_getmethods__["Create"] = lambda x: _Box2D2.b2Joint_Create
+ __swig_getmethods__["Destroy"] = lambda x: _Box2D2.b2Joint_Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Joint
+ __swig_setmethods__["m_type"] = _Box2D2.b2Joint_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Joint_m_type_get
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_get
+ __swig_setmethods__["m_next"] = _Box2D2.b2Joint_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Joint_m_next_get
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_get
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_get
+ __swig_setmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_set
+ __swig_getmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_get
+ __swig_setmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_set
+ __swig_getmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_get
+ __swig_setmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_set
+ __swig_getmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_get
+ __swig_setmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_set
+ __swig_getmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_get
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_get
+b2Joint.GetType = new_instancemethod(_Box2D2.b2Joint_GetType,None,b2Joint)
+b2Joint.GetBody1 = new_instancemethod(_Box2D2.b2Joint_GetBody1,None,b2Joint)
+b2Joint.GetBody2 = new_instancemethod(_Box2D2.b2Joint_GetBody2,None,b2Joint)
+b2Joint.GetAnchor1 = new_instancemethod(_Box2D2.b2Joint_GetAnchor1,None,b2Joint)
+b2Joint.GetAnchor2 = new_instancemethod(_Box2D2.b2Joint_GetAnchor2,None,b2Joint)
+b2Joint.GetReactionForce = new_instancemethod(_Box2D2.b2Joint_GetReactionForce,None,b2Joint)
+b2Joint.GetReactionTorque = new_instancemethod(_Box2D2.b2Joint_GetReactionTorque,None,b2Joint)
+b2Joint.GetNext = new_instancemethod(_Box2D2.b2Joint_GetNext,None,b2Joint)
+b2Joint.GetUserData = new_instancemethod(_Box2D2.b2Joint_GetUserData,None,b2Joint)
+b2Joint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2Joint_InitVelocityConstraints,None,b2Joint)
+b2Joint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2Joint_SolveVelocityConstraints,None,b2Joint)
+b2Joint.InitPositionConstraints = new_instancemethod(_Box2D2.b2Joint_InitPositionConstraints,None,b2Joint)
+b2Joint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2Joint_SolvePositionConstraints,None,b2Joint)
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+b2Joint_Create = _Box2D2.b2Joint_Create
+b2Joint_Destroy = _Box2D2.b2Joint_Destroy
+
+class b2BodyDef:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2BodyDef_swiginit(self,apply(_Box2D2.new_b2BodyDef, args))
+ __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
+ __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
+ __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
+ __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
+ __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
+ __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
+ __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
+ __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
+ __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
+ __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
+ __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
+ __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
+ __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
+ __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
+ __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
+ __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
+ __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
+ __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body:
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
+ __repr__ = _swig_repr
+ e_frozenFlag = _Box2D2.b2Body_e_frozenFlag
+ e_islandFlag = _Box2D2.b2Body_e_islandFlag
+ e_sleepFlag = _Box2D2.b2Body_e_sleepFlag
+ e_allowSleepFlag = _Box2D2.b2Body_e_allowSleepFlag
+ e_bulletFlag = _Box2D2.b2Body_e_bulletFlag
+ e_fixedRotationFlag = _Box2D2.b2Body_e_fixedRotationFlag
+ e_staticType = _Box2D2.b2Body_e_staticType
+ e_dynamicType = _Box2D2.b2Body_e_dynamicType
+ e_maxTypes = _Box2D2.b2Body_e_maxTypes
+ def __init__(self, *args):
+ _Box2D2.b2Body_swiginit(self,apply(_Box2D2.new_b2Body, args))
+ __swig_destroy__ = _Box2D2.delete_b2Body
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Body_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Body_m_flags_get
+ __swig_setmethods__["m_type"] = _Box2D2.b2Body_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Body_m_type_get
+ __swig_setmethods__["m_xf"] = _Box2D2.b2Body_m_xf_set
+ __swig_getmethods__["m_xf"] = _Box2D2.b2Body_m_xf_get
+ __swig_setmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_set
+ __swig_getmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_get
+ __swig_setmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_set
+ __swig_getmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_get
+ __swig_setmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_set
+ __swig_getmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2Body_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2Body_m_force_get
+ __swig_setmethods__["m_torque"] = _Box2D2.b2Body_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2Body_m_torque_get
+ __swig_setmethods__["m_world"] = _Box2D2.b2Body_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2Body_m_world_get
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Body_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Body_m_prev_get
+ __swig_setmethods__["m_next"] = _Box2D2.b2Body_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Body_m_next_get
+ __swig_setmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_set
+ __swig_getmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_get
+ __swig_setmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_set
+ __swig_getmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_get
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_get
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_get
+ __swig_setmethods__["m_mass"] = _Box2D2.b2Body_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2Body_m_mass_get
+ __swig_setmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_set
+ __swig_getmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_get
+ __swig_setmethods__["m_I"] = _Box2D2.b2Body_m_I_set
+ __swig_getmethods__["m_I"] = _Box2D2.b2Body_m_I_get
+ __swig_setmethods__["m_invI"] = _Box2D2.b2Body_m_invI_set
+ __swig_getmethods__["m_invI"] = _Box2D2.b2Body_m_invI_get
+ __swig_setmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_set
+ __swig_getmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_get
+ __swig_setmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_set
+ __swig_getmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_get
+ __swig_setmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_set
+ __swig_getmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_get
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Body_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Body_m_userData_get
+b2Body.CreateShape = new_instancemethod(_Box2D2.b2Body_CreateShape,None,b2Body)
+b2Body.DestroyShape = new_instancemethod(_Box2D2.b2Body_DestroyShape,None,b2Body)
+b2Body.SetMass = new_instancemethod(_Box2D2.b2Body_SetMass,None,b2Body)
+b2Body.SetMassFromShapes = new_instancemethod(_Box2D2.b2Body_SetMassFromShapes,None,b2Body)
+b2Body.SetXForm = new_instancemethod(_Box2D2.b2Body_SetXForm,None,b2Body)
+b2Body.GetXForm = new_instancemethod(_Box2D2.b2Body_GetXForm,None,b2Body)
+b2Body.GetPosition = new_instancemethod(_Box2D2.b2Body_GetPosition,None,b2Body)
+b2Body.GetAngle = new_instancemethod(_Box2D2.b2Body_GetAngle,None,b2Body)
+b2Body.GetWorldCenter = new_instancemethod(_Box2D2.b2Body_GetWorldCenter,None,b2Body)
+b2Body.GetLocalCenter = new_instancemethod(_Box2D2.b2Body_GetLocalCenter,None,b2Body)
+b2Body.SetLinearVelocity = new_instancemethod(_Box2D2.b2Body_SetLinearVelocity,None,b2Body)
+b2Body.GetLinearVelocity = new_instancemethod(_Box2D2.b2Body_GetLinearVelocity,None,b2Body)
+b2Body.SetAngularVelocity = new_instancemethod(_Box2D2.b2Body_SetAngularVelocity,None,b2Body)
+b2Body.GetAngularVelocity = new_instancemethod(_Box2D2.b2Body_GetAngularVelocity,None,b2Body)
+b2Body.ApplyForce = new_instancemethod(_Box2D2.b2Body_ApplyForce,None,b2Body)
+b2Body.ApplyTorque = new_instancemethod(_Box2D2.b2Body_ApplyTorque,None,b2Body)
+b2Body.ApplyImpulse = new_instancemethod(_Box2D2.b2Body_ApplyImpulse,None,b2Body)
+b2Body.GetMass = new_instancemethod(_Box2D2.b2Body_GetMass,None,b2Body)
+b2Body.GetInertia = new_instancemethod(_Box2D2.b2Body_GetInertia,None,b2Body)
+b2Body.GetWorldPoint = new_instancemethod(_Box2D2.b2Body_GetWorldPoint,None,b2Body)
+b2Body.GetWorldVector = new_instancemethod(_Box2D2.b2Body_GetWorldVector,None,b2Body)
+b2Body.GetLocalPoint = new_instancemethod(_Box2D2.b2Body_GetLocalPoint,None,b2Body)
+b2Body.GetLocalVector = new_instancemethod(_Box2D2.b2Body_GetLocalVector,None,b2Body)
+b2Body.IsBullet = new_instancemethod(_Box2D2.b2Body_IsBullet,None,b2Body)
+b2Body.SetBullet = new_instancemethod(_Box2D2.b2Body_SetBullet,None,b2Body)
+b2Body.IsStatic = new_instancemethod(_Box2D2.b2Body_IsStatic,None,b2Body)
+b2Body.IsDynamic = new_instancemethod(_Box2D2.b2Body_IsDynamic,None,b2Body)
+b2Body.IsFrozen = new_instancemethod(_Box2D2.b2Body_IsFrozen,None,b2Body)
+b2Body.IsSleeping = new_instancemethod(_Box2D2.b2Body_IsSleeping,None,b2Body)
+b2Body.AllowSleeping = new_instancemethod(_Box2D2.b2Body_AllowSleeping,None,b2Body)
+b2Body.WakeUp = new_instancemethod(_Box2D2.b2Body_WakeUp,None,b2Body)
+b2Body.GetShapeList = new_instancemethod(_Box2D2.b2Body_GetShapeList,None,b2Body)
+b2Body.GetJointList = new_instancemethod(_Box2D2.b2Body_GetJointList,None,b2Body)
+b2Body.GetContactList = new_instancemethod(_Box2D2.b2Body_GetContactList,None,b2Body)
+b2Body.GetNext = new_instancemethod(_Box2D2.b2Body_GetNext,None,b2Body)
+b2Body.GetUserData = new_instancemethod(_Box2D2.b2Body_GetUserData,None,b2Body)
+b2Body.ComputeMass = new_instancemethod(_Box2D2.b2Body_ComputeMass,None,b2Body)
+b2Body.SynchronizeShapes = new_instancemethod(_Box2D2.b2Body_SynchronizeShapes,None,b2Body)
+b2Body.SynchronizeTransform = new_instancemethod(_Box2D2.b2Body_SynchronizeTransform,None,b2Body)
+b2Body.IsConnected = new_instancemethod(_Box2D2.b2Body_IsConnected,None,b2Body)
+b2Body.Advance = new_instancemethod(_Box2D2.b2Body_Advance,None,b2Body)
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2DistanceJointDef_swiginit(self,apply(_Box2D2.new_b2DistanceJointDef, args))
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
+ __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
+ __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+b2DistanceJointDef.Initialize = new_instancemethod(_Box2D2.b2DistanceJointDef_Initialize,None,b2DistanceJointDef)
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2DistanceJoint_swiginit(self,apply(_Box2D2.new_b2DistanceJoint, args))
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
+ __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
+ __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_get
+ __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
+ __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
+ __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2MouseJointDef_swiginit(self,apply(_Box2D2.new_b2MouseJointDef, args))
+ __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
+ __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
+ __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
+ __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
+ __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
+ __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2MouseJoint_swiginit(self,apply(_Box2D2.new_b2MouseJoint, args))
+ __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
+ __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
+ __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
+ __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_get
+ __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
+ __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
+ __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
+ __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
+ __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
+ __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
+ __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+b2MouseJoint.SetTarget = new_instancemethod(_Box2D2.b2MouseJoint_SetTarget,None,b2MouseJoint)
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PrismaticJointDef_swiginit(self,apply(_Box2D2.new_b2PrismaticJointDef, args))
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
+ __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
+ __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
+ __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
+ __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
+ __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
+ __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
+ __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
+ __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+b2PrismaticJointDef.Initialize = new_instancemethod(_Box2D2.b2PrismaticJointDef_Initialize,None,b2PrismaticJointDef)
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PrismaticJoint_swiginit(self,apply(_Box2D2.new_b2PrismaticJoint, args))
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
+ __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
+ __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
+ __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
+ __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
+ __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
+ __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
+ __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
+ __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
+ __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
+ __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
+ __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
+ __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
+ __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
+ __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
+ __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
+ __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
+ __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
+ __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
+ __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
+ __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
+ __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+b2PrismaticJoint.GetJointTranslation = new_instancemethod(_Box2D2.b2PrismaticJoint_GetJointTranslation,None,b2PrismaticJoint)
+b2PrismaticJoint.GetJointSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_GetJointSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.IsLimitEnabled = new_instancemethod(_Box2D2.b2PrismaticJoint_IsLimitEnabled,None,b2PrismaticJoint)
+b2PrismaticJoint.EnableLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_EnableLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.GetLowerLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_GetLowerLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.GetUpperLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_GetUpperLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.SetLimits = new_instancemethod(_Box2D2.b2PrismaticJoint_SetLimits,None,b2PrismaticJoint)
+b2PrismaticJoint.IsMotorEnabled = new_instancemethod(_Box2D2.b2PrismaticJoint_IsMotorEnabled,None,b2PrismaticJoint)
+b2PrismaticJoint.EnableMotor = new_instancemethod(_Box2D2.b2PrismaticJoint_EnableMotor,None,b2PrismaticJoint)
+b2PrismaticJoint.SetMotorSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_SetMotorSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.GetMotorSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_GetMotorSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.SetMaxMotorForce = new_instancemethod(_Box2D2.b2PrismaticJoint_SetMaxMotorForce,None,b2PrismaticJoint)
+b2PrismaticJoint.GetMotorForce = new_instancemethod(_Box2D2.b2PrismaticJoint_GetMotorForce,None,b2PrismaticJoint)
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2RevoluteJointDef_swiginit(self,apply(_Box2D2.new_b2RevoluteJointDef, args))
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
+ __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
+ __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
+ __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
+ __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
+ __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
+ __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+b2RevoluteJointDef.Initialize = new_instancemethod(_Box2D2.b2RevoluteJointDef_Initialize,None,b2RevoluteJointDef)
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2RevoluteJoint_swiginit(self,apply(_Box2D2.new_b2RevoluteJoint, args))
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
+ __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
+ __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
+ __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
+ __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
+ __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
+ __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
+ __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
+ __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
+ __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
+ __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
+ __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
+ __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+b2RevoluteJoint.GetJointAngle = new_instancemethod(_Box2D2.b2RevoluteJoint_GetJointAngle,None,b2RevoluteJoint)
+b2RevoluteJoint.GetJointSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_GetJointSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.IsLimitEnabled = new_instancemethod(_Box2D2.b2RevoluteJoint_IsLimitEnabled,None,b2RevoluteJoint)
+b2RevoluteJoint.EnableLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_EnableLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.GetLowerLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_GetLowerLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.GetUpperLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_GetUpperLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.SetLimits = new_instancemethod(_Box2D2.b2RevoluteJoint_SetLimits,None,b2RevoluteJoint)
+b2RevoluteJoint.IsMotorEnabled = new_instancemethod(_Box2D2.b2RevoluteJoint_IsMotorEnabled,None,b2RevoluteJoint)
+b2RevoluteJoint.EnableMotor = new_instancemethod(_Box2D2.b2RevoluteJoint_EnableMotor,None,b2RevoluteJoint)
+b2RevoluteJoint.SetMotorSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_SetMotorSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.GetMotorSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_GetMotorSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.SetMaxMotorTorque = new_instancemethod(_Box2D2.b2RevoluteJoint_SetMaxMotorTorque,None,b2RevoluteJoint)
+b2RevoluteJoint.GetMotorTorque = new_instancemethod(_Box2D2.b2RevoluteJoint_GetMotorTorque,None,b2RevoluteJoint)
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PulleyJointDef_swiginit(self,apply(_Box2D2.new_b2PulleyJointDef, args))
+ __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
+ __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
+ __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
+ __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
+ __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
+ __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
+ __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
+ __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
+ __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
+ __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
+ __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
+ __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
+ __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+b2PulleyJointDef.Initialize = new_instancemethod(_Box2D2.b2PulleyJointDef_Initialize,None,b2PulleyJointDef)
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2PulleyJoint_swiginit(self,apply(_Box2D2.new_b2PulleyJoint, args))
+ __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
+ __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
+ __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
+ __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
+ __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
+ __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
+ __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
+ __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
+ __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
+ __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
+ __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
+ __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
+ __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
+ __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
+ __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
+ __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
+ __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
+ __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
+ __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
+ __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
+ __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
+ __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
+ __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
+ __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
+ __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
+ __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
+ __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
+ __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
+ __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
+ __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
+ __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
+ __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
+ __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+b2PulleyJoint.GetGroundAnchor1 = new_instancemethod(_Box2D2.b2PulleyJoint_GetGroundAnchor1,None,b2PulleyJoint)
+b2PulleyJoint.GetGroundAnchor2 = new_instancemethod(_Box2D2.b2PulleyJoint_GetGroundAnchor2,None,b2PulleyJoint)
+b2PulleyJoint.GetLength1 = new_instancemethod(_Box2D2.b2PulleyJoint_GetLength1,None,b2PulleyJoint)
+b2PulleyJoint.GetLength2 = new_instancemethod(_Box2D2.b2PulleyJoint_GetLength2,None,b2PulleyJoint)
+b2PulleyJoint.GetRatio = new_instancemethod(_Box2D2.b2PulleyJoint_GetRatio,None,b2PulleyJoint)
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2GearJointDef_swiginit(self,apply(_Box2D2.new_b2GearJointDef, args))
+ __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
+ __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
+ __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
+ __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
+ __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ _Box2D2.b2GearJoint_swiginit(self,apply(_Box2D2.new_b2GearJoint, args))
+ __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
+ __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
+ __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
+ __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
+ __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
+ __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
+ __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
+ __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
+ __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
+ __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
+ __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
+ __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
+ __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
+ __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
+ __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
+ __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
+ __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+b2GearJoint.GetRatio = new_instancemethod(_Box2D2.b2GearJoint_GetRatio,None,b2GearJoint)
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/box2d/box2d_linux32ppc/_Box2D2.so b/elements/box2d/box2d_linux32ppc/_Box2D2.so
new file mode 100755
index 0000000..cfb9ece
--- /dev/null
+++ b/elements/box2d/box2d_linux32ppc/_Box2D2.so
Binary files differ
diff --git a/elements/box2d/box2d_linux32ppc/__init__.py b/elements/box2d/box2d_linux32ppc/__init__.py
new file mode 100755
index 0000000..53d0f25
--- /dev/null
+++ b/elements/box2d/box2d_linux32ppc/__init__.py
@@ -0,0 +1 @@
+from Box2D2 import *
diff --git a/elements/box2d/box2d_linux64/Box2D2.py b/elements/box2d/box2d_linux64/Box2D2.py
new file mode 100755
index 0000000..060842c
--- /dev/null
+++ b/elements/box2d/box2d_linux64/Box2D2.py
@@ -0,0 +1,3728 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.31
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+try:
+ _swig_property = property
+except NameError:
+ pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+try:
+ import weakref
+ weakref_proxy = weakref.proxy
+except:
+ weakref_proxy = lambda x: x
+
+
+
+def b2Alloc(*args):
+ """b2Alloc(int32 size) -> void"""
+ return _Box2D2.b2Alloc(*args)
+
+def b2Free(*args):
+ """b2Free(void mem)"""
+ return _Box2D2.b2Free(*args)
+class b2Version(_object):
+ """Proxy of C++ b2Version class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
+ __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
+ if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
+ __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
+ __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
+ if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
+ __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
+ __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
+ if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Version"""
+ this = _Box2D2.new_b2Version(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Version
+ __del__ = lambda self : None;
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+
+def b2MixFriction(*args):
+ """b2MixFriction(float32 friction1, float32 friction2) -> float32"""
+ return _Box2D2.b2MixFriction(*args)
+
+def b2MixRestitution(*args):
+ """b2MixRestitution(float32 restitution1, float32 restitution2) -> float32"""
+ return _Box2D2.b2MixRestitution(*args)
+
+def b2IsValid(*args):
+ """b2IsValid(float32 x) -> bool"""
+ return _Box2D2.b2IsValid(*args)
+
+def b2InvSqrt(*args):
+ """b2InvSqrt(float32 x) -> float32"""
+ return _Box2D2.b2InvSqrt(*args)
+class b2Vec2(_object):
+ """Proxy of C++ b2Vec2 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Vec2
+ __init__(self, float32 x, float32 y) -> b2Vec2
+ """
+ this = _Box2D2.new_b2Vec2(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Vec2_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, float32 x_, float32 y_)"""
+ return _Box2D2.b2Vec2_Set(*args)
+
+ def __neg__(*args):
+ """__neg__(self) -> b2Vec2"""
+ return _Box2D2.b2Vec2___neg__(*args)
+
+ def add_vector(*args):
+ """add_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_add_vector(*args)
+
+ def sub_vector(*args):
+ """sub_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_sub_vector(*args)
+
+ def mul_float(*args):
+ """mul_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_mul_float(*args)
+
+ def Length(*args):
+ """Length(self) -> float32"""
+ return _Box2D2.b2Vec2_Length(*args)
+
+ def LengthSquared(*args):
+ """LengthSquared(self) -> float32"""
+ return _Box2D2.b2Vec2_LengthSquared(*args)
+
+ def Normalize(*args):
+ """Normalize(self) -> float32"""
+ return _Box2D2.b2Vec2_Normalize(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Vec2_IsValid(*args)
+
+ __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
+ __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
+ if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
+ __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
+ __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
+ if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
+ def __repr__(self):
+ return "b2Vec2(%g,%g)" % (self.x, self.y)
+ def tuple(self):
+ return (self.x, self.y)
+ def fromTuple(self, tuple):
+ self.x, self.y = tuple
+ return self
+ def copy(self):
+ return b2Vec2(self.x, self.y)
+ def __iadd__(self, other):
+ self.add_vector(other)
+ return self
+ def __isub__(self, other):
+ self.sub_vector(other)
+ return self
+ def __imul__(self, a):
+ self.mul_float(a)
+ return self
+ def __idiv__(self, a):
+ self.div_float(a)
+ return self
+
+
+ def __div__(*args):
+ """__div__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___div__(*args)
+
+ def __mul__(*args):
+ """__mul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___mul__(*args)
+
+ def __add__(*args):
+ """__add__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___add__(*args)
+
+ def __sub__(*args):
+ """__sub__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___sub__(*args)
+
+ def __rmul__(*args):
+ """__rmul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rmul__(*args)
+
+ def __rdiv__(*args):
+ """__rdiv__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rdiv__(*args)
+
+ def div_float(*args):
+ """div_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_div_float(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+ __del__ = lambda self : None;
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22(_object):
+ """Proxy of C++ b2Mat22 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Mat22
+ __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
+ __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
+ __init__(self, float32 angle) -> b2Mat22
+ """
+ this = _Box2D2.new_b2Mat22(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Set(*args):
+ """
+ Set(self, b2Vec2 c1, b2Vec2 c2)
+ Set(self, float32 angle)
+ """
+ return _Box2D2.b2Mat22_Set(*args)
+
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2Mat22_SetIdentity(*args)
+
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Mat22_SetZero(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Mat22_GetAngle(*args)
+
+ def Invert(*args):
+ """Invert(self) -> b2Mat22"""
+ return _Box2D2.b2Mat22_Invert(*args)
+
+ def Solve(*args):
+ """Solve(self, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Mat22_Solve(*args)
+
+ __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
+ __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
+ if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
+ __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
+ __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
+ if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
+ def __repr__(self):
+ return "b2Mat22(col1: %s col2: %s)" % (self.col1, self.col2)
+
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+ __del__ = lambda self : None;
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm(_object):
+ """Proxy of C++ b2XForm class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2XForm
+ __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
+ """
+ this = _Box2D2.new_b2XForm(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2XForm_SetIdentity(*args)
+
+ __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
+ __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+ __del__ = lambda self : None;
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep(_object):
+ """Proxy of C++ b2Sweep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
+ __repr__ = _swig_repr
+ def GetXForm(*args):
+ """GetXForm(self, b2XForm xf, float32 t)"""
+ return _Box2D2.b2Sweep_GetXForm(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Sweep_Advance(*args)
+
+ __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
+ __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
+ if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
+ __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
+ __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
+ if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
+ __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
+ __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
+ if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
+ __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
+ __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
+ if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
+ __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
+ __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
+ if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
+ __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
+ __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
+ if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Sweep"""
+ this = _Box2D2.new_b2Sweep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+ __del__ = lambda self : None;
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+
+def b2Dot(*args):
+ """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2Dot(*args)
+
+def b2sub(*args):
+ """b2sub(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2sub(*args)
+
+def b2mul(*args):
+ """b2mul(float32 s, b2Vec2 a) -> b2Vec2"""
+ return _Box2D2.b2mul(*args)
+
+def b2equ(*args):
+ """b2equ(b2Vec2 a, b2Vec2 b) -> bool"""
+ return _Box2D2.b2equ(*args)
+
+def b2DistanceSquared(*args):
+ """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2DistanceSquared(*args)
+
+def b2Min(*args):
+ """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Min(*args)
+
+def b2Max(*args):
+ """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Max(*args)
+
+def b2Clamp(*args):
+ """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
+ return _Box2D2.b2Clamp(*args)
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+
+def b2NextPowerOfTwo(*args):
+ """b2NextPowerOfTwo(uint32 x) -> uint32"""
+ return _Box2D2.b2NextPowerOfTwo(*args)
+
+def b2IsPowerOfTwo(*args):
+ """b2IsPowerOfTwo(uint32 x) -> bool"""
+ return _Box2D2.b2IsPowerOfTwo(*args)
+class b2ContactID(_object):
+ """Proxy of C++ b2ContactID class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
+ __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
+ if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
+ __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
+ if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
+ def __repr__(self):
+ return "b2ContactID(key: %d Features: \n\t%s)" % \
+ (self.key, self.features)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID"""
+ this = _Box2D2.new_b2ContactID(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+ __del__ = lambda self : None;
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+
+def b2Cross(*args):
+ """
+ b2Cross(b2Vec2 a, b2Vec2 b) -> float32
+ b2Cross(b2Vec2 a, float32 s) -> b2Vec2
+ b2Cross(float32 s, b2Vec2 a) -> b2Vec2
+ """
+ return _Box2D2.b2Cross(*args)
+
+def b2add(*args):
+ """
+ b2add(b2Vec2 a, b2Vec2 b) -> b2Vec2
+ b2add(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ """
+ return _Box2D2.b2add(*args)
+
+def b2Mul(*args):
+ """
+ b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2Mul(*args)
+
+def b2MulT(*args):
+ """
+ b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2MulT(*args)
+
+def b2Abs(*args):
+ """
+ b2Abs(float32 a) -> float32
+ b2Abs(b2Vec2 a) -> b2Vec2
+ b2Abs(b2Mat22 A) -> b2Mat22
+ """
+ return _Box2D2.b2Abs(*args)
+
+def b2Random(*args):
+ """
+ b2Random() -> float32
+ b2Random(float32 lo, float32 hi) -> float32
+ """
+ return _Box2D2.b2Random(*args)
+b2_nullFeature = cvar.b2_nullFeature
+
+class b2ContactID_features(_object):
+ """Proxy of C++ b2ContactID_features class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
+ __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
+ if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
+ __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
+ __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
+ if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
+ __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
+ __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
+ if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
+ __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
+ __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
+ if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
+ def __repr__(self):
+ return "b2ContactID::Features(\n\treferenceFace: %d incidentEdge: %d incidentVertex: %d flip: %d)" % \
+ (self.referenceFace, self.incidentEdge, self.incidentVertex, self.flip)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID_features"""
+ this = _Box2D2.new_b2ContactID_features(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+ __del__ = lambda self : None;
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint(_object):
+ """Proxy of C++ b2ManifoldPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
+ __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
+ if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
+ __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
+ __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
+ if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
+ __swig_setmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_set
+ __swig_getmethods__["normalImpulse"] = _Box2D2.b2ManifoldPoint_normalImpulse_get
+ if _newclass:normalImpulse = _swig_property(_Box2D2.b2ManifoldPoint_normalImpulse_get, _Box2D2.b2ManifoldPoint_normalImpulse_set)
+ __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_set
+ __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ManifoldPoint_tangentImpulse_get
+ if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ManifoldPoint_tangentImpulse_get, _Box2D2.b2ManifoldPoint_tangentImpulse_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ManifoldPoint"""
+ this = _Box2D2.new_b2ManifoldPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+ __del__ = lambda self : None;
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold(_object):
+ """Proxy of C++ b2Manifold class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
+ __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
+ if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
+ __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
+ __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
+ if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Manifold"""
+ this = _Box2D2.new_b2Manifold(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+ __del__ = lambda self : None;
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment(_object):
+ """Proxy of C++ b2Segment class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
+ __repr__ = _swig_repr
+ def TestSegment(*args):
+ """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
+ return _Box2D2.b2Segment_TestSegment(*args)
+
+ __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
+ __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
+ if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
+ __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
+ __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
+ if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Segment"""
+ this = _Box2D2.new_b2Segment(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+ __del__ = lambda self : None;
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB(_object):
+ """Proxy of C++ b2AABB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
+ __repr__ = _swig_repr
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2AABB_IsValid(*args)
+
+ __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
+ __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
+ if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
+ __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
+ __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
+ if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2AABB"""
+ this = _Box2D2.new_b2AABB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+ __del__ = lambda self : None;
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB(_object):
+ """Proxy of C++ b2OBB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
+ __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
+ __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
+ __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
+ if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2OBB"""
+ this = _Box2D2.new_b2OBB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+ __del__ = lambda self : None;
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+
+def b2CollideCircles(*args):
+ """
+ b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
+ b2CircleShape circle2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollideCircles(*args)
+
+def b2CollidePolygonAndCircle(*args):
+ """
+ b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
+ b2CircleShape circle, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygonAndCircle(*args)
+
+def b2CollidePolygons(*args):
+ """
+ b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
+ b2PolygonShape polygon2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygons(*args)
+
+def b2TimeOfImpact(*args):
+ """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
+ return _Box2D2.b2TimeOfImpact(*args)
+
+def b2TestOverlap(*args):
+ """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
+ return _Box2D2.b2TestOverlap(*args)
+class b2MassData(_object):
+ """Proxy of C++ b2MassData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
+ __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
+ if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
+ __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
+ __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
+ __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
+ if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2MassData"""
+ this = _Box2D2.new_b2MassData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+ __del__ = lambda self : None;
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+
+def b2Distance(*args):
+ """
+ b2Distance(b2Vec2 a, b2Vec2 b) -> float32
+ b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
+ b2Shape shape2, b2XForm xf2) -> float32
+ """
+ return _Box2D2.b2Distance(*args)
+
+class b2FilterData(_object):
+ """Proxy of C++ b2FilterData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2FilterData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2FilterData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_set
+ __swig_getmethods__["categoryBits"] = _Box2D2.b2FilterData_categoryBits_get
+ if _newclass:categoryBits = _swig_property(_Box2D2.b2FilterData_categoryBits_get, _Box2D2.b2FilterData_categoryBits_set)
+ __swig_setmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_set
+ __swig_getmethods__["maskBits"] = _Box2D2.b2FilterData_maskBits_get
+ if _newclass:maskBits = _swig_property(_Box2D2.b2FilterData_maskBits_get, _Box2D2.b2FilterData_maskBits_set)
+ __swig_setmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_set
+ __swig_getmethods__["groupIndex"] = _Box2D2.b2FilterData_groupIndex_get
+ if _newclass:groupIndex = _swig_property(_Box2D2.b2FilterData_groupIndex_get, _Box2D2.b2FilterData_groupIndex_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2FilterData"""
+ this = _Box2D2.new_b2FilterData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2FilterData
+ __del__ = lambda self : None;
+b2FilterData_swigregister = _Box2D2.b2FilterData_swigregister
+b2FilterData_swigregister(b2FilterData)
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef(_object):
+ """Proxy of C++ b2ShapeDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ShapeDef"""
+ this = _Box2D2.new_b2ShapeDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ __del__ = lambda self : None;
+ __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
+ __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
+ __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
+ if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
+ __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
+ __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
+ if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
+ __swig_setmethods__["filter"] = _Box2D2.b2ShapeDef_filter_set
+ __swig_getmethods__["filter"] = _Box2D2.b2ShapeDef_filter_get
+ if _newclass:filter = _swig_property(_Box2D2.b2ShapeDef_filter_get, _Box2D2.b2ShapeDef_filter_set)
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape(_object):
+ """Proxy of C++ b2Shape class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Shape_GetType(*args)
+
+ def IsSensor(*args):
+ """IsSensor(self) -> bool"""
+ return _Box2D2.b2Shape_IsSensor(*args)
+
+ def SetFilterData(*args):
+ """SetFilterData(self, b2FilterData filter)"""
+ return _Box2D2.b2Shape_SetFilterData(*args)
+
+ def GetFilterData(*args):
+ """GetFilterData(self) -> b2FilterData"""
+ return _Box2D2.b2Shape_GetFilterData(*args)
+
+ def GetBody(*args):
+ """GetBody(self) -> b2Body"""
+ return _Box2D2.b2Shape_GetBody(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Shape"""
+ return _Box2D2.b2Shape_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Shape_SetUserData(*args)
+
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
+ return _Box2D2.b2Shape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2Shape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
+ return _Box2D2.b2Shape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
+ return _Box2D2.b2Shape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2Shape_ComputeMass(*args)
+
+ def GetSweepRadius(*args):
+ """GetSweepRadius(self) -> float32"""
+ return _Box2D2.b2Shape_GetSweepRadius(*args)
+
+ def GetFriction(*args):
+ """GetFriction(self) -> float32"""
+ return _Box2D2.b2Shape_GetFriction(*args)
+
+ def GetRestitution(*args):
+ """GetRestitution(self) -> float32"""
+ return _Box2D2.b2Shape_GetRestitution(*args)
+
+ def __repr__(self):
+ return "b2Shape(from Body %s )" % (self.GetBody())
+ def typeName(self):
+ types = { e_unknownShape : "Unknown",
+ e_circleShape : "Circle",
+ e_polygonShape : "Polygon",
+ e_shapeTypeCount: "ShapeType" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the shape"""
+ return (getattr(self, "as%s" % self.typeName())) ()
+
+ def asCircle(*args):
+ """asCircle(self) -> b2CircleShape"""
+ return _Box2D2.b2Shape_asCircle(*args)
+
+ def asPolygon(*args):
+ """asPolygon(self) -> b2PolygonShape"""
+ return _Box2D2.b2Shape_asPolygon(*args)
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Shape_pyGetUserData(*args)
+
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+
+def b2JointInfo(self):
+ """Return a rather verbose string representation of a joint"""
+ props = dir(self)
+ ignoreList = ('this', 'thisown', 'next', 'prev', 'm_next', 'm_prev')
+ info = []
+ for prop in dir(self):
+ if prop[:2]=='__' or prop in ignoreList: continue
+ if not callable(getattr(self, prop)):
+ info.append(prop + ":")
+ info.append(str(getattr(self, prop)))
+ return "%s(%s)" % (self.__class__.__name__, " ".join(info))
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian(_object):
+ """Proxy of C++ b2Jacobian class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
+ __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
+ if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
+ __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
+ __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
+ if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
+ __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
+ __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
+ if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
+ __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
+ __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
+ if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Jacobian_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
+ return _Box2D2.b2Jacobian_Set(*args)
+
+ def Compute(*args):
+ """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
+ return _Box2D2.b2Jacobian_Compute(*args)
+
+ def __repr__(self):
+ return "b2Jacobian(linear1: %s: linear2: %s angular1: %s angular2: %s)" %\
+ (self.linear1, self.linear2, self.angular1, self.angular2)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2Jacobian"""
+ this = _Box2D2.new_b2Jacobian(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+ __del__ = lambda self : None;
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge(_object):
+ """Proxy of C++ b2JointEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
+ __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
+ __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
+ if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
+ def __repr__(self):
+ return "b2JointEdge(other: %s)" % (self.other)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2JointEdge"""
+ this = _Box2D2.new_b2JointEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+ __del__ = lambda self : None;
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef(_object):
+ """Proxy of C++ b2JointDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2JointDef"""
+ this = _Box2D2.new_b2JointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
+ __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
+ __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
+ if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
+ __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
+ __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
+ if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
+ __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
+ __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
+ if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
+ def __repr__(self):
+ return "b2JointDef(body1: %s body2: %s)" % (self.body1, self.body2)
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+ __del__ = lambda self : None;
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint(_object):
+ """Proxy of C++ b2Joint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Joint_GetType(*args)
+
+ def GetBody1(*args):
+ """GetBody1(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody1(*args)
+
+ def GetBody2(*args):
+ """GetBody2(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody2(*args)
+
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2Joint_GetReactionTorque(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Joint"""
+ return _Box2D2.b2Joint_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Joint_SetUserData(*args)
+
+ def __repr__(self):
+ return "b2Joint(m_body1: %s m_body2: %s getAsType(): %s)" % (self.m_body1, self.m_body2, self.getAsType())
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the joint"""
+ return (getattr(self, "as%sJoint" % self.typeName())) ()
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Joint_pyGetUserData(*args)
+
+ def asMouseJoint(*args):
+ """asMouseJoint(self) -> b2MouseJoint"""
+ return _Box2D2.b2Joint_asMouseJoint(*args)
+
+ def asGearJoint(*args):
+ """asGearJoint(self) -> b2GearJoint"""
+ return _Box2D2.b2Joint_asGearJoint(*args)
+
+ def asDistanceJoint(*args):
+ """asDistanceJoint(self) -> b2DistanceJoint"""
+ return _Box2D2.b2Joint_asDistanceJoint(*args)
+
+ def asPrismaticJoint(*args):
+ """asPrismaticJoint(self) -> b2PrismaticJoint"""
+ return _Box2D2.b2Joint_asPrismaticJoint(*args)
+
+ def asPulleyJoint(*args):
+ """asPulleyJoint(self) -> b2PulleyJoint"""
+ return _Box2D2.b2Joint_asPulleyJoint(*args)
+
+ def asRevoluteJoint(*args):
+ """asRevoluteJoint(self) -> b2RevoluteJoint"""
+ return _Box2D2.b2Joint_asRevoluteJoint(*args)
+
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+
+class b2CircleDef(b2ShapeDef):
+ """Proxy of C++ b2CircleDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2CircleDef"""
+ this = _Box2D2.new_b2CircleDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
+ __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
+ if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
+ __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
+ __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
+ if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+ __del__ = lambda self : None;
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ """Proxy of C++ b2CircleShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2CircleShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2CircleShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2CircleShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2CircleShape_ComputeMass(*args)
+
+ def GetLocalPosition(*args):
+ """GetLocalPosition(self) -> b2Vec2"""
+ return _Box2D2.b2CircleShape_GetLocalPosition(*args)
+
+ def GetRadius(*args):
+ """GetRadius(self) -> float32"""
+ return _Box2D2.b2CircleShape_GetRadius(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+ __del__ = lambda self : None;
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ """Proxy of C++ b2PolygonDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PolygonDef"""
+ this = _Box2D2.new_b2PolygonDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetAsBox(*args):
+ """
+ SetAsBox(self, float32 hx, float32 hy)
+ SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
+ """
+ return _Box2D2.b2PolygonDef_SetAsBox(*args)
+
+ __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
+ __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
+ if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
+ __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
+ __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
+ if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
+ def __repr__(self):
+ return "b2PolygonDef(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append(self.getVertex(i))
+ return vertices
+ def setVertices_tuple(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) )"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i][0], vertices[i][1])
+ def setVertices_b2Vec2(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) ) where each vertex
+ is a b2Vec2"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i])
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonDef_getVertex(*args)
+
+ def setVertex(*args):
+ """
+ setVertex(self, uint16 vnum, b2Vec2 value)
+ setVertex(self, uint16 vnum, float32 x, float32 y)
+ """
+ return _Box2D2.b2PolygonDef_setVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+ __del__ = lambda self : None;
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ """Proxy of C++ b2PolygonShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2PolygonShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2PolygonShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2PolygonShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2PolygonShape_ComputeMass(*args)
+
+ def GetOBB(*args):
+ """GetOBB(self) -> b2OBB"""
+ return _Box2D2.b2PolygonShape_GetOBB(*args)
+
+ def GetCentroid(*args):
+ """GetCentroid(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCentroid(*args)
+
+ def GetVertexCount(*args):
+ """GetVertexCount(self) -> int32"""
+ return _Box2D2.b2PolygonShape_GetVertexCount(*args)
+
+ def GetCoreVertices(*args):
+ """GetCoreVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
+
+ def GetNormals(*args):
+ """GetNormals(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetNormals(*args)
+
+ def GetFirstVertex(*args):
+ """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
+
+ def Centroid(*args):
+ """Centroid(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Centroid(*args)
+
+ def Support(*args):
+ """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Support(*args)
+
+ def __repr__(self):
+ return "b2PolygonShape(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.GetVertexCount()):
+ vertices.append(self.getVertex(i))
+ return vertices
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_getVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+ __del__ = lambda self : None;
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair(_object):
+ """Proxy of C++ b2Pair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ def SetBuffered(*args):
+ """SetBuffered(self)"""
+ return _Box2D2.b2Pair_SetBuffered(*args)
+
+ def ClearBuffered(*args):
+ """ClearBuffered(self)"""
+ return _Box2D2.b2Pair_ClearBuffered(*args)
+
+ def IsBuffered(*args):
+ """IsBuffered(self) -> bool"""
+ return _Box2D2.b2Pair_IsBuffered(*args)
+
+ def SetRemoved(*args):
+ """SetRemoved(self)"""
+ return _Box2D2.b2Pair_SetRemoved(*args)
+
+ def ClearRemoved(*args):
+ """ClearRemoved(self)"""
+ return _Box2D2.b2Pair_ClearRemoved(*args)
+
+ def IsRemoved(*args):
+ """IsRemoved(self) -> bool"""
+ return _Box2D2.b2Pair_IsRemoved(*args)
+
+ def SetFinal(*args):
+ """SetFinal(self)"""
+ return _Box2D2.b2Pair_SetFinal(*args)
+
+ def IsFinal(*args):
+ """IsFinal(self) -> bool"""
+ return _Box2D2.b2Pair_IsFinal(*args)
+
+ __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
+ __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
+ __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
+ __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
+ if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Pair"""
+ this = _Box2D2.new_b2Pair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+ __del__ = lambda self : None;
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair(_object):
+ """Proxy of C++ b2BufferedPair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2BufferedPair"""
+ this = _Box2D2.new_b2BufferedPair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+ __del__ = lambda self : None;
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback(_object):
+ """Proxy of C++ b2PairCallback class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+ __del__ = lambda self : None;
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2PairCallback_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2PairCallback_PairRemoved(*args)
+
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager(_object):
+ """Proxy of C++ b2PairManager class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PairManager"""
+ this = _Box2D2.new_b2PairManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
+ return _Box2D2.b2PairManager_Initialize(*args)
+
+ def AddBufferedPair(*args):
+ """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_AddBufferedPair(*args)
+
+ def RemoveBufferedPair(*args):
+ """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2PairManager_Commit(*args)
+
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
+ __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
+ __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
+ if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
+ __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
+ __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
+ if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
+ __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
+ __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
+ if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
+ __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
+ __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
+ if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
+ __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
+ __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
+ if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
+ __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
+ __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
+ if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
+ __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
+ __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
+ if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+ __del__ = lambda self : None;
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound(_object):
+ """Proxy of C++ b2Bound class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
+ __repr__ = _swig_repr
+ def IsLower(*args):
+ """IsLower(self) -> bool"""
+ return _Box2D2.b2Bound_IsLower(*args)
+
+ def IsUpper(*args):
+ """IsUpper(self) -> bool"""
+ return _Box2D2.b2Bound_IsUpper(*args)
+
+ __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
+ __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
+ if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
+ __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
+ __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
+ if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
+ __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
+ __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
+ if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Bound"""
+ this = _Box2D2.new_b2Bound(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+ __del__ = lambda self : None;
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy(_object):
+ """Proxy of C++ b2Proxy class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
+ __repr__ = _swig_repr
+ def GetNext(*args):
+ """GetNext(self) -> uint16"""
+ return _Box2D2.b2Proxy_GetNext(*args)
+
+ def SetNext(*args):
+ """SetNext(self, uint16 next)"""
+ return _Box2D2.b2Proxy_SetNext(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Proxy_IsValid(*args)
+
+ __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
+ __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
+ if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
+ __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
+ __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
+ if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
+ __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
+ __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
+ if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
+ __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
+ __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
+ if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Proxy"""
+ this = _Box2D2.new_b2Proxy(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+ __del__ = lambda self : None;
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase(_object):
+ """Proxy of C++ b2BroadPhase class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
+ this = _Box2D2.new_b2BroadPhase(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ __del__ = lambda self : None;
+ def InRange(*args):
+ """InRange(self, b2AABB aabb) -> bool"""
+ return _Box2D2.b2BroadPhase_InRange(*args)
+
+ def CreateProxy(*args):
+ """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
+ return _Box2D2.b2BroadPhase_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, int32 proxyId)"""
+ return _Box2D2.b2BroadPhase_DestroyProxy(*args)
+
+ def MoveProxy(*args):
+ """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
+ return _Box2D2.b2BroadPhase_MoveProxy(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2BroadPhase_Commit(*args)
+
+ def GetProxy(*args):
+ """GetProxy(self, int32 proxyId) -> b2Proxy"""
+ return _Box2D2.b2BroadPhase_GetProxy(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
+ return _Box2D2.b2BroadPhase_Query(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2BroadPhase_Validate(*args)
+
+ def ValidatePairs(*args):
+ """ValidatePairs(self)"""
+ return _Box2D2.b2BroadPhase_ValidatePairs(*args)
+
+ __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
+ __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
+ if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
+ __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
+ __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
+ if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
+ __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
+ __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
+ if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
+ __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
+ __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
+ if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
+ __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
+ __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
+ if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
+ __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
+ __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
+ if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
+ __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
+ __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
+ if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
+ __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
+ __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
+ if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
+ __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
+ __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
+ if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
+ __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
+ __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
+ if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
+ __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
+ __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
+ if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener(_object):
+ """Proxy of C++ b2DestructionListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+ __del__ = lambda self : None;
+ def SayGoodbye(*args):
+ """
+ SayGoodbye(self, b2Joint joint)
+ SayGoodbye(self, b2Shape shape)
+ """
+ return _Box2D2.b2DestructionListener_SayGoodbye(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2DestructionListener"""
+ if self.__class__ == b2DestructionListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DestructionListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DestructionListener(self)
+ return weakref_proxy(self)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener(_object):
+ """Proxy of C++ b2BoundaryListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+ __del__ = lambda self : None;
+ def Violation(*args):
+ """Violation(self, b2Body body)"""
+ return _Box2D2.b2BoundaryListener_Violation(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2BoundaryListener"""
+ if self.__class__ == b2BoundaryListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2BoundaryListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2BoundaryListener(self)
+ return weakref_proxy(self)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter(_object):
+ """Proxy of C++ b2ContactFilter class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ __del__ = lambda self : None;
+ def ShouldCollide(*args):
+ """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
+ return _Box2D2.b2ContactFilter_ShouldCollide(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactFilter"""
+ this = _Box2D2.new_b2ContactFilter(*args)
+ try: self.this.append(this)
+ except: self.this = this
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener(_object):
+ """Proxy of C++ b2ContactListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+ __del__ = lambda self : None;
+ def Add(*args):
+ """Add(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Add(*args)
+
+ def Persist(*args):
+ """Persist(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Persist(*args)
+
+ def Remove(*args):
+ """Remove(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Remove(*args)
+
+ def Result(*args):
+ """Result(self, b2ContactResult point)"""
+ return _Box2D2.b2ContactListener_Result(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactListener"""
+ if self.__class__ == b2ContactListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2ContactListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2ContactListener(self)
+ return weakref_proxy(self)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color(_object):
+ """Proxy of C++ b2Color class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Color
+ __init__(self, float32 r, float32 g, float32 b) -> b2Color
+ """
+ this = _Box2D2.new_b2Color(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
+ __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
+ if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
+ __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
+ __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
+ if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
+ __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
+ __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
+ if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
+ __swig_destroy__ = _Box2D2.delete_b2Color
+ __del__ = lambda self : None;
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw(_object):
+ """Proxy of C++ b2DebugDraw class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DebugDraw"""
+ if self.__class__ == b2DebugDraw:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DebugDraw(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ __del__ = lambda self : None;
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+ def SetFlags(*args):
+ """SetFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_SetFlags(*args)
+
+ def GetFlags(*args):
+ """GetFlags(self) -> uint32"""
+ return _Box2D2.b2DebugDraw_GetFlags(*args)
+
+ def AppendFlags(*args):
+ """AppendFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_AppendFlags(*args)
+
+ def ClearFlags(*args):
+ """ClearFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_ClearFlags(*args)
+
+ def DrawPolygon(*args):
+ """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawPolygon(*args)
+
+ def DrawSolidPolygon(*args):
+ """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
+
+ def DrawCircle(*args):
+ """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawCircle(*args)
+
+ def DrawSolidCircle(*args):
+ """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
+
+ def DrawSegment(*args):
+ """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSegment(*args)
+
+ def DrawXForm(*args):
+ """DrawXForm(self, b2XForm xf)"""
+ return _Box2D2.b2DebugDraw_DrawXForm(*args)
+
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DebugDraw(self)
+ return weakref_proxy(self)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator(_object):
+ """Proxy of C++ b2BlockAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BlockAllocator"""
+ this = _Box2D2.new_b2BlockAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2BlockAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p, int32 size)"""
+ return _Box2D2.b2BlockAllocator_Free(*args)
+
+ def Clear(*args):
+ """Clear(self)"""
+ return _Box2D2.b2BlockAllocator_Clear(*args)
+
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry(_object):
+ """Proxy of C++ b2StackEntry class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
+ __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
+ if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
+ __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
+ __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
+ if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
+ __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
+ __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
+ if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2StackEntry"""
+ this = _Box2D2.new_b2StackEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+ __del__ = lambda self : None;
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator(_object):
+ """Proxy of C++ b2StackAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2StackAllocator"""
+ this = _Box2D2.new_b2StackAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2StackAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p)"""
+ return _Box2D2.b2StackAllocator_Free(*args)
+
+ def GetMaxAllocation(*args):
+ """GetMaxAllocation(self) -> int32"""
+ return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
+
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister(_object):
+ """Proxy of C++ b2ContactRegister class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
+ __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
+ if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
+ __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
+ __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
+ if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
+ __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
+ __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
+ if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactRegister"""
+ this = _Box2D2.new_b2ContactRegister(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+ __del__ = lambda self : None;
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge(_object):
+ """Proxy of C++ b2ContactEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
+ __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
+ __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
+ if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactEdge"""
+ this = _Box2D2.new_b2ContactEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+ __del__ = lambda self : None;
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint(_object):
+ """Proxy of C++ b2ContactPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
+ __swig_setmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_set
+ __swig_getmethods__["velocity"] = _Box2D2.b2ContactPoint_velocity_get
+ if _newclass:velocity = _swig_property(_Box2D2.b2ContactPoint_velocity_get, _Box2D2.b2ContactPoint_velocity_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ContactPoint_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ContactPoint_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ContactPoint_friction_get, _Box2D2.b2ContactPoint_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ContactPoint_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ContactPoint_restitution_get, _Box2D2.b2ContactPoint_restitution_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
+ def __repr__(self):
+ return "b2ContactPoint(\n\tid: %s\n\tshape1: %s\n\tshape2: %s\n\tposition: %s\n\tnormal: %s\n\tseparation: %f normalForce: %f tangentForce: %f)" % \
+ (self.id, self.shape1, self.shape2, self.position, self.normal, self.separation, self.normalForce, self.tangentForce)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactPoint"""
+ this = _Box2D2.new_b2ContactPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+ __del__ = lambda self : None;
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2ContactResult(_object):
+ """Proxy of C++ b2ContactResult class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactResult, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactResult, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactResult_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactResult_shape1_get, _Box2D2.b2ContactResult_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactResult_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactResult_shape2_get, _Box2D2.b2ContactResult_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactResult_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactResult_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactResult_position_get, _Box2D2.b2ContactResult_position_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactResult_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactResult_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactResult_normal_get, _Box2D2.b2ContactResult_normal_set)
+ __swig_setmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_set
+ __swig_getmethods__["normalImpulse"] = _Box2D2.b2ContactResult_normalImpulse_get
+ if _newclass:normalImpulse = _swig_property(_Box2D2.b2ContactResult_normalImpulse_get, _Box2D2.b2ContactResult_normalImpulse_set)
+ __swig_setmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_set
+ __swig_getmethods__["tangentImpulse"] = _Box2D2.b2ContactResult_tangentImpulse_get
+ if _newclass:tangentImpulse = _swig_property(_Box2D2.b2ContactResult_tangentImpulse_get, _Box2D2.b2ContactResult_tangentImpulse_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactResult_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactResult_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactResult_id_get, _Box2D2.b2ContactResult_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactResult"""
+ this = _Box2D2.new_b2ContactResult(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactResult
+ __del__ = lambda self : None;
+b2ContactResult_swigregister = _Box2D2.b2ContactResult_swigregister
+b2ContactResult_swigregister(b2ContactResult)
+
+class b2Contact(_object):
+ """Proxy of C++ b2Contact class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2Contact_GetManifolds(*args)
+
+ def GetManifoldCount(*args):
+ """GetManifoldCount(self) -> int32"""
+ return _Box2D2.b2Contact_GetManifoldCount(*args)
+
+ def IsSolid(*args):
+ """IsSolid(self) -> bool"""
+ return _Box2D2.b2Contact_IsSolid(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Contact"""
+ return _Box2D2.b2Contact_GetNext(*args)
+
+ def GetShape1(*args):
+ """GetShape1(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape1(*args)
+
+ def GetShape2(*args):
+ """GetShape2(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape2(*args)
+
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ def AddType(*args):
+ """
+ AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+ if _newclass:AddType = staticmethod(AddType)
+ __swig_getmethods__["AddType"] = lambda x: AddType
+ def InitializeRegisters(*args):
+ """InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+ if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
+ __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
+ def Create(*args):
+ """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ __del__ = lambda self : None;
+ def Update(*args):
+ """Update(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Update(*args)
+
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Evaluate(*args)
+
+ __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
+ __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
+ if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
+ __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
+ __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
+ if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
+ __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
+ __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
+ if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
+ __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
+ __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
+ if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
+ __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
+ __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
+ if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
+ __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
+ __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
+ if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+
+def b2Contact_AddType(*args):
+ """
+ b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+def b2Contact_InitializeRegisters(*args):
+ """b2Contact_InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+def b2Contact_Create(*args):
+ """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+def b2Contact_Destroy(*args):
+ """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+class b2NullContact(b2Contact):
+ """Proxy of C++ b2NullContact class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2NullContact"""
+ this = _Box2D2.new_b2NullContact(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener ?)"""
+ return _Box2D2.b2NullContact_Evaluate(*args)
+
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2NullContact_GetManifolds(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+ __del__ = lambda self : None;
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ """Proxy of C++ b2ContactManager class"""
+ __swig_setmethods__ = {}
+ for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactManager"""
+ this = _Box2D2.new_b2ContactManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2ContactManager_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2ContactManager_PairRemoved(*args)
+
+ def Destroy(*args):
+ """Destroy(self, b2Contact c)"""
+ return _Box2D2.b2ContactManager_Destroy(*args)
+
+ def Collide(*args):
+ """Collide(self)"""
+ return _Box2D2.b2ContactManager_Collide(*args)
+
+ __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
+ __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
+ __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
+ if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
+ __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
+ __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
+ if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+ __del__ = lambda self : None;
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep(_object):
+ """Proxy of C++ b2TimeStep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
+ __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
+ if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
+ __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
+ __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
+ if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
+ __swig_setmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_set
+ __swig_getmethods__["dtRatio"] = _Box2D2.b2TimeStep_dtRatio_get
+ if _newclass:dtRatio = _swig_property(_Box2D2.b2TimeStep_dtRatio_get, _Box2D2.b2TimeStep_dtRatio_set)
+ __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
+ __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
+ if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
+ __swig_setmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_set
+ __swig_getmethods__["warmStarting"] = _Box2D2.b2TimeStep_warmStarting_get
+ if _newclass:warmStarting = _swig_property(_Box2D2.b2TimeStep_warmStarting_get, _Box2D2.b2TimeStep_warmStarting_set)
+ __swig_setmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_set
+ __swig_getmethods__["positionCorrection"] = _Box2D2.b2TimeStep_positionCorrection_get
+ if _newclass:positionCorrection = _swig_property(_Box2D2.b2TimeStep_positionCorrection_get, _Box2D2.b2TimeStep_positionCorrection_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2TimeStep"""
+ this = _Box2D2.new_b2TimeStep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+ __del__ = lambda self : None;
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World(_object):
+ """Proxy of C++ b2World class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
+ this = _Box2D2.new_b2World(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2World
+ __del__ = lambda self : None;
+ def SetDestructionListener(*args):
+ """SetDestructionListener(self, b2DestructionListener listener)"""
+ return _Box2D2.b2World_SetDestructionListener(*args)
+
+ def SetBoundaryListener(*args):
+ """SetBoundaryListener(self, b2BoundaryListener listener)"""
+ return _Box2D2.b2World_SetBoundaryListener(*args)
+
+ def SetContactFilter(*args):
+ """SetContactFilter(self, b2ContactFilter filter)"""
+ return _Box2D2.b2World_SetContactFilter(*args)
+
+ def SetContactListener(*args):
+ """SetContactListener(self, b2ContactListener listener)"""
+ return _Box2D2.b2World_SetContactListener(*args)
+
+ def SetDebugDraw(*args):
+ """SetDebugDraw(self, b2DebugDraw debugDraw)"""
+ return _Box2D2.b2World_SetDebugDraw(*args)
+
+ def CreateBody(*args):
+ """CreateBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateBody(*args)
+
+ def DestroyBody(*args):
+ """DestroyBody(self, b2Body body)"""
+ return _Box2D2.b2World_DestroyBody(*args)
+
+ def CreateJoint(*args):
+ """CreateJoint(self, b2JointDef def) -> b2Joint"""
+ return _Box2D2.b2World_CreateJoint(*args)
+
+ def DestroyJoint(*args):
+ """DestroyJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DestroyJoint(*args)
+
+ def GetGroundBody(*args):
+ """GetGroundBody(self) -> b2Body"""
+ return _Box2D2.b2World_GetGroundBody(*args)
+
+ def Step(*args):
+ """Step(self, float32 timeStep, int32 iterations)"""
+ return _Box2D2.b2World_Step(*args)
+
+ def GetBodyList(*args):
+ """GetBodyList(self) -> b2Body"""
+ return _Box2D2.b2World_GetBodyList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2Joint"""
+ return _Box2D2.b2World_GetJointList(*args)
+
+ def Refilter(*args):
+ """Refilter(self, b2Shape shape)"""
+ return _Box2D2.b2World_Refilter(*args)
+
+ def SetWarmStarting(*args):
+ """SetWarmStarting(self, bool flag)"""
+ return _Box2D2.b2World_SetWarmStarting(*args)
+
+ def SetPositionCorrection(*args):
+ """SetPositionCorrection(self, bool flag)"""
+ return _Box2D2.b2World_SetPositionCorrection(*args)
+
+ def SetContinuousPhysics(*args):
+ """SetContinuousPhysics(self, bool flag)"""
+ return _Box2D2.b2World_SetContinuousPhysics(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2World_Validate(*args)
+
+ def GetProxyCount(*args):
+ """GetProxyCount(self) -> int32"""
+ return _Box2D2.b2World_GetProxyCount(*args)
+
+ def GetPairCount(*args):
+ """GetPairCount(self) -> int32"""
+ return _Box2D2.b2World_GetPairCount(*args)
+
+ def GetBodyCount(*args):
+ """GetBodyCount(self) -> int32"""
+ return _Box2D2.b2World_GetBodyCount(*args)
+
+ def GetJointCount(*args):
+ """GetJointCount(self) -> int32"""
+ return _Box2D2.b2World_GetJointCount(*args)
+
+ def GetContactCount(*args):
+ """GetContactCount(self) -> int32"""
+ return _Box2D2.b2World_GetContactCount(*args)
+
+ def SetGravity(*args):
+ """SetGravity(self, b2Vec2 gravity)"""
+ return _Box2D2.b2World_SetGravity(*args)
+
+ def Query(*args):
+ """
+ Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32
+ Query(self, b2AABB aabb, uint32 maxCount) -> PyObject
+ """
+ return _Box2D2.b2World_Query(*args)
+
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+class b2BodyDef(_object):
+ """Proxy of C++ b2BodyDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BodyDef"""
+ this = _Box2D2.new_b2BodyDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
+ __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
+ if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
+ __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
+ __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
+ __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
+ if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
+ __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
+ __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
+ if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
+ __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
+ __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
+ if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
+ __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
+ __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
+ if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
+ __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
+ __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
+ if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
+ __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
+ __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
+ if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
+ __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
+ __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
+ if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+ __del__ = lambda self : None;
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body(_object):
+ """Proxy of C++ b2Body class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def CreateShape(*args):
+ """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
+ return _Box2D2.b2Body_CreateShape(*args)
+
+ def DestroyShape(*args):
+ """DestroyShape(self, b2Shape shape)"""
+ return _Box2D2.b2Body_DestroyShape(*args)
+
+ def SetMass(*args):
+ """SetMass(self, b2MassData massData)"""
+ return _Box2D2.b2Body_SetMass(*args)
+
+ def SetMassFromShapes(*args):
+ """SetMassFromShapes(self)"""
+ return _Box2D2.b2Body_SetMassFromShapes(*args)
+
+ def SetXForm(*args):
+ """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
+ return _Box2D2.b2Body_SetXForm(*args)
+
+ def GetXForm(*args):
+ """GetXForm(self) -> b2XForm"""
+ return _Box2D2.b2Body_GetXForm(*args)
+
+ def GetPosition(*args):
+ """GetPosition(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetPosition(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Body_GetAngle(*args)
+
+ def GetWorldCenter(*args):
+ """GetWorldCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldCenter(*args)
+
+ def GetLocalCenter(*args):
+ """GetLocalCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalCenter(*args)
+
+ def SetLinearVelocity(*args):
+ """SetLinearVelocity(self, b2Vec2 v)"""
+ return _Box2D2.b2Body_SetLinearVelocity(*args)
+
+ def GetLinearVelocity(*args):
+ """GetLinearVelocity(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocity(*args)
+
+ def SetAngularVelocity(*args):
+ """SetAngularVelocity(self, float32 omega)"""
+ return _Box2D2.b2Body_SetAngularVelocity(*args)
+
+ def GetAngularVelocity(*args):
+ """GetAngularVelocity(self) -> float32"""
+ return _Box2D2.b2Body_GetAngularVelocity(*args)
+
+ def ApplyForce(*args):
+ """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyForce(*args)
+
+ def ApplyTorque(*args):
+ """ApplyTorque(self, float32 torque)"""
+ return _Box2D2.b2Body_ApplyTorque(*args)
+
+ def ApplyImpulse(*args):
+ """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyImpulse(*args)
+
+ def GetMass(*args):
+ """GetMass(self) -> float32"""
+ return _Box2D2.b2Body_GetMass(*args)
+
+ def GetInertia(*args):
+ """GetInertia(self) -> float32"""
+ return _Box2D2.b2Body_GetInertia(*args)
+
+ def GetWorldPoint(*args):
+ """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldPoint(*args)
+
+ def GetWorldVector(*args):
+ """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldVector(*args)
+
+ def GetLocalPoint(*args):
+ """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalPoint(*args)
+
+ def GetLocalVector(*args):
+ """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalVector(*args)
+
+ def GetLinearVelocityFromWorldPoint(*args):
+ """GetLinearVelocityFromWorldPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromWorldPoint(*args)
+
+ def GetLinearVelocityFromLocalPoint(*args):
+ """GetLinearVelocityFromLocalPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromLocalPoint(*args)
+
+ def IsBullet(*args):
+ """IsBullet(self) -> bool"""
+ return _Box2D2.b2Body_IsBullet(*args)
+
+ def SetBullet(*args):
+ """SetBullet(self, bool flag)"""
+ return _Box2D2.b2Body_SetBullet(*args)
+
+ def IsStatic(*args):
+ """IsStatic(self) -> bool"""
+ return _Box2D2.b2Body_IsStatic(*args)
+
+ def IsDynamic(*args):
+ """IsDynamic(self) -> bool"""
+ return _Box2D2.b2Body_IsDynamic(*args)
+
+ def IsFrozen(*args):
+ """IsFrozen(self) -> bool"""
+ return _Box2D2.b2Body_IsFrozen(*args)
+
+ def IsSleeping(*args):
+ """IsSleeping(self) -> bool"""
+ return _Box2D2.b2Body_IsSleeping(*args)
+
+ def AllowSleeping(*args):
+ """AllowSleeping(self, bool flag)"""
+ return _Box2D2.b2Body_AllowSleeping(*args)
+
+ def WakeUp(*args):
+ """WakeUp(self)"""
+ return _Box2D2.b2Body_WakeUp(*args)
+
+ def PutToSleep(*args):
+ """PutToSleep(self)"""
+ return _Box2D2.b2Body_PutToSleep(*args)
+
+ def GetShapeList(*args):
+ """GetShapeList(self) -> b2Shape"""
+ return _Box2D2.b2Body_GetShapeList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2JointEdge"""
+ return _Box2D2.b2Body_GetJointList(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Body"""
+ return _Box2D2.b2Body_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Body_SetUserData(*args)
+
+ def GetWorld(*args):
+ """GetWorld(self) -> b2World"""
+ return _Box2D2.b2Body_GetWorld(*args)
+
+ def __repr__(self):
+ return "b2Body(Position: %s)" % (self.GetPosition())
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Body_pyGetUserData(*args)
+
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ """Proxy of C++ b2DistanceJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DistanceJointDef"""
+ this = _Box2D2.new_b2DistanceJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
+ return _Box2D2.b2DistanceJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
+ __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
+ __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
+ if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2DistanceJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2DistanceJointDef_frequencyHz_get, _Box2D2.b2DistanceJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2DistanceJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2DistanceJointDef_dampingRatio_get, _Box2D2.b2DistanceJointDef_dampingRatio_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+ __del__ = lambda self : None;
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ """Proxy of C++ b2DistanceJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
+ this = _Box2D2.new_b2DistanceJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
+ __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
+ if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
+ __swig_setmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_set
+ __swig_getmethods__["m_frequencyHz"] = _Box2D2.b2DistanceJoint_m_frequencyHz_get
+ if _newclass:m_frequencyHz = _swig_property(_Box2D2.b2DistanceJoint_m_frequencyHz_get, _Box2D2.b2DistanceJoint_m_frequencyHz_set)
+ __swig_setmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_set
+ __swig_getmethods__["m_dampingRatio"] = _Box2D2.b2DistanceJoint_m_dampingRatio_get
+ if _newclass:m_dampingRatio = _swig_property(_Box2D2.b2DistanceJoint_m_dampingRatio_get, _Box2D2.b2DistanceJoint_m_dampingRatio_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2DistanceJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2DistanceJoint_m_gamma_get, _Box2D2.b2DistanceJoint_m_gamma_set)
+ __swig_setmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_set
+ __swig_getmethods__["m_bias"] = _Box2D2.b2DistanceJoint_m_bias_get
+ if _newclass:m_bias = _swig_property(_Box2D2.b2DistanceJoint_m_bias_get, _Box2D2.b2DistanceJoint_m_bias_set)
+ __swig_setmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_set
+ __swig_getmethods__["m_impulse"] = _Box2D2.b2DistanceJoint_m_impulse_get
+ if _newclass:m_impulse = _swig_property(_Box2D2.b2DistanceJoint_m_impulse_get, _Box2D2.b2DistanceJoint_m_impulse_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
+ __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
+ __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
+ if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+ __del__ = lambda self : None;
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ """Proxy of C++ b2MouseJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2MouseJointDef"""
+ this = _Box2D2.new_b2MouseJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
+ __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
+ if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
+ __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
+ __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
+ if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
+ __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
+ __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
+ if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+ __del__ = lambda self : None;
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ """Proxy of C++ b2MouseJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
+
+ def SetTarget(*args):
+ """SetTarget(self, b2Vec2 target)"""
+ return _Box2D2.b2MouseJoint_SetTarget(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
+ this = _Box2D2.new_b2MouseJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
+ __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
+ if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
+ __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
+ __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
+ if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
+ __swig_setmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_set
+ __swig_getmethods__["m_impulse"] = _Box2D2.b2MouseJoint_m_impulse_get
+ if _newclass:m_impulse = _swig_property(_Box2D2.b2MouseJoint_m_impulse_get, _Box2D2.b2MouseJoint_m_impulse_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
+ __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
+ __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
+ if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
+ __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
+ __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
+ if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
+ __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
+ __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
+ if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+ __del__ = lambda self : None;
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ """Proxy of C++ b2PrismaticJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PrismaticJointDef"""
+ this = _Box2D2.new_b2PrismaticJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
+ return _Box2D2.b2PrismaticJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
+ __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
+ __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
+ if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
+ __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
+ __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
+ if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
+ __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
+ __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
+ if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
+ __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
+ __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
+ if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+ __del__ = lambda self : None;
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ """Proxy of C++ b2PrismaticJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
+
+ def GetJointTranslation(*args):
+ """GetJointTranslation(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2PrismaticJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorForce(*args):
+ """SetMaxMotorForce(self, float32 force)"""
+ return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
+
+ def GetMotorForce(*args):
+ """GetMotorForce(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
+ this = _Box2D2.new_b2PrismaticJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
+ __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
+ if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
+ __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
+ __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
+ if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
+ __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
+ __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
+ if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
+ __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
+ __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
+ if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
+ __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
+ __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
+ if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
+ __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
+ __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
+ if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
+ __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
+ __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
+ if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
+ __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
+ if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
+ __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
+ __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
+ if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
+ __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
+ __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
+ if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+ __del__ = lambda self : None;
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ """Proxy of C++ b2RevoluteJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2RevoluteJointDef"""
+ this = _Box2D2.new_b2RevoluteJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
+ return _Box2D2.b2RevoluteJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
+ __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
+ __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
+ if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
+ __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
+ __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
+ if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
+ __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
+ __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
+ if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+ __del__ = lambda self : None;
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ """Proxy of C++ b2RevoluteJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
+
+ def GetJointAngle(*args):
+ """GetJointAngle(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2RevoluteJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorTorque(*args):
+ """SetMaxMotorTorque(self, float32 torque)"""
+ return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
+
+ def GetMotorTorque(*args):
+ """GetMotorTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
+ this = _Box2D2.new_b2RevoluteJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
+ __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
+ if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
+ __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
+ if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
+ __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
+ __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
+ if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
+ __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
+ __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
+ if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
+ __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
+ __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
+ if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
+ __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
+ __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
+ if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+ __del__ = lambda self : None;
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ """Proxy of C++ b2PulleyJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PulleyJointDef"""
+ this = _Box2D2.new_b2PulleyJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """
+ Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
+ b2Vec2 anchor1, b2Vec2 anchor2,
+ float32 ratio)
+ """
+ return _Box2D2.b2PulleyJointDef_Initialize(*args)
+
+ __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
+ __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
+ if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
+ __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
+ __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
+ if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
+ __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
+ __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
+ if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
+ __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
+ __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
+ if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
+ __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
+ __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
+ if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
+ __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
+ __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
+ if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+ __del__ = lambda self : None;
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ """Proxy of C++ b2PulleyJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
+
+ def GetGroundAnchor1(*args):
+ """GetGroundAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
+
+ def GetGroundAnchor2(*args):
+ """GetGroundAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
+
+ def GetLength1(*args):
+ """GetLength1(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength1(*args)
+
+ def GetLength2(*args):
+ """GetLength2(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength2(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
+ this = _Box2D2.new_b2PulleyJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
+ __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
+ if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
+ __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
+ if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
+ __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
+ __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
+ if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
+ __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
+ __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
+ if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
+ __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
+ __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
+ if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
+ __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
+ __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
+ if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
+ __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
+ __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
+ if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
+ __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
+ __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
+ if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
+ __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
+ __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
+ if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
+ __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
+ __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
+ if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
+ __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
+ __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
+ if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
+ __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
+ __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
+ if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
+ __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
+ __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
+ if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
+ __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
+ __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
+ if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
+ __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
+ __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
+ if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
+ __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
+ __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
+ if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+ __del__ = lambda self : None;
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ """Proxy of C++ b2GearJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2GearJointDef"""
+ this = _Box2D2.new_b2GearJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
+ __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
+ if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
+ __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
+ __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
+ if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+ __del__ = lambda self : None;
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ """Proxy of C++ b2GearJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetReactionTorque(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2GearJointDef data) -> b2GearJoint"""
+ this = _Box2D2.new_b2GearJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
+ __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
+ if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
+ __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
+ __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
+ if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
+ __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
+ __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
+ if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
+ __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
+ __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
+ if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
+ __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
+ __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
+ if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
+ __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
+ __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
+ if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
+ __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
+ if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+ __del__ = lambda self : None;
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/box2d/box2d_linux64/_Box2D2.so b/elements/box2d/box2d_linux64/_Box2D2.so
new file mode 100755
index 0000000..cf9a995
--- /dev/null
+++ b/elements/box2d/box2d_linux64/_Box2D2.so
Binary files differ
diff --git a/elements/box2d/box2d_linux64/__init__.py b/elements/box2d/box2d_linux64/__init__.py
new file mode 100755
index 0000000..53d0f25
--- /dev/null
+++ b/elements/box2d/box2d_linux64/__init__.py
@@ -0,0 +1 @@
+from Box2D2 import *
diff --git a/elements/box2d/box2d_macosx/Box2D2.py b/elements/box2d/box2d_macosx/Box2D2.py
new file mode 100755
index 0000000..5d444e2
--- /dev/null
+++ b/elements/box2d/box2d_macosx/Box2D2.py
@@ -0,0 +1,3773 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.31
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+try:
+ _swig_property = property
+except NameError:
+ pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+try:
+ import weakref
+ weakref_proxy = weakref.proxy
+except:
+ weakref_proxy = lambda x: x
+
+
+
+def b2Alloc(*args):
+ """b2Alloc(int32 size) -> void"""
+ return _Box2D2.b2Alloc(*args)
+
+def b2Free(*args):
+ """b2Free(void mem)"""
+ return _Box2D2.b2Free(*args)
+class b2Version(_object):
+ """Proxy of C++ b2Version class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Version, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Version, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["major"] = _Box2D2.b2Version_major_set
+ __swig_getmethods__["major"] = _Box2D2.b2Version_major_get
+ if _newclass:major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
+ __swig_setmethods__["minor"] = _Box2D2.b2Version_minor_set
+ __swig_getmethods__["minor"] = _Box2D2.b2Version_minor_get
+ if _newclass:minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
+ __swig_setmethods__["revision"] = _Box2D2.b2Version_revision_set
+ __swig_getmethods__["revision"] = _Box2D2.b2Version_revision_get
+ if _newclass:revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Version"""
+ this = _Box2D2.new_b2Version(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Version
+ __del__ = lambda self : None;
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+
+def b2IsValid(*args):
+ """b2IsValid(float32 x) -> bool"""
+ return _Box2D2.b2IsValid(*args)
+
+def b2InvSqrt(*args):
+ """b2InvSqrt(float32 x) -> float32"""
+ return _Box2D2.b2InvSqrt(*args)
+class b2Vec2(_object):
+ """Proxy of C++ b2Vec2 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Vec2, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Vec2, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Vec2
+ __init__(self, float32 x, float32 y) -> b2Vec2
+ """
+ this = _Box2D2.new_b2Vec2(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Vec2_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, float32 x_, float32 y_)"""
+ return _Box2D2.b2Vec2_Set(*args)
+
+ def __neg__(*args):
+ """__neg__(self) -> b2Vec2"""
+ return _Box2D2.b2Vec2___neg__(*args)
+
+ def __iadd__(*args):
+ """__iadd__(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2___iadd__(*args)
+
+ def __isub__(*args):
+ """__isub__(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2___isub__(*args)
+
+ def __imul__(*args):
+ """__imul__(self, float32 a)"""
+ return _Box2D2.b2Vec2___imul__(*args)
+
+ def Length(*args):
+ """Length(self) -> float32"""
+ return _Box2D2.b2Vec2_Length(*args)
+
+ def LengthSquared(*args):
+ """LengthSquared(self) -> float32"""
+ return _Box2D2.b2Vec2_LengthSquared(*args)
+
+ def Normalize(*args):
+ """Normalize(self) -> float32"""
+ return _Box2D2.b2Vec2_Normalize(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Vec2_IsValid(*args)
+
+ __swig_setmethods__["x"] = _Box2D2.b2Vec2_x_set
+ __swig_getmethods__["x"] = _Box2D2.b2Vec2_x_get
+ if _newclass:x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
+ __swig_setmethods__["y"] = _Box2D2.b2Vec2_y_set
+ __swig_getmethods__["y"] = _Box2D2.b2Vec2_y_get
+ if _newclass:y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
+ def __repr__(self):
+ return "b2Vec2(%g,%g)" % (self.x, self.y)
+ def tuple(self):
+ return (self.x, self.y)
+
+ def __mul__(*args):
+ """__mul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___mul__(*args)
+
+ def __add__(*args):
+ """__add__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___add__(*args)
+
+ def __sub__(*args):
+ """__sub__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___sub__(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+ __del__ = lambda self : None;
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22(_object):
+ """Proxy of C++ b2Mat22 class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Mat22, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Mat22, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Mat22
+ __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
+ __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
+ __init__(self, float32 angle) -> b2Mat22
+ """
+ this = _Box2D2.new_b2Mat22(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Set(*args):
+ """
+ Set(self, b2Vec2 c1, b2Vec2 c2)
+ Set(self, float32 angle)
+ """
+ return _Box2D2.b2Mat22_Set(*args)
+
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2Mat22_SetIdentity(*args)
+
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Mat22_SetZero(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Mat22_GetAngle(*args)
+
+ def Invert(*args):
+ """Invert(self) -> b2Mat22"""
+ return _Box2D2.b2Mat22_Invert(*args)
+
+ def Solve(*args):
+ """Solve(self, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Mat22_Solve(*args)
+
+ __swig_setmethods__["col1"] = _Box2D2.b2Mat22_col1_set
+ __swig_getmethods__["col1"] = _Box2D2.b2Mat22_col1_get
+ if _newclass:col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
+ __swig_setmethods__["col2"] = _Box2D2.b2Mat22_col2_set
+ __swig_getmethods__["col2"] = _Box2D2.b2Mat22_col2_get
+ if _newclass:col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+ __del__ = lambda self : None;
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm(_object):
+ """Proxy of C++ b2XForm class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2XForm, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2XForm, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2XForm
+ __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
+ """
+ this = _Box2D2.new_b2XForm(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2XForm_SetIdentity(*args)
+
+ __swig_setmethods__["position"] = _Box2D2.b2XForm_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2XForm_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
+ __swig_setmethods__["R"] = _Box2D2.b2XForm_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2XForm_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+ __del__ = lambda self : None;
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep(_object):
+ """Proxy of C++ b2Sweep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Sweep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Sweep, name)
+ __repr__ = _swig_repr
+ def GetXForm(*args):
+ """GetXForm(self, b2XForm xf, float32 t)"""
+ return _Box2D2.b2Sweep_GetXForm(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Sweep_Advance(*args)
+
+ __swig_setmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_set
+ __swig_getmethods__["localCenter"] = _Box2D2.b2Sweep_localCenter_get
+ if _newclass:localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
+ __swig_setmethods__["c0"] = _Box2D2.b2Sweep_c0_set
+ __swig_getmethods__["c0"] = _Box2D2.b2Sweep_c0_get
+ if _newclass:c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
+ __swig_setmethods__["c"] = _Box2D2.b2Sweep_c_set
+ __swig_getmethods__["c"] = _Box2D2.b2Sweep_c_get
+ if _newclass:c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
+ __swig_setmethods__["a0"] = _Box2D2.b2Sweep_a0_set
+ __swig_getmethods__["a0"] = _Box2D2.b2Sweep_a0_get
+ if _newclass:a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
+ __swig_setmethods__["a"] = _Box2D2.b2Sweep_a_set
+ __swig_getmethods__["a"] = _Box2D2.b2Sweep_a_get
+ if _newclass:a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
+ __swig_setmethods__["t0"] = _Box2D2.b2Sweep_t0_set
+ __swig_getmethods__["t0"] = _Box2D2.b2Sweep_t0_get
+ if _newclass:t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Sweep"""
+ this = _Box2D2.new_b2Sweep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+ __del__ = lambda self : None;
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+
+def b2Dot(*args):
+ """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2Dot(*args)
+
+def b2_VaddV(*args):
+ """b2_VaddV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2_VaddV(*args)
+
+def b2_VsubV(*args):
+ """b2_VsubV(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2_VsubV(*args)
+
+def b2_VmulF(*args):
+ """b2_VmulF(float32 s, b2Vec2 a) -> b2Vec2"""
+ return _Box2D2.b2_VmulF(*args)
+
+def b2_VequV(*args):
+ """b2_VequV(b2Vec2 a, b2Vec2 b) -> bool"""
+ return _Box2D2.b2_VequV(*args)
+
+def b2DistanceSquared(*args):
+ """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2DistanceSquared(*args)
+
+def b2_MaddM(*args):
+ """b2_MaddM(b2Mat22 A, b2Mat22 B) -> b2Mat22"""
+ return _Box2D2.b2_MaddM(*args)
+
+def b2Min(*args):
+ """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Min(*args)
+
+def b2Max(*args):
+ """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Max(*args)
+
+def b2Clamp(*args):
+ """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
+ return _Box2D2.b2Clamp(*args)
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+
+def b2NextPowerOfTwo(*args):
+ """b2NextPowerOfTwo(uint32 x) -> uint32"""
+ return _Box2D2.b2NextPowerOfTwo(*args)
+
+def b2IsPowerOfTwo(*args):
+ """b2IsPowerOfTwo(uint32 x) -> bool"""
+ return _Box2D2.b2IsPowerOfTwo(*args)
+class b2ContactID(_object):
+ """Proxy of C++ b2ContactID class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["key"] = _Box2D2.b2ContactID_key_set
+ __swig_getmethods__["key"] = _Box2D2.b2ContactID_key_get
+ if _newclass:key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
+ __swig_getmethods__["features"] = _Box2D2.b2ContactID_features_get
+ if _newclass:features = _swig_property(_Box2D2.b2ContactID_features_get)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID"""
+ this = _Box2D2.new_b2ContactID(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+ __del__ = lambda self : None;
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+
+def b2Cross(*args):
+ """
+ b2Cross(b2Vec2 a, b2Vec2 b) -> float32
+ b2Cross(b2Vec2 a, float32 s) -> b2Vec2
+ b2Cross(float32 s, b2Vec2 a) -> b2Vec2
+ """
+ return _Box2D2.b2Cross(*args)
+
+def b2Mul(*args):
+ """
+ b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2Mul(*args)
+
+def b2MulT(*args):
+ """
+ b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2MulT(*args)
+
+def b2Abs(*args):
+ """
+ b2Abs(float32 a) -> float32
+ b2Abs(b2Vec2 a) -> b2Vec2
+ b2Abs(b2Mat22 A) -> b2Mat22
+ """
+ return _Box2D2.b2Abs(*args)
+
+def b2Random(*args):
+ """
+ b2Random() -> float32
+ b2Random(float32 lo, float32 hi) -> float32
+ """
+ return _Box2D2.b2Random(*args)
+b2_nullFeature = cvar.b2_nullFeature
+b2_newPoint = cvar.b2_newPoint
+b2_oldPoint = cvar.b2_oldPoint
+
+class b2ContactID_features(_object):
+ """Proxy of C++ b2ContactID_features class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactID_features, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactID_features, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_set
+ __swig_getmethods__["referenceEdge"] = _Box2D2.b2ContactID_features_referenceEdge_get
+ if _newclass:referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
+ __swig_setmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_set
+ __swig_getmethods__["incidentEdge"] = _Box2D2.b2ContactID_features_incidentEdge_get
+ if _newclass:incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
+ __swig_setmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_set
+ __swig_getmethods__["incidentVertex"] = _Box2D2.b2ContactID_features_incidentVertex_get
+ if _newclass:incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
+ __swig_setmethods__["flip"] = _Box2D2.b2ContactID_features_flip_set
+ __swig_getmethods__["flip"] = _Box2D2.b2ContactID_features_flip_get
+ if _newclass:flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID_features"""
+ this = _Box2D2.new_b2ContactID_features(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+ __del__ = lambda self : None;
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint(_object):
+ """Proxy of C++ b2ManifoldPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ManifoldPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ManifoldPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_set
+ __swig_getmethods__["localPoint1"] = _Box2D2.b2ManifoldPoint_localPoint1_get
+ if _newclass:localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
+ __swig_setmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_set
+ __swig_getmethods__["localPoint2"] = _Box2D2.b2ManifoldPoint_localPoint2_get
+ if _newclass:localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ManifoldPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ManifoldPoint_normalForce_get
+ if _newclass:normalForce = _swig_property(_Box2D2.b2ManifoldPoint_normalForce_get, _Box2D2.b2ManifoldPoint_normalForce_set)
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ManifoldPoint_tangentForce_get
+ if _newclass:tangentForce = _swig_property(_Box2D2.b2ManifoldPoint_tangentForce_get, _Box2D2.b2ManifoldPoint_tangentForce_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ManifoldPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ManifoldPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ManifoldPoint"""
+ this = _Box2D2.new_b2ManifoldPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+ __del__ = lambda self : None;
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold(_object):
+ """Proxy of C++ b2Manifold class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Manifold, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Manifold, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["points"] = _Box2D2.b2Manifold_points_set
+ __swig_getmethods__["points"] = _Box2D2.b2Manifold_points_get
+ if _newclass:points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2Manifold_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2Manifold_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
+ __swig_setmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_set
+ __swig_getmethods__["pointCount"] = _Box2D2.b2Manifold_pointCount_get
+ if _newclass:pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Manifold"""
+ this = _Box2D2.new_b2Manifold(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+ __del__ = lambda self : None;
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment(_object):
+ """Proxy of C++ b2Segment class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Segment, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Segment, name)
+ __repr__ = _swig_repr
+ def TestSegment(*args):
+ """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
+ return _Box2D2.b2Segment_TestSegment(*args)
+
+ __swig_setmethods__["p1"] = _Box2D2.b2Segment_p1_set
+ __swig_getmethods__["p1"] = _Box2D2.b2Segment_p1_get
+ if _newclass:p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
+ __swig_setmethods__["p2"] = _Box2D2.b2Segment_p2_set
+ __swig_getmethods__["p2"] = _Box2D2.b2Segment_p2_get
+ if _newclass:p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Segment"""
+ this = _Box2D2.new_b2Segment(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+ __del__ = lambda self : None;
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB(_object):
+ """Proxy of C++ b2AABB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2AABB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2AABB, name)
+ __repr__ = _swig_repr
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2AABB_IsValid(*args)
+
+ __swig_setmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_set
+ __swig_getmethods__["lowerBound"] = _Box2D2.b2AABB_lowerBound_get
+ if _newclass:lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
+ __swig_setmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_set
+ __swig_getmethods__["upperBound"] = _Box2D2.b2AABB_upperBound_get
+ if _newclass:upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2AABB"""
+ this = _Box2D2.new_b2AABB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+ __del__ = lambda self : None;
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB(_object):
+ """Proxy of C++ b2OBB class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2OBB, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2OBB, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["R"] = _Box2D2.b2OBB_R_set
+ __swig_getmethods__["R"] = _Box2D2.b2OBB_R_get
+ if _newclass:R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
+ __swig_setmethods__["center"] = _Box2D2.b2OBB_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2OBB_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
+ __swig_setmethods__["extents"] = _Box2D2.b2OBB_extents_set
+ __swig_getmethods__["extents"] = _Box2D2.b2OBB_extents_get
+ if _newclass:extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2OBB"""
+ this = _Box2D2.new_b2OBB(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+ __del__ = lambda self : None;
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+
+def b2CollideCircles(*args):
+ """
+ b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
+ b2CircleShape circle2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollideCircles(*args)
+
+def b2CollidePolygonAndCircle(*args):
+ """
+ b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
+ b2CircleShape circle, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygonAndCircle(*args)
+
+def b2CollidePolygons(*args):
+ """
+ b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
+ b2PolygonShape polygon2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygons(*args)
+
+def b2TimeOfImpact(*args):
+ """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
+ return _Box2D2.b2TimeOfImpact(*args)
+
+def b2TestOverlap(*args):
+ """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
+ return _Box2D2.b2TestOverlap(*args)
+class b2MassData(_object):
+ """Proxy of C++ b2MassData class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MassData, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MassData, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["mass"] = _Box2D2.b2MassData_mass_set
+ __swig_getmethods__["mass"] = _Box2D2.b2MassData_mass_get
+ if _newclass:mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
+ __swig_setmethods__["center"] = _Box2D2.b2MassData_center_set
+ __swig_getmethods__["center"] = _Box2D2.b2MassData_center_get
+ if _newclass:center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
+ __swig_setmethods__["I"] = _Box2D2.b2MassData_I_set
+ __swig_getmethods__["I"] = _Box2D2.b2MassData_I_get
+ if _newclass:I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2MassData"""
+ this = _Box2D2.new_b2MassData(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+ __del__ = lambda self : None;
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+
+def b2Distance(*args):
+ """
+ b2Distance(b2Vec2 a, b2Vec2 b) -> float32
+ b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
+ b2Shape shape2, b2XForm xf2) -> float32
+ """
+ return _Box2D2.b2Distance(*args)
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef(_object):
+ """Proxy of C++ b2ShapeDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ShapeDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ShapeDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ShapeDef"""
+ this = _Box2D2.new_b2ShapeDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ __del__ = lambda self : None;
+ __swig_setmethods__["type"] = _Box2D2.b2ShapeDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2ShapeDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2ShapeDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2ShapeDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
+ __swig_setmethods__["friction"] = _Box2D2.b2ShapeDef_friction_set
+ __swig_getmethods__["friction"] = _Box2D2.b2ShapeDef_friction_get
+ if _newclass:friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
+ __swig_setmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_set
+ __swig_getmethods__["restitution"] = _Box2D2.b2ShapeDef_restitution_get
+ if _newclass:restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
+ __swig_setmethods__["density"] = _Box2D2.b2ShapeDef_density_set
+ __swig_getmethods__["density"] = _Box2D2.b2ShapeDef_density_get
+ if _newclass:density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
+ __swig_setmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_set
+ __swig_getmethods__["categoryBits"] = _Box2D2.b2ShapeDef_categoryBits_get
+ if _newclass:categoryBits = _swig_property(_Box2D2.b2ShapeDef_categoryBits_get, _Box2D2.b2ShapeDef_categoryBits_set)
+ __swig_setmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_set
+ __swig_getmethods__["maskBits"] = _Box2D2.b2ShapeDef_maskBits_get
+ if _newclass:maskBits = _swig_property(_Box2D2.b2ShapeDef_maskBits_get, _Box2D2.b2ShapeDef_maskBits_set)
+ __swig_setmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_set
+ __swig_getmethods__["groupIndex"] = _Box2D2.b2ShapeDef_groupIndex_get
+ if _newclass:groupIndex = _swig_property(_Box2D2.b2ShapeDef_groupIndex_get, _Box2D2.b2ShapeDef_groupIndex_set)
+ __swig_setmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_set
+ __swig_getmethods__["isSensor"] = _Box2D2.b2ShapeDef_isSensor_get
+ if _newclass:isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape(_object):
+ """Proxy of C++ b2Shape class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Shape, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Shape, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Shape_GetType(*args)
+
+ def IsSensor(*args):
+ """IsSensor(self) -> bool"""
+ return _Box2D2.b2Shape_IsSensor(*args)
+
+ def GetBody(*args):
+ """GetBody(self) -> b2Body"""
+ return _Box2D2.b2Shape_GetBody(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Shape"""
+ return _Box2D2.b2Shape_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Shape_GetUserData(*args)
+
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
+ return _Box2D2.b2Shape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2Shape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
+ return _Box2D2.b2Shape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
+ return _Box2D2.b2Shape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2Shape_ComputeMass(*args)
+
+ def Create(*args):
+ """Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
+ return _Box2D2.b2Shape_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Shape shape, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Shape_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Shape
+ __del__ = lambda self : None;
+ def CreateProxy(*args):
+ """CreateProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
+ return _Box2D2.b2Shape_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, b2BroadPhase broadPhase)"""
+ return _Box2D2.b2Shape_DestroyProxy(*args)
+
+ def Synchronize(*args):
+ """Synchronize(self, b2BroadPhase broadPhase, b2XForm xf1, b2XForm xf2) -> bool"""
+ return _Box2D2.b2Shape_Synchronize(*args)
+
+ def ResetProxy(*args):
+ """ResetProxy(self, b2BroadPhase broadPhase, b2XForm xf)"""
+ return _Box2D2.b2Shape_ResetProxy(*args)
+
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2Shape_UpdateSweepRadius(*args)
+
+ def GetSweepRadius(*args):
+ """GetSweepRadius(self) -> float32"""
+ return _Box2D2.b2Shape_GetSweepRadius(*args)
+
+ __swig_setmethods__["m_type"] = _Box2D2.b2Shape_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Shape_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Shape_m_type_get, _Box2D2.b2Shape_m_type_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Shape_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Shape_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Shape_m_next_get, _Box2D2.b2Shape_m_next_set)
+ __swig_setmethods__["m_body"] = _Box2D2.b2Shape_m_body_set
+ __swig_getmethods__["m_body"] = _Box2D2.b2Shape_m_body_get
+ if _newclass:m_body = _swig_property(_Box2D2.b2Shape_m_body_get, _Box2D2.b2Shape_m_body_set)
+ __swig_setmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_set
+ __swig_getmethods__["m_sweepRadius"] = _Box2D2.b2Shape_m_sweepRadius_get
+ if _newclass:m_sweepRadius = _swig_property(_Box2D2.b2Shape_m_sweepRadius_get, _Box2D2.b2Shape_m_sweepRadius_set)
+ __swig_setmethods__["m_density"] = _Box2D2.b2Shape_m_density_set
+ __swig_getmethods__["m_density"] = _Box2D2.b2Shape_m_density_get
+ if _newclass:m_density = _swig_property(_Box2D2.b2Shape_m_density_get, _Box2D2.b2Shape_m_density_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Shape_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Shape_m_friction_get, _Box2D2.b2Shape_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Shape_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Shape_m_restitution_get, _Box2D2.b2Shape_m_restitution_set)
+ __swig_setmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_set
+ __swig_getmethods__["m_proxyId"] = _Box2D2.b2Shape_m_proxyId_get
+ if _newclass:m_proxyId = _swig_property(_Box2D2.b2Shape_m_proxyId_get, _Box2D2.b2Shape_m_proxyId_set)
+ __swig_setmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_set
+ __swig_getmethods__["m_categoryBits"] = _Box2D2.b2Shape_m_categoryBits_get
+ if _newclass:m_categoryBits = _swig_property(_Box2D2.b2Shape_m_categoryBits_get, _Box2D2.b2Shape_m_categoryBits_set)
+ __swig_setmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_set
+ __swig_getmethods__["m_maskBits"] = _Box2D2.b2Shape_m_maskBits_get
+ if _newclass:m_maskBits = _swig_property(_Box2D2.b2Shape_m_maskBits_get, _Box2D2.b2Shape_m_maskBits_set)
+ __swig_setmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_set
+ __swig_getmethods__["m_groupIndex"] = _Box2D2.b2Shape_m_groupIndex_get
+ if _newclass:m_groupIndex = _swig_property(_Box2D2.b2Shape_m_groupIndex_get, _Box2D2.b2Shape_m_groupIndex_set)
+ __swig_setmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_set
+ __swig_getmethods__["m_isSensor"] = _Box2D2.b2Shape_m_isSensor_get
+ if _newclass:m_isSensor = _swig_property(_Box2D2.b2Shape_m_isSensor_get, _Box2D2.b2Shape_m_isSensor_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Shape_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Shape_m_userData_get, _Box2D2.b2Shape_m_userData_set)
+ def __repr__(self):
+ return "b2Shape(from Body %s )" % (self.GetBody())
+ def typeName(self):
+ types = { e_unknownShape : "Unknown",
+ e_circleShape : "Circle",
+ e_polygonShape : "Polygon",
+ e_shapeTypeCount: "ShapeType" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the shape"""
+ return (getattr(self, "as%s" % self.typeName())) ()
+
+ def asCircle(*args):
+ """asCircle(self) -> b2CircleShape"""
+ return _Box2D2.b2Shape_asCircle(*args)
+
+ def asPolygon(*args):
+ """asPolygon(self) -> b2PolygonShape"""
+ return _Box2D2.b2Shape_asPolygon(*args)
+
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+
+def b2Shape_Create(*args):
+ """b2Shape_Create(b2ShapeDef def, b2BlockAllocator allocator) -> b2Shape"""
+ return _Box2D2.b2Shape_Create(*args)
+
+def b2Shape_Destroy(*args):
+ """b2Shape_Destroy(b2Shape shape, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Shape_Destroy(*args)
+
+class b2CircleDef(b2ShapeDef):
+ """Proxy of C++ b2CircleDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2CircleDef"""
+ this = _Box2D2.new_b2CircleDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_set
+ __swig_getmethods__["localPosition"] = _Box2D2.b2CircleDef_localPosition_get
+ if _newclass:localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
+ __swig_setmethods__["radius"] = _Box2D2.b2CircleDef_radius_set
+ __swig_getmethods__["radius"] = _Box2D2.b2CircleDef_radius_get
+ if _newclass:radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+ __del__ = lambda self : None;
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ """Proxy of C++ b2CircleShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2CircleShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2CircleShape, name)
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2CircleShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2CircleShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2CircleShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2CircleShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2CircleShape_ComputeMass(*args)
+
+ def GetLocalPosition(*args):
+ """GetLocalPosition(self) -> b2Vec2"""
+ return _Box2D2.b2CircleShape_GetLocalPosition(*args)
+
+ def GetRadius(*args):
+ """GetRadius(self) -> float32"""
+ return _Box2D2.b2CircleShape_GetRadius(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2ShapeDef def) -> b2CircleShape"""
+ this = _Box2D2.new_b2CircleShape(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2CircleShape_UpdateSweepRadius(*args)
+
+ __swig_setmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_set
+ __swig_getmethods__["m_localPosition"] = _Box2D2.b2CircleShape_m_localPosition_get
+ if _newclass:m_localPosition = _swig_property(_Box2D2.b2CircleShape_m_localPosition_get, _Box2D2.b2CircleShape_m_localPosition_set)
+ __swig_setmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_set
+ __swig_getmethods__["m_radius"] = _Box2D2.b2CircleShape_m_radius_get
+ if _newclass:m_radius = _swig_property(_Box2D2.b2CircleShape_m_radius_get, _Box2D2.b2CircleShape_m_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+ __del__ = lambda self : None;
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ """Proxy of C++ b2PolygonDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2ShapeDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PolygonDef"""
+ this = _Box2D2.new_b2PolygonDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def SetAsBox(*args):
+ """
+ SetAsBox(self, float32 hx, float32 hy)
+ SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
+ """
+ return _Box2D2.b2PolygonDef_SetAsBox(*args)
+
+ __swig_setmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_set
+ __swig_getmethods__["vertices"] = _Box2D2.b2PolygonDef_vertices_get
+ if _newclass:vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
+ __swig_setmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_set
+ __swig_getmethods__["vertexCount"] = _Box2D2.b2PolygonDef_vertexCount_get
+ if _newclass:vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonDef_getVertex(*args)
+
+ def setVertex(*args):
+ """setVertex(self, uint16 vnum, b2Vec2 value)"""
+ return _Box2D2.b2PolygonDef_setVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+ __del__ = lambda self : None;
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ """Proxy of C++ b2PolygonShape class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Shape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PolygonShape, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Shape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PolygonShape, name)
+ __repr__ = _swig_repr
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm transform, b2Vec2 p) -> bool"""
+ return _Box2D2.b2PolygonShape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm transform, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2PolygonShape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm transform)"""
+ return _Box2D2.b2PolygonShape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm transform1, b2XForm transform2)"""
+ return _Box2D2.b2PolygonShape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2PolygonShape_ComputeMass(*args)
+
+ def GetOBB(*args):
+ """GetOBB(self) -> b2OBB"""
+ return _Box2D2.b2PolygonShape_GetOBB(*args)
+
+ def GetCentroid(*args):
+ """GetCentroid(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCentroid(*args)
+
+ def GetVertexCount(*args):
+ """GetVertexCount(self) -> int32"""
+ return _Box2D2.b2PolygonShape_GetVertexCount(*args)
+
+ def GetVertices(*args):
+ """GetVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetVertices(*args)
+
+ def GetCoreVertices(*args):
+ """GetCoreVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2ShapeDef def) -> b2PolygonShape"""
+ this = _Box2D2.new_b2PolygonShape(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def UpdateSweepRadius(*args):
+ """UpdateSweepRadius(self, b2Vec2 center)"""
+ return _Box2D2.b2PolygonShape_UpdateSweepRadius(*args)
+
+ def GetFirstVertex(*args):
+ """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
+
+ def Centroid(*args):
+ """Centroid(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Centroid(*args)
+
+ def Support(*args):
+ """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Support(*args)
+
+ __swig_setmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_set
+ __swig_getmethods__["m_centroid"] = _Box2D2.b2PolygonShape_m_centroid_get
+ if _newclass:m_centroid = _swig_property(_Box2D2.b2PolygonShape_m_centroid_get, _Box2D2.b2PolygonShape_m_centroid_set)
+ __swig_setmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_set
+ __swig_getmethods__["m_obb"] = _Box2D2.b2PolygonShape_m_obb_get
+ if _newclass:m_obb = _swig_property(_Box2D2.b2PolygonShape_m_obb_get, _Box2D2.b2PolygonShape_m_obb_set)
+ __swig_setmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_set
+ __swig_getmethods__["m_vertices"] = _Box2D2.b2PolygonShape_m_vertices_get
+ if _newclass:m_vertices = _swig_property(_Box2D2.b2PolygonShape_m_vertices_get, _Box2D2.b2PolygonShape_m_vertices_set)
+ __swig_setmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_set
+ __swig_getmethods__["m_normals"] = _Box2D2.b2PolygonShape_m_normals_get
+ if _newclass:m_normals = _swig_property(_Box2D2.b2PolygonShape_m_normals_get, _Box2D2.b2PolygonShape_m_normals_set)
+ __swig_setmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_set
+ __swig_getmethods__["m_coreVertices"] = _Box2D2.b2PolygonShape_m_coreVertices_get
+ if _newclass:m_coreVertices = _swig_property(_Box2D2.b2PolygonShape_m_coreVertices_get, _Box2D2.b2PolygonShape_m_coreVertices_set)
+ __swig_setmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_set
+ __swig_getmethods__["m_vertexCount"] = _Box2D2.b2PolygonShape_m_vertexCount_get
+ if _newclass:m_vertexCount = _swig_property(_Box2D2.b2PolygonShape_m_vertexCount_get, _Box2D2.b2PolygonShape_m_vertexCount_set)
+ def __repr__(self):
+ return "b2PolygonShape()"
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_getVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+ __del__ = lambda self : None;
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair(_object):
+ """Proxy of C++ b2Pair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Pair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Pair, name)
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ def SetBuffered(*args):
+ """SetBuffered(self)"""
+ return _Box2D2.b2Pair_SetBuffered(*args)
+
+ def ClearBuffered(*args):
+ """ClearBuffered(self)"""
+ return _Box2D2.b2Pair_ClearBuffered(*args)
+
+ def IsBuffered(*args):
+ """IsBuffered(self) -> bool"""
+ return _Box2D2.b2Pair_IsBuffered(*args)
+
+ def SetRemoved(*args):
+ """SetRemoved(self)"""
+ return _Box2D2.b2Pair_SetRemoved(*args)
+
+ def ClearRemoved(*args):
+ """ClearRemoved(self)"""
+ return _Box2D2.b2Pair_ClearRemoved(*args)
+
+ def IsRemoved(*args):
+ """IsRemoved(self) -> bool"""
+ return _Box2D2.b2Pair_IsRemoved(*args)
+
+ def SetFinal(*args):
+ """SetFinal(self)"""
+ return _Box2D2.b2Pair_SetFinal(*args)
+
+ def IsFinal(*args):
+ """IsFinal(self) -> bool"""
+ return _Box2D2.b2Pair_IsFinal(*args)
+
+ __swig_setmethods__["userData"] = _Box2D2.b2Pair_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Pair_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2Pair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2Pair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
+ __swig_setmethods__["next"] = _Box2D2.b2Pair_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2Pair_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
+ __swig_setmethods__["status"] = _Box2D2.b2Pair_status_set
+ __swig_getmethods__["status"] = _Box2D2.b2Pair_status_get
+ if _newclass:status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Pair"""
+ this = _Box2D2.new_b2Pair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+ __del__ = lambda self : None;
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair(_object):
+ """Proxy of C++ b2BufferedPair class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BufferedPair, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BufferedPair, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_set
+ __swig_getmethods__["proxyId1"] = _Box2D2.b2BufferedPair_proxyId1_get
+ if _newclass:proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
+ __swig_setmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_set
+ __swig_getmethods__["proxyId2"] = _Box2D2.b2BufferedPair_proxyId2_get
+ if _newclass:proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2BufferedPair"""
+ this = _Box2D2.new_b2BufferedPair(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+ __del__ = lambda self : None;
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback(_object):
+ """Proxy of C++ b2PairCallback class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairCallback, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairCallback, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+ __del__ = lambda self : None;
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2PairCallback_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2PairCallback_PairRemoved(*args)
+
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager(_object):
+ """Proxy of C++ b2PairManager class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PairManager, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PairManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PairManager"""
+ this = _Box2D2.new_b2PairManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
+ return _Box2D2.b2PairManager_Initialize(*args)
+
+ def AddBufferedPair(*args):
+ """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_AddBufferedPair(*args)
+
+ def RemoveBufferedPair(*args):
+ """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2PairManager_Commit(*args)
+
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2PairManager_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
+ __swig_setmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_set
+ __swig_getmethods__["m_callback"] = _Box2D2.b2PairManager_m_callback_get
+ if _newclass:m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
+ __swig_setmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_set
+ __swig_getmethods__["m_pairs"] = _Box2D2.b2PairManager_m_pairs_get
+ if _newclass:m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
+ __swig_setmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_set
+ __swig_getmethods__["m_freePair"] = _Box2D2.b2PairManager_m_freePair_get
+ if _newclass:m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
+ __swig_setmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_set
+ __swig_getmethods__["m_pairCount"] = _Box2D2.b2PairManager_m_pairCount_get
+ if _newclass:m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
+ __swig_setmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_set
+ __swig_getmethods__["m_pairBuffer"] = _Box2D2.b2PairManager_m_pairBuffer_get
+ if _newclass:m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
+ __swig_setmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_set
+ __swig_getmethods__["m_pairBufferCount"] = _Box2D2.b2PairManager_m_pairBufferCount_get
+ if _newclass:m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
+ __swig_setmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_set
+ __swig_getmethods__["m_hashTable"] = _Box2D2.b2PairManager_m_hashTable_get
+ if _newclass:m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+ __del__ = lambda self : None;
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound(_object):
+ """Proxy of C++ b2Bound class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Bound, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Bound, name)
+ __repr__ = _swig_repr
+ def IsLower(*args):
+ """IsLower(self) -> bool"""
+ return _Box2D2.b2Bound_IsLower(*args)
+
+ def IsUpper(*args):
+ """IsUpper(self) -> bool"""
+ return _Box2D2.b2Bound_IsUpper(*args)
+
+ __swig_setmethods__["value"] = _Box2D2.b2Bound_value_set
+ __swig_getmethods__["value"] = _Box2D2.b2Bound_value_get
+ if _newclass:value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
+ __swig_setmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_set
+ __swig_getmethods__["proxyId"] = _Box2D2.b2Bound_proxyId_get
+ if _newclass:proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
+ __swig_setmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_set
+ __swig_getmethods__["stabbingCount"] = _Box2D2.b2Bound_stabbingCount_get
+ if _newclass:stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Bound"""
+ this = _Box2D2.new_b2Bound(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+ __del__ = lambda self : None;
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy(_object):
+ """Proxy of C++ b2Proxy class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Proxy, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Proxy, name)
+ __repr__ = _swig_repr
+ def GetNext(*args):
+ """GetNext(self) -> uint16"""
+ return _Box2D2.b2Proxy_GetNext(*args)
+
+ def SetNext(*args):
+ """SetNext(self, uint16 next)"""
+ return _Box2D2.b2Proxy_SetNext(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Proxy_IsValid(*args)
+
+ __swig_setmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_set
+ __swig_getmethods__["lowerBounds"] = _Box2D2.b2Proxy_lowerBounds_get
+ if _newclass:lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
+ __swig_setmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_set
+ __swig_getmethods__["upperBounds"] = _Box2D2.b2Proxy_upperBounds_get
+ if _newclass:upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
+ __swig_setmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_set
+ __swig_getmethods__["overlapCount"] = _Box2D2.b2Proxy_overlapCount_get
+ if _newclass:overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
+ __swig_setmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_set
+ __swig_getmethods__["timeStamp"] = _Box2D2.b2Proxy_timeStamp_get
+ if _newclass:timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2Proxy_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2Proxy_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Proxy"""
+ this = _Box2D2.new_b2Proxy(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+ __del__ = lambda self : None;
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase(_object):
+ """Proxy of C++ b2BroadPhase class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BroadPhase, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BroadPhase, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
+ this = _Box2D2.new_b2BroadPhase(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ __del__ = lambda self : None;
+ def InRange(*args):
+ """InRange(self, b2AABB aabb) -> bool"""
+ return _Box2D2.b2BroadPhase_InRange(*args)
+
+ def CreateProxy(*args):
+ """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
+ return _Box2D2.b2BroadPhase_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, int32 proxyId)"""
+ return _Box2D2.b2BroadPhase_DestroyProxy(*args)
+
+ def MoveProxy(*args):
+ """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
+ return _Box2D2.b2BroadPhase_MoveProxy(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2BroadPhase_Commit(*args)
+
+ def GetProxy(*args):
+ """GetProxy(self, int32 proxyId) -> b2Proxy"""
+ return _Box2D2.b2BroadPhase_GetProxy(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
+ return _Box2D2.b2BroadPhase_Query(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2BroadPhase_Validate(*args)
+
+ def ValidatePairs(*args):
+ """ValidatePairs(self)"""
+ return _Box2D2.b2BroadPhase_ValidatePairs(*args)
+
+ __swig_setmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_set
+ __swig_getmethods__["m_pairManager"] = _Box2D2.b2BroadPhase_m_pairManager_get
+ if _newclass:m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
+ __swig_setmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_set
+ __swig_getmethods__["m_proxyPool"] = _Box2D2.b2BroadPhase_m_proxyPool_get
+ if _newclass:m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
+ __swig_setmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_set
+ __swig_getmethods__["m_freeProxy"] = _Box2D2.b2BroadPhase_m_freeProxy_get
+ if _newclass:m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
+ __swig_setmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_set
+ __swig_getmethods__["m_bounds"] = _Box2D2.b2BroadPhase_m_bounds_get
+ if _newclass:m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
+ __swig_setmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_set
+ __swig_getmethods__["m_queryResults"] = _Box2D2.b2BroadPhase_m_queryResults_get
+ if _newclass:m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
+ __swig_setmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_set
+ __swig_getmethods__["m_queryResultCount"] = _Box2D2.b2BroadPhase_m_queryResultCount_get
+ if _newclass:m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
+ __swig_setmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_set
+ __swig_getmethods__["m_worldAABB"] = _Box2D2.b2BroadPhase_m_worldAABB_get
+ if _newclass:m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
+ __swig_setmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_set
+ __swig_getmethods__["m_quantizationFactor"] = _Box2D2.b2BroadPhase_m_quantizationFactor_get
+ if _newclass:m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
+ __swig_setmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_set
+ __swig_getmethods__["m_proxyCount"] = _Box2D2.b2BroadPhase_m_proxyCount_get
+ if _newclass:m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
+ __swig_setmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_set
+ __swig_getmethods__["m_timeStamp"] = _Box2D2.b2BroadPhase_m_timeStamp_get
+ if _newclass:m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
+ __swig_setmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_set
+ __swig_getmethods__["s_validate"] = _Box2D2.b2BroadPhase_s_validate_get
+ if _newclass:s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener(_object):
+ """Proxy of C++ b2DestructionListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DestructionListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DestructionListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+ __del__ = lambda self : None;
+ def SayGoodbye(*args):
+ """
+ SayGoodbye(self, b2Joint joint)
+ SayGoodbye(self, b2Shape shape)
+ """
+ return _Box2D2.b2DestructionListener_SayGoodbye(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2DestructionListener"""
+ if self.__class__ == b2DestructionListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DestructionListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DestructionListener(self)
+ return weakref_proxy(self)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener(_object):
+ """Proxy of C++ b2BoundaryListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BoundaryListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BoundaryListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+ __del__ = lambda self : None;
+ def Violation(*args):
+ """Violation(self, b2Body body)"""
+ return _Box2D2.b2BoundaryListener_Violation(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2BoundaryListener"""
+ if self.__class__ == b2BoundaryListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2BoundaryListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2BoundaryListener(self)
+ return weakref_proxy(self)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter(_object):
+ """Proxy of C++ b2ContactFilter class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactFilter, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactFilter, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ __del__ = lambda self : None;
+ def ShouldCollide(*args):
+ """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
+ return _Box2D2.b2ContactFilter_ShouldCollide(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactFilter"""
+ this = _Box2D2.new_b2ContactFilter(*args)
+ try: self.this.append(this)
+ except: self.this = this
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener(_object):
+ """Proxy of C++ b2ContactListener class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactListener, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactListener, name)
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+ __del__ = lambda self : None;
+ def Add(*args):
+ """Add(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Add(*args)
+
+ def Persist(*args):
+ """Persist(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Persist(*args)
+
+ def Remove(*args):
+ """Remove(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Remove(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactListener"""
+ if self.__class__ == b2ContactListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2ContactListener(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2ContactListener(self)
+ return weakref_proxy(self)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color(_object):
+ """Proxy of C++ b2Color class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Color, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Color, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Color
+ __init__(self, float32 r, float32 g, float32 b) -> b2Color
+ """
+ this = _Box2D2.new_b2Color(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["r"] = _Box2D2.b2Color_r_set
+ __swig_getmethods__["r"] = _Box2D2.b2Color_r_get
+ if _newclass:r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
+ __swig_setmethods__["g"] = _Box2D2.b2Color_g_set
+ __swig_getmethods__["g"] = _Box2D2.b2Color_g_get
+ if _newclass:g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
+ __swig_setmethods__["b"] = _Box2D2.b2Color_b_set
+ __swig_getmethods__["b"] = _Box2D2.b2Color_b_get
+ if _newclass:b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
+ __swig_destroy__ = _Box2D2.delete_b2Color
+ __del__ = lambda self : None;
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw(_object):
+ """Proxy of C++ b2DebugDraw class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DebugDraw, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DebugDraw, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DebugDraw"""
+ if self.__class__ == b2DebugDraw:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ this = _Box2D2.new_b2DebugDraw(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ __del__ = lambda self : None;
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+ def SetFlags(*args):
+ """SetFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_SetFlags(*args)
+
+ def GetFlags(*args):
+ """GetFlags(self) -> uint32"""
+ return _Box2D2.b2DebugDraw_GetFlags(*args)
+
+ def AppendFlags(*args):
+ """AppendFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_AppendFlags(*args)
+
+ def ClearFlags(*args):
+ """ClearFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_ClearFlags(*args)
+
+ def DrawPolygon(*args):
+ """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawPolygon(*args)
+
+ def DrawSolidPolygon(*args):
+ """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
+
+ def DrawCircle(*args):
+ """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawCircle(*args)
+
+ def DrawSolidCircle(*args):
+ """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
+
+ def DrawSegment(*args):
+ """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSegment(*args)
+
+ def DrawXForm(*args):
+ """DrawXForm(self, b2XForm xf)"""
+ return _Box2D2.b2DebugDraw_DrawXForm(*args)
+
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DebugDraw(self)
+ return weakref_proxy(self)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator(_object):
+ """Proxy of C++ b2BlockAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BlockAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BlockAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BlockAllocator"""
+ this = _Box2D2.new_b2BlockAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2BlockAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p, int32 size)"""
+ return _Box2D2.b2BlockAllocator_Free(*args)
+
+ def Clear(*args):
+ """Clear(self)"""
+ return _Box2D2.b2BlockAllocator_Clear(*args)
+
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry(_object):
+ """Proxy of C++ b2StackEntry class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackEntry, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackEntry, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["data"] = _Box2D2.b2StackEntry_data_set
+ __swig_getmethods__["data"] = _Box2D2.b2StackEntry_data_get
+ if _newclass:data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
+ __swig_setmethods__["size"] = _Box2D2.b2StackEntry_size_set
+ __swig_getmethods__["size"] = _Box2D2.b2StackEntry_size_get
+ if _newclass:size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
+ __swig_setmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_set
+ __swig_getmethods__["usedMalloc"] = _Box2D2.b2StackEntry_usedMalloc_get
+ if _newclass:usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2StackEntry"""
+ this = _Box2D2.new_b2StackEntry(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+ __del__ = lambda self : None;
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator(_object):
+ """Proxy of C++ b2StackAllocator class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2StackAllocator, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2StackAllocator, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2StackAllocator"""
+ this = _Box2D2.new_b2StackAllocator(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+ __del__ = lambda self : None;
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2StackAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p)"""
+ return _Box2D2.b2StackAllocator_Free(*args)
+
+ def GetMaxAllocation(*args):
+ """GetMaxAllocation(self) -> int32"""
+ return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
+
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister(_object):
+ """Proxy of C++ b2ContactRegister class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactRegister, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactRegister, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_set
+ __swig_getmethods__["createFcn"] = _Box2D2.b2ContactRegister_createFcn_get
+ if _newclass:createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
+ __swig_setmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_set
+ __swig_getmethods__["destroyFcn"] = _Box2D2.b2ContactRegister_destroyFcn_get
+ if _newclass:destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
+ __swig_setmethods__["primary"] = _Box2D2.b2ContactRegister_primary_set
+ __swig_getmethods__["primary"] = _Box2D2.b2ContactRegister_primary_get
+ if _newclass:primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactRegister"""
+ this = _Box2D2.new_b2ContactRegister(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+ __del__ = lambda self : None;
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge(_object):
+ """Proxy of C++ b2ContactEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2ContactEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2ContactEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
+ __swig_setmethods__["contact"] = _Box2D2.b2ContactEdge_contact_set
+ __swig_getmethods__["contact"] = _Box2D2.b2ContactEdge_contact_get
+ if _newclass:contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2ContactEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2ContactEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2ContactEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2ContactEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactEdge"""
+ this = _Box2D2.new_b2ContactEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+ __del__ = lambda self : None;
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint(_object):
+ """Proxy of C++ b2ContactPoint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactPoint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactPoint, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_set
+ __swig_getmethods__["shape1"] = _Box2D2.b2ContactPoint_shape1_get
+ if _newclass:shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
+ __swig_setmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_set
+ __swig_getmethods__["shape2"] = _Box2D2.b2ContactPoint_shape2_get
+ if _newclass:shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
+ __swig_setmethods__["position"] = _Box2D2.b2ContactPoint_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2ContactPoint_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
+ __swig_setmethods__["normal"] = _Box2D2.b2ContactPoint_normal_set
+ __swig_getmethods__["normal"] = _Box2D2.b2ContactPoint_normal_get
+ if _newclass:normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
+ __swig_setmethods__["separation"] = _Box2D2.b2ContactPoint_separation_set
+ __swig_getmethods__["separation"] = _Box2D2.b2ContactPoint_separation_get
+ if _newclass:separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
+ __swig_setmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_set
+ __swig_getmethods__["normalForce"] = _Box2D2.b2ContactPoint_normalForce_get
+ if _newclass:normalForce = _swig_property(_Box2D2.b2ContactPoint_normalForce_get, _Box2D2.b2ContactPoint_normalForce_set)
+ __swig_setmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_set
+ __swig_getmethods__["tangentForce"] = _Box2D2.b2ContactPoint_tangentForce_get
+ if _newclass:tangentForce = _swig_property(_Box2D2.b2ContactPoint_tangentForce_get, _Box2D2.b2ContactPoint_tangentForce_set)
+ __swig_setmethods__["id"] = _Box2D2.b2ContactPoint_id_set
+ __swig_getmethods__["id"] = _Box2D2.b2ContactPoint_id_get
+ if _newclass:id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
+ def __repr__(self):
+ return "b2ContactPoint(\n\tShape1: %s\n\tShape2:%s\n\tPosition: %s\n\tNormal: %s)" % (self.shape1, self.shape2, self.position, self.normal)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactPoint"""
+ this = _Box2D2.new_b2ContactPoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+ __del__ = lambda self : None;
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2Contact(_object):
+ """Proxy of C++ b2Contact class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Contact, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Contact, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2Contact_GetManifolds(*args)
+
+ def GetManifoldCount(*args):
+ """GetManifoldCount(self) -> int32"""
+ return _Box2D2.b2Contact_GetManifoldCount(*args)
+
+ def IsSolid(*args):
+ """IsSolid(self) -> bool"""
+ return _Box2D2.b2Contact_IsSolid(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Contact"""
+ return _Box2D2.b2Contact_GetNext(*args)
+
+ def GetShape1(*args):
+ """GetShape1(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape1(*args)
+
+ def GetShape2(*args):
+ """GetShape2(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape2(*args)
+
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ def AddType(*args):
+ """
+ AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+ if _newclass:AddType = staticmethod(AddType)
+ __swig_getmethods__["AddType"] = lambda x: AddType
+ def InitializeRegisters(*args):
+ """InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+ if _newclass:InitializeRegisters = staticmethod(InitializeRegisters)
+ __swig_getmethods__["InitializeRegisters"] = lambda x: InitializeRegisters
+ def Create(*args):
+ """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ __del__ = lambda self : None;
+ def Update(*args):
+ """Update(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Update(*args)
+
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Evaluate(*args)
+
+ __swig_setmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_set
+ __swig_getmethods__["s_registers"] = _Box2D2.b2Contact_s_registers_get
+ if _newclass:s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
+ __swig_setmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_set
+ __swig_getmethods__["s_initialized"] = _Box2D2.b2Contact_s_initialized_get
+ if _newclass:s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Contact_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
+ __swig_setmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_set
+ __swig_getmethods__["m_manifoldCount"] = _Box2D2.b2Contact_m_manifoldCount_get
+ if _newclass:m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Contact_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Contact_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Contact_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Contact_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Contact_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
+ __swig_setmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_set
+ __swig_getmethods__["m_shape1"] = _Box2D2.b2Contact_m_shape1_get
+ if _newclass:m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
+ __swig_setmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_set
+ __swig_getmethods__["m_shape2"] = _Box2D2.b2Contact_m_shape2_get
+ if _newclass:m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
+ __swig_setmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_set
+ __swig_getmethods__["m_friction"] = _Box2D2.b2Contact_m_friction_get
+ if _newclass:m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
+ __swig_setmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_set
+ __swig_getmethods__["m_restitution"] = _Box2D2.b2Contact_m_restitution_get
+ if _newclass:m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
+ __swig_setmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_set
+ __swig_getmethods__["m_toi"] = _Box2D2.b2Contact_m_toi_get
+ if _newclass:m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+
+def b2Contact_AddType(*args):
+ """
+ b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+def b2Contact_InitializeRegisters(*args):
+ """b2Contact_InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+def b2Contact_Create(*args):
+ """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+def b2Contact_Destroy(*args):
+ """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+class b2NullContact(b2Contact):
+ """Proxy of C++ b2NullContact class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Contact]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2NullContact, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Contact]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2NullContact, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2NullContact"""
+ this = _Box2D2.new_b2NullContact(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener ?)"""
+ return _Box2D2.b2NullContact_Evaluate(*args)
+
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2NullContact_GetManifolds(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+ __del__ = lambda self : None;
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ """Proxy of C++ b2ContactManager class"""
+ __swig_setmethods__ = {}
+ for _s in [b2PairCallback]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2ContactManager, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2PairCallback]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2ContactManager, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactManager"""
+ this = _Box2D2.new_b2ContactManager(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2ContactManager_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2ContactManager_PairRemoved(*args)
+
+ def Destroy(*args):
+ """Destroy(self, b2Contact c)"""
+ return _Box2D2.b2ContactManager_Destroy(*args)
+
+ def Collide(*args):
+ """Collide(self)"""
+ return _Box2D2.b2ContactManager_Collide(*args)
+
+ __swig_setmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2ContactManager_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
+ __swig_setmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_set
+ __swig_getmethods__["m_nullContact"] = _Box2D2.b2ContactManager_m_nullContact_get
+ if _newclass:m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
+ __swig_setmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_set
+ __swig_getmethods__["m_destroyImmediate"] = _Box2D2.b2ContactManager_m_destroyImmediate_get
+ if _newclass:m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+ __del__ = lambda self : None;
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep(_object):
+ """Proxy of C++ b2TimeStep class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2TimeStep, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2TimeStep, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["dt"] = _Box2D2.b2TimeStep_dt_set
+ __swig_getmethods__["dt"] = _Box2D2.b2TimeStep_dt_get
+ if _newclass:dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
+ __swig_setmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_set
+ __swig_getmethods__["inv_dt"] = _Box2D2.b2TimeStep_inv_dt_get
+ if _newclass:inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
+ __swig_setmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_set
+ __swig_getmethods__["maxIterations"] = _Box2D2.b2TimeStep_maxIterations_get
+ if _newclass:maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2TimeStep"""
+ this = _Box2D2.new_b2TimeStep(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+ __del__ = lambda self : None;
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World(_object):
+ """Proxy of C++ b2World class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2World, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2World, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
+ this = _Box2D2.new_b2World(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2World
+ __del__ = lambda self : None;
+ def SetFilter(*args):
+ """SetFilter(self, b2ContactFilter filter)"""
+ return _Box2D2.b2World_SetFilter(*args)
+
+ def SetListener(*args):
+ """
+ SetListener(self, b2DestructionListener listener)
+ SetListener(self, b2BoundaryListener listener)
+ SetListener(self, b2ContactListener listener)
+ """
+ return _Box2D2.b2World_SetListener(*args)
+
+ def SetDebugDraw(*args):
+ """SetDebugDraw(self, b2DebugDraw debugDraw)"""
+ return _Box2D2.b2World_SetDebugDraw(*args)
+
+ def CreateStaticBody(*args):
+ """CreateStaticBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateStaticBody(*args)
+
+ def CreateDynamicBody(*args):
+ """CreateDynamicBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateDynamicBody(*args)
+
+ def DestroyBody(*args):
+ """DestroyBody(self, b2Body body)"""
+ return _Box2D2.b2World_DestroyBody(*args)
+
+ def CreateJoint(*args):
+ """CreateJoint(self, b2JointDef def) -> b2Joint"""
+ return _Box2D2.b2World_CreateJoint(*args)
+
+ def DestroyJoint(*args):
+ """DestroyJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DestroyJoint(*args)
+
+ def GetGroundBody(*args):
+ """GetGroundBody(self) -> b2Body"""
+ return _Box2D2.b2World_GetGroundBody(*args)
+
+ def Step(*args):
+ """Step(self, float32 timeStep, int32 iterations)"""
+ return _Box2D2.b2World_Step(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32"""
+ return _Box2D2.b2World_Query(*args)
+
+ def GetBodyList(*args):
+ """GetBodyList(self) -> b2Body"""
+ return _Box2D2.b2World_GetBodyList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2Joint"""
+ return _Box2D2.b2World_GetJointList(*args)
+
+ def SetGravity(*args):
+ """SetGravity(self, b2Vec2 g)"""
+ return _Box2D2.b2World_SetGravity(*args)
+
+ def Solve(*args):
+ """Solve(self, b2TimeStep step)"""
+ return _Box2D2.b2World_Solve(*args)
+
+ def SolveTOI(*args):
+ """SolveTOI(self, b2TimeStep step)"""
+ return _Box2D2.b2World_SolveTOI(*args)
+
+ def DrawJoint(*args):
+ """DrawJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DrawJoint(*args)
+
+ def DrawShape(*args):
+ """DrawShape(self, b2Shape shape, b2XForm xf, b2Color color, bool core)"""
+ return _Box2D2.b2World_DrawShape(*args)
+
+ def DrawDebugData(*args):
+ """DrawDebugData(self)"""
+ return _Box2D2.b2World_DrawDebugData(*args)
+
+ __swig_setmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_set
+ __swig_getmethods__["m_blockAllocator"] = _Box2D2.b2World_m_blockAllocator_get
+ if _newclass:m_blockAllocator = _swig_property(_Box2D2.b2World_m_blockAllocator_get, _Box2D2.b2World_m_blockAllocator_set)
+ __swig_setmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_set
+ __swig_getmethods__["m_stackAllocator"] = _Box2D2.b2World_m_stackAllocator_get
+ if _newclass:m_stackAllocator = _swig_property(_Box2D2.b2World_m_stackAllocator_get, _Box2D2.b2World_m_stackAllocator_set)
+ __swig_setmethods__["m_lock"] = _Box2D2.b2World_m_lock_set
+ __swig_getmethods__["m_lock"] = _Box2D2.b2World_m_lock_get
+ if _newclass:m_lock = _swig_property(_Box2D2.b2World_m_lock_get, _Box2D2.b2World_m_lock_set)
+ __swig_setmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_set
+ __swig_getmethods__["m_broadPhase"] = _Box2D2.b2World_m_broadPhase_get
+ if _newclass:m_broadPhase = _swig_property(_Box2D2.b2World_m_broadPhase_get, _Box2D2.b2World_m_broadPhase_set)
+ __swig_setmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_set
+ __swig_getmethods__["m_contactManager"] = _Box2D2.b2World_m_contactManager_get
+ if _newclass:m_contactManager = _swig_property(_Box2D2.b2World_m_contactManager_get, _Box2D2.b2World_m_contactManager_set)
+ __swig_setmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_set
+ __swig_getmethods__["m_bodyList"] = _Box2D2.b2World_m_bodyList_get
+ if _newclass:m_bodyList = _swig_property(_Box2D2.b2World_m_bodyList_get, _Box2D2.b2World_m_bodyList_set)
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2World_m_jointList_get
+ if _newclass:m_jointList = _swig_property(_Box2D2.b2World_m_jointList_get, _Box2D2.b2World_m_jointList_set)
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2World_m_contactList_get
+ if _newclass:m_contactList = _swig_property(_Box2D2.b2World_m_contactList_get, _Box2D2.b2World_m_contactList_set)
+ __swig_setmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_set
+ __swig_getmethods__["m_bodyCount"] = _Box2D2.b2World_m_bodyCount_get
+ if _newclass:m_bodyCount = _swig_property(_Box2D2.b2World_m_bodyCount_get, _Box2D2.b2World_m_bodyCount_set)
+ __swig_setmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_set
+ __swig_getmethods__["m_contactCount"] = _Box2D2.b2World_m_contactCount_get
+ if _newclass:m_contactCount = _swig_property(_Box2D2.b2World_m_contactCount_get, _Box2D2.b2World_m_contactCount_set)
+ __swig_setmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_set
+ __swig_getmethods__["m_jointCount"] = _Box2D2.b2World_m_jointCount_get
+ if _newclass:m_jointCount = _swig_property(_Box2D2.b2World_m_jointCount_get, _Box2D2.b2World_m_jointCount_set)
+ __swig_setmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_set
+ __swig_getmethods__["m_gravity"] = _Box2D2.b2World_m_gravity_get
+ if _newclass:m_gravity = _swig_property(_Box2D2.b2World_m_gravity_get, _Box2D2.b2World_m_gravity_set)
+ __swig_setmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_set
+ __swig_getmethods__["m_allowSleep"] = _Box2D2.b2World_m_allowSleep_get
+ if _newclass:m_allowSleep = _swig_property(_Box2D2.b2World_m_allowSleep_get, _Box2D2.b2World_m_allowSleep_set)
+ __swig_setmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_set
+ __swig_getmethods__["m_groundBody"] = _Box2D2.b2World_m_groundBody_get
+ if _newclass:m_groundBody = _swig_property(_Box2D2.b2World_m_groundBody_get, _Box2D2.b2World_m_groundBody_set)
+ __swig_setmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_set
+ __swig_getmethods__["m_destructionListener"] = _Box2D2.b2World_m_destructionListener_get
+ if _newclass:m_destructionListener = _swig_property(_Box2D2.b2World_m_destructionListener_get, _Box2D2.b2World_m_destructionListener_set)
+ __swig_setmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_set
+ __swig_getmethods__["m_boundaryListener"] = _Box2D2.b2World_m_boundaryListener_get
+ if _newclass:m_boundaryListener = _swig_property(_Box2D2.b2World_m_boundaryListener_get, _Box2D2.b2World_m_boundaryListener_set)
+ __swig_setmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_set
+ __swig_getmethods__["m_contactFilter"] = _Box2D2.b2World_m_contactFilter_get
+ if _newclass:m_contactFilter = _swig_property(_Box2D2.b2World_m_contactFilter_get, _Box2D2.b2World_m_contactFilter_set)
+ __swig_setmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_set
+ __swig_getmethods__["m_contactListener"] = _Box2D2.b2World_m_contactListener_get
+ if _newclass:m_contactListener = _swig_property(_Box2D2.b2World_m_contactListener_get, _Box2D2.b2World_m_contactListener_set)
+ __swig_setmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_set
+ __swig_getmethods__["m_debugDraw"] = _Box2D2.b2World_m_debugDraw_get
+ if _newclass:m_debugDraw = _swig_property(_Box2D2.b2World_m_debugDraw_get, _Box2D2.b2World_m_debugDraw_set)
+ __swig_setmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_set
+ __swig_getmethods__["m_positionIterationCount"] = _Box2D2.b2World_m_positionIterationCount_get
+ if _newclass:m_positionIterationCount = _swig_property(_Box2D2.b2World_m_positionIterationCount_get, _Box2D2.b2World_m_positionIterationCount_set)
+ __swig_setmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_set
+ __swig_getmethods__["s_enablePositionCorrection"] = _Box2D2.b2World_s_enablePositionCorrection_get
+ if _newclass:s_enablePositionCorrection = _swig_property(_Box2D2.b2World_s_enablePositionCorrection_get, _Box2D2.b2World_s_enablePositionCorrection_set)
+ __swig_setmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_set
+ __swig_getmethods__["s_enableWarmStarting"] = _Box2D2.b2World_s_enableWarmStarting_get
+ if _newclass:s_enableWarmStarting = _swig_property(_Box2D2.b2World_s_enableWarmStarting_get, _Box2D2.b2World_s_enableWarmStarting_set)
+ __swig_setmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_set
+ __swig_getmethods__["s_enableTOI"] = _Box2D2.b2World_s_enableTOI_get
+ if _newclass:s_enableTOI = _swig_property(_Box2D2.b2World_s_enableTOI_get, _Box2D2.b2World_s_enableTOI_set)
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian(_object):
+ """Proxy of C++ b2Jacobian class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Jacobian, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Jacobian, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_set
+ __swig_getmethods__["linear1"] = _Box2D2.b2Jacobian_linear1_get
+ if _newclass:linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
+ __swig_setmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_set
+ __swig_getmethods__["angular1"] = _Box2D2.b2Jacobian_angular1_get
+ if _newclass:angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
+ __swig_setmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_set
+ __swig_getmethods__["linear2"] = _Box2D2.b2Jacobian_linear2_get
+ if _newclass:linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
+ __swig_setmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_set
+ __swig_getmethods__["angular2"] = _Box2D2.b2Jacobian_angular2_get
+ if _newclass:angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Jacobian_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
+ return _Box2D2.b2Jacobian_Set(*args)
+
+ def Compute(*args):
+ """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
+ return _Box2D2.b2Jacobian_Compute(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2Jacobian"""
+ this = _Box2D2.new_b2Jacobian(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+ __del__ = lambda self : None;
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge(_object):
+ """Proxy of C++ b2JointEdge class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointEdge, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointEdge, name)
+ __repr__ = _swig_repr
+ __swig_setmethods__["other"] = _Box2D2.b2JointEdge_other_set
+ __swig_getmethods__["other"] = _Box2D2.b2JointEdge_other_get
+ if _newclass:other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
+ __swig_setmethods__["joint"] = _Box2D2.b2JointEdge_joint_set
+ __swig_getmethods__["joint"] = _Box2D2.b2JointEdge_joint_get
+ if _newclass:joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
+ __swig_setmethods__["prev"] = _Box2D2.b2JointEdge_prev_set
+ __swig_getmethods__["prev"] = _Box2D2.b2JointEdge_prev_get
+ if _newclass:prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
+ __swig_setmethods__["next"] = _Box2D2.b2JointEdge_next_set
+ __swig_getmethods__["next"] = _Box2D2.b2JointEdge_next_get
+ if _newclass:next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2JointEdge"""
+ this = _Box2D2.new_b2JointEdge(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+ __del__ = lambda self : None;
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef(_object):
+ """Proxy of C++ b2JointDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2JointDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2JointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2JointDef"""
+ this = _Box2D2.new_b2JointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["type"] = _Box2D2.b2JointDef_type_set
+ __swig_getmethods__["type"] = _Box2D2.b2JointDef_type_get
+ if _newclass:type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2JointDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2JointDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
+ __swig_setmethods__["body1"] = _Box2D2.b2JointDef_body1_set
+ __swig_getmethods__["body1"] = _Box2D2.b2JointDef_body1_get
+ if _newclass:body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
+ __swig_setmethods__["body2"] = _Box2D2.b2JointDef_body2_set
+ __swig_getmethods__["body2"] = _Box2D2.b2JointDef_body2_get
+ if _newclass:body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
+ __swig_setmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_set
+ __swig_getmethods__["collideConnected"] = _Box2D2.b2JointDef_collideConnected_get
+ if _newclass:collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+ __del__ = lambda self : None;
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint(_object):
+ """Proxy of C++ b2Joint class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Joint, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Joint, name)
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> int"""
+ return _Box2D2.b2Joint_GetType(*args)
+
+ def GetBody1(*args):
+ """GetBody1(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody1(*args)
+
+ def GetBody2(*args):
+ """GetBody2(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody2(*args)
+
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2Joint_GetReactionTorque(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Joint"""
+ return _Box2D2.b2Joint_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Joint_GetUserData(*args)
+
+ def Create(*args):
+ """Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
+ return _Box2D2.b2Joint_Create(*args)
+
+ if _newclass:Create = staticmethod(Create)
+ __swig_getmethods__["Create"] = lambda x: Create
+ def Destroy(*args):
+ """Destroy(b2Joint joint, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Joint_Destroy(*args)
+
+ if _newclass:Destroy = staticmethod(Destroy)
+ __swig_getmethods__["Destroy"] = lambda x: Destroy
+ __swig_destroy__ = _Box2D2.delete_b2Joint
+ __del__ = lambda self : None;
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2Joint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2Joint_SolveVelocityConstraints(*args)
+
+ def InitPositionConstraints(*args):
+ """InitPositionConstraints(self)"""
+ return _Box2D2.b2Joint_InitPositionConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2Joint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_type"] = _Box2D2.b2Joint_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Joint_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Joint_m_type_get, _Box2D2.b2Joint_m_type_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Joint_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Joint_m_prev_get, _Box2D2.b2Joint_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Joint_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Joint_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Joint_m_next_get, _Box2D2.b2Joint_m_next_set)
+ __swig_setmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_set
+ __swig_getmethods__["m_node1"] = _Box2D2.b2Joint_m_node1_get
+ if _newclass:m_node1 = _swig_property(_Box2D2.b2Joint_m_node1_get, _Box2D2.b2Joint_m_node1_set)
+ __swig_setmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_set
+ __swig_getmethods__["m_node2"] = _Box2D2.b2Joint_m_node2_get
+ if _newclass:m_node2 = _swig_property(_Box2D2.b2Joint_m_node2_get, _Box2D2.b2Joint_m_node2_set)
+ __swig_setmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_set
+ __swig_getmethods__["m_body1"] = _Box2D2.b2Joint_m_body1_get
+ if _newclass:m_body1 = _swig_property(_Box2D2.b2Joint_m_body1_get, _Box2D2.b2Joint_m_body1_set)
+ __swig_setmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_set
+ __swig_getmethods__["m_body2"] = _Box2D2.b2Joint_m_body2_get
+ if _newclass:m_body2 = _swig_property(_Box2D2.b2Joint_m_body2_get, _Box2D2.b2Joint_m_body2_set)
+ __swig_setmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_set
+ __swig_getmethods__["m_islandFlag"] = _Box2D2.b2Joint_m_islandFlag_get
+ if _newclass:m_islandFlag = _swig_property(_Box2D2.b2Joint_m_islandFlag_get, _Box2D2.b2Joint_m_islandFlag_set)
+ __swig_setmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_set
+ __swig_getmethods__["m_collideConnected"] = _Box2D2.b2Joint_m_collideConnected_get
+ if _newclass:m_collideConnected = _swig_property(_Box2D2.b2Joint_m_collideConnected_get, _Box2D2.b2Joint_m_collideConnected_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Joint_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Joint_m_userData_get, _Box2D2.b2Joint_m_userData_set)
+ def __repr__(self):
+ return "b2Joint(body1: %s body2: %s)" % (self.body1, self.body2)
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the joint"""
+ return (getattr(self, "as%sJoint" % self.typeName())) ()
+
+ def asMouseJoint(*args):
+ """asMouseJoint(self) -> b2MouseJoint"""
+ return _Box2D2.b2Joint_asMouseJoint(*args)
+
+ def asGearJoint(*args):
+ """asGearJoint(self) -> b2GearJoint"""
+ return _Box2D2.b2Joint_asGearJoint(*args)
+
+ def asDistanceJoint(*args):
+ """asDistanceJoint(self) -> b2DistanceJoint"""
+ return _Box2D2.b2Joint_asDistanceJoint(*args)
+
+ def asPrismaticJoint(*args):
+ """asPrismaticJoint(self) -> b2PrismaticJoint"""
+ return _Box2D2.b2Joint_asPrismaticJoint(*args)
+
+ def asPulleyJoint(*args):
+ """asPulleyJoint(self) -> b2PulleyJoint"""
+ return _Box2D2.b2Joint_asPulleyJoint(*args)
+
+ def asRevoluteJoint(*args):
+ """asRevoluteJoint(self) -> b2RevoluteJoint"""
+ return _Box2D2.b2Joint_asRevoluteJoint(*args)
+
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+
+def b2Joint_Create(*args):
+ """b2Joint_Create(b2JointDef def, b2BlockAllocator allocator) -> b2Joint"""
+ return _Box2D2.b2Joint_Create(*args)
+
+def b2Joint_Destroy(*args):
+ """b2Joint_Destroy(b2Joint joint, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Joint_Destroy(*args)
+
+class b2BodyDef(_object):
+ """Proxy of C++ b2BodyDef class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2BodyDef, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2BodyDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BodyDef"""
+ this = _Box2D2.new_b2BodyDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["massData"] = _Box2D2.b2BodyDef_massData_set
+ __swig_getmethods__["massData"] = _Box2D2.b2BodyDef_massData_get
+ if _newclass:massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
+ __swig_setmethods__["userData"] = _Box2D2.b2BodyDef_userData_set
+ __swig_getmethods__["userData"] = _Box2D2.b2BodyDef_userData_get
+ if _newclass:userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
+ __swig_setmethods__["position"] = _Box2D2.b2BodyDef_position_set
+ __swig_getmethods__["position"] = _Box2D2.b2BodyDef_position_get
+ if _newclass:position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
+ __swig_setmethods__["angle"] = _Box2D2.b2BodyDef_angle_set
+ __swig_getmethods__["angle"] = _Box2D2.b2BodyDef_angle_get
+ if _newclass:angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
+ __swig_setmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_set
+ __swig_getmethods__["linearDamping"] = _Box2D2.b2BodyDef_linearDamping_get
+ if _newclass:linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
+ __swig_setmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_set
+ __swig_getmethods__["angularDamping"] = _Box2D2.b2BodyDef_angularDamping_get
+ if _newclass:angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
+ __swig_setmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_set
+ __swig_getmethods__["allowSleep"] = _Box2D2.b2BodyDef_allowSleep_get
+ if _newclass:allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
+ __swig_setmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_set
+ __swig_getmethods__["isSleeping"] = _Box2D2.b2BodyDef_isSleeping_get
+ if _newclass:isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
+ __swig_setmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_set
+ __swig_getmethods__["fixedRotation"] = _Box2D2.b2BodyDef_fixedRotation_get
+ if _newclass:fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
+ __swig_setmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_set
+ __swig_getmethods__["isBullet"] = _Box2D2.b2BodyDef_isBullet_get
+ if _newclass:isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+ __del__ = lambda self : None;
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body(_object):
+ """Proxy of C++ b2Body class"""
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2Body, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, b2Body, name)
+ __repr__ = _swig_repr
+ def CreateShape(*args):
+ """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
+ return _Box2D2.b2Body_CreateShape(*args)
+
+ def DestroyShape(*args):
+ """DestroyShape(self, b2Shape shape)"""
+ return _Box2D2.b2Body_DestroyShape(*args)
+
+ def SetMass(*args):
+ """SetMass(self, b2MassData massData)"""
+ return _Box2D2.b2Body_SetMass(*args)
+
+ def SetMassFromShapes(*args):
+ """SetMassFromShapes(self)"""
+ return _Box2D2.b2Body_SetMassFromShapes(*args)
+
+ def SetXForm(*args):
+ """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
+ return _Box2D2.b2Body_SetXForm(*args)
+
+ def GetXForm(*args):
+ """GetXForm(self) -> b2XForm"""
+ return _Box2D2.b2Body_GetXForm(*args)
+
+ def GetPosition(*args):
+ """GetPosition(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetPosition(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Body_GetAngle(*args)
+
+ def GetWorldCenter(*args):
+ """GetWorldCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldCenter(*args)
+
+ def GetLocalCenter(*args):
+ """GetLocalCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalCenter(*args)
+
+ def SetLinearVelocity(*args):
+ """SetLinearVelocity(self, b2Vec2 v)"""
+ return _Box2D2.b2Body_SetLinearVelocity(*args)
+
+ def GetLinearVelocity(*args):
+ """GetLinearVelocity(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocity(*args)
+
+ def SetAngularVelocity(*args):
+ """SetAngularVelocity(self, float32 omega)"""
+ return _Box2D2.b2Body_SetAngularVelocity(*args)
+
+ def GetAngularVelocity(*args):
+ """GetAngularVelocity(self) -> float32"""
+ return _Box2D2.b2Body_GetAngularVelocity(*args)
+
+ def ApplyForce(*args):
+ """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyForce(*args)
+
+ def ApplyTorque(*args):
+ """ApplyTorque(self, float32 torque)"""
+ return _Box2D2.b2Body_ApplyTorque(*args)
+
+ def ApplyImpulse(*args):
+ """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyImpulse(*args)
+
+ def GetMass(*args):
+ """GetMass(self) -> float32"""
+ return _Box2D2.b2Body_GetMass(*args)
+
+ def GetInertia(*args):
+ """GetInertia(self) -> float32"""
+ return _Box2D2.b2Body_GetInertia(*args)
+
+ def GetWorldPoint(*args):
+ """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldPoint(*args)
+
+ def GetWorldVector(*args):
+ """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldVector(*args)
+
+ def GetLocalPoint(*args):
+ """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalPoint(*args)
+
+ def GetLocalVector(*args):
+ """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalVector(*args)
+
+ def IsBullet(*args):
+ """IsBullet(self) -> bool"""
+ return _Box2D2.b2Body_IsBullet(*args)
+
+ def SetBullet(*args):
+ """SetBullet(self, bool flag)"""
+ return _Box2D2.b2Body_SetBullet(*args)
+
+ def IsStatic(*args):
+ """IsStatic(self) -> bool"""
+ return _Box2D2.b2Body_IsStatic(*args)
+
+ def IsDynamic(*args):
+ """IsDynamic(self) -> bool"""
+ return _Box2D2.b2Body_IsDynamic(*args)
+
+ def IsFrozen(*args):
+ """IsFrozen(self) -> bool"""
+ return _Box2D2.b2Body_IsFrozen(*args)
+
+ def IsSleeping(*args):
+ """IsSleeping(self) -> bool"""
+ return _Box2D2.b2Body_IsSleeping(*args)
+
+ def AllowSleeping(*args):
+ """AllowSleeping(self, bool flag)"""
+ return _Box2D2.b2Body_AllowSleeping(*args)
+
+ def WakeUp(*args):
+ """WakeUp(self)"""
+ return _Box2D2.b2Body_WakeUp(*args)
+
+ def GetShapeList(*args):
+ """GetShapeList(self) -> b2Shape"""
+ return _Box2D2.b2Body_GetShapeList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2JointEdge"""
+ return _Box2D2.b2Body_GetJointList(*args)
+
+ def GetContactList(*args):
+ """GetContactList(self) -> b2ContactEdge"""
+ return _Box2D2.b2Body_GetContactList(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Body"""
+ return _Box2D2.b2Body_GetNext(*args)
+
+ def GetUserData(*args):
+ """GetUserData(self) -> void"""
+ return _Box2D2.b2Body_GetUserData(*args)
+
+ e_frozenFlag = _Box2D2.b2Body_e_frozenFlag
+ e_islandFlag = _Box2D2.b2Body_e_islandFlag
+ e_sleepFlag = _Box2D2.b2Body_e_sleepFlag
+ e_allowSleepFlag = _Box2D2.b2Body_e_allowSleepFlag
+ e_bulletFlag = _Box2D2.b2Body_e_bulletFlag
+ e_fixedRotationFlag = _Box2D2.b2Body_e_fixedRotationFlag
+ e_staticType = _Box2D2.b2Body_e_staticType
+ e_dynamicType = _Box2D2.b2Body_e_dynamicType
+ e_maxTypes = _Box2D2.b2Body_e_maxTypes
+ def __init__(self, *args):
+ """__init__(self, b2BodyDef bd, uint16 type, b2World world) -> b2Body"""
+ this = _Box2D2.new_b2Body(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _Box2D2.delete_b2Body
+ __del__ = lambda self : None;
+ def ComputeMass(*args):
+ """ComputeMass(self)"""
+ return _Box2D2.b2Body_ComputeMass(*args)
+
+ def SynchronizeShapes(*args):
+ """SynchronizeShapes(self) -> bool"""
+ return _Box2D2.b2Body_SynchronizeShapes(*args)
+
+ def SynchronizeTransform(*args):
+ """SynchronizeTransform(self)"""
+ return _Box2D2.b2Body_SynchronizeTransform(*args)
+
+ def IsConnected(*args):
+ """IsConnected(self, b2Body other) -> bool"""
+ return _Box2D2.b2Body_IsConnected(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Body_Advance(*args)
+
+ __swig_setmethods__["m_flags"] = _Box2D2.b2Body_m_flags_set
+ __swig_getmethods__["m_flags"] = _Box2D2.b2Body_m_flags_get
+ if _newclass:m_flags = _swig_property(_Box2D2.b2Body_m_flags_get, _Box2D2.b2Body_m_flags_set)
+ __swig_setmethods__["m_type"] = _Box2D2.b2Body_m_type_set
+ __swig_getmethods__["m_type"] = _Box2D2.b2Body_m_type_get
+ if _newclass:m_type = _swig_property(_Box2D2.b2Body_m_type_get, _Box2D2.b2Body_m_type_set)
+ __swig_setmethods__["m_xf"] = _Box2D2.b2Body_m_xf_set
+ __swig_getmethods__["m_xf"] = _Box2D2.b2Body_m_xf_get
+ if _newclass:m_xf = _swig_property(_Box2D2.b2Body_m_xf_get, _Box2D2.b2Body_m_xf_set)
+ __swig_setmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_set
+ __swig_getmethods__["m_sweep"] = _Box2D2.b2Body_m_sweep_get
+ if _newclass:m_sweep = _swig_property(_Box2D2.b2Body_m_sweep_get, _Box2D2.b2Body_m_sweep_set)
+ __swig_setmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_set
+ __swig_getmethods__["m_linearVelocity"] = _Box2D2.b2Body_m_linearVelocity_get
+ if _newclass:m_linearVelocity = _swig_property(_Box2D2.b2Body_m_linearVelocity_get, _Box2D2.b2Body_m_linearVelocity_set)
+ __swig_setmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_set
+ __swig_getmethods__["m_angularVelocity"] = _Box2D2.b2Body_m_angularVelocity_get
+ if _newclass:m_angularVelocity = _swig_property(_Box2D2.b2Body_m_angularVelocity_get, _Box2D2.b2Body_m_angularVelocity_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2Body_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2Body_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2Body_m_force_get, _Box2D2.b2Body_m_force_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2Body_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2Body_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2Body_m_torque_get, _Box2D2.b2Body_m_torque_set)
+ __swig_setmethods__["m_world"] = _Box2D2.b2Body_m_world_set
+ __swig_getmethods__["m_world"] = _Box2D2.b2Body_m_world_get
+ if _newclass:m_world = _swig_property(_Box2D2.b2Body_m_world_get, _Box2D2.b2Body_m_world_set)
+ __swig_setmethods__["m_prev"] = _Box2D2.b2Body_m_prev_set
+ __swig_getmethods__["m_prev"] = _Box2D2.b2Body_m_prev_get
+ if _newclass:m_prev = _swig_property(_Box2D2.b2Body_m_prev_get, _Box2D2.b2Body_m_prev_set)
+ __swig_setmethods__["m_next"] = _Box2D2.b2Body_m_next_set
+ __swig_getmethods__["m_next"] = _Box2D2.b2Body_m_next_get
+ if _newclass:m_next = _swig_property(_Box2D2.b2Body_m_next_get, _Box2D2.b2Body_m_next_set)
+ __swig_setmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_set
+ __swig_getmethods__["m_shapeList"] = _Box2D2.b2Body_m_shapeList_get
+ if _newclass:m_shapeList = _swig_property(_Box2D2.b2Body_m_shapeList_get, _Box2D2.b2Body_m_shapeList_set)
+ __swig_setmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_set
+ __swig_getmethods__["m_shapeCount"] = _Box2D2.b2Body_m_shapeCount_get
+ if _newclass:m_shapeCount = _swig_property(_Box2D2.b2Body_m_shapeCount_get, _Box2D2.b2Body_m_shapeCount_set)
+ __swig_setmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_set
+ __swig_getmethods__["m_jointList"] = _Box2D2.b2Body_m_jointList_get
+ if _newclass:m_jointList = _swig_property(_Box2D2.b2Body_m_jointList_get, _Box2D2.b2Body_m_jointList_set)
+ __swig_setmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_set
+ __swig_getmethods__["m_contactList"] = _Box2D2.b2Body_m_contactList_get
+ if _newclass:m_contactList = _swig_property(_Box2D2.b2Body_m_contactList_get, _Box2D2.b2Body_m_contactList_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2Body_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2Body_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2Body_m_mass_get, _Box2D2.b2Body_m_mass_set)
+ __swig_setmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_set
+ __swig_getmethods__["m_invMass"] = _Box2D2.b2Body_m_invMass_get
+ if _newclass:m_invMass = _swig_property(_Box2D2.b2Body_m_invMass_get, _Box2D2.b2Body_m_invMass_set)
+ __swig_setmethods__["m_I"] = _Box2D2.b2Body_m_I_set
+ __swig_getmethods__["m_I"] = _Box2D2.b2Body_m_I_get
+ if _newclass:m_I = _swig_property(_Box2D2.b2Body_m_I_get, _Box2D2.b2Body_m_I_set)
+ __swig_setmethods__["m_invI"] = _Box2D2.b2Body_m_invI_set
+ __swig_getmethods__["m_invI"] = _Box2D2.b2Body_m_invI_get
+ if _newclass:m_invI = _swig_property(_Box2D2.b2Body_m_invI_get, _Box2D2.b2Body_m_invI_set)
+ __swig_setmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_set
+ __swig_getmethods__["m_linearDamping"] = _Box2D2.b2Body_m_linearDamping_get
+ if _newclass:m_linearDamping = _swig_property(_Box2D2.b2Body_m_linearDamping_get, _Box2D2.b2Body_m_linearDamping_set)
+ __swig_setmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_set
+ __swig_getmethods__["m_angularDamping"] = _Box2D2.b2Body_m_angularDamping_get
+ if _newclass:m_angularDamping = _swig_property(_Box2D2.b2Body_m_angularDamping_get, _Box2D2.b2Body_m_angularDamping_set)
+ __swig_setmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_set
+ __swig_getmethods__["m_sleepTime"] = _Box2D2.b2Body_m_sleepTime_get
+ if _newclass:m_sleepTime = _swig_property(_Box2D2.b2Body_m_sleepTime_get, _Box2D2.b2Body_m_sleepTime_set)
+ __swig_setmethods__["m_userData"] = _Box2D2.b2Body_m_userData_set
+ __swig_getmethods__["m_userData"] = _Box2D2.b2Body_m_userData_get
+ if _newclass:m_userData = _swig_property(_Box2D2.b2Body_m_userData_get, _Box2D2.b2Body_m_userData_set)
+ def __repr__(self):
+ return "b2Body(Position: %s)" % (self.GetPosition())
+
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ """Proxy of C++ b2DistanceJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DistanceJointDef"""
+ this = _Box2D2.new_b2DistanceJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
+ return _Box2D2.b2DistanceJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2DistanceJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2DistanceJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
+ __swig_setmethods__["length"] = _Box2D2.b2DistanceJointDef_length_set
+ __swig_getmethods__["length"] = _Box2D2.b2DistanceJointDef_length_get
+ if _newclass:length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+ __del__ = lambda self : None;
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ """Proxy of C++ b2DistanceJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2DistanceJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2DistanceJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2DistanceJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2DistanceJoint_GetReactionTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
+ this = _Box2D2.new_b2DistanceJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2DistanceJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2DistanceJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_set
+ __swig_getmethods__["m_u"] = _Box2D2.b2DistanceJoint_m_u_get
+ if _newclass:m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2DistanceJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2DistanceJoint_m_force_get, _Box2D2.b2DistanceJoint_m_force_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2DistanceJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
+ __swig_setmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_set
+ __swig_getmethods__["m_length"] = _Box2D2.b2DistanceJoint_m_length_get
+ if _newclass:m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+ __del__ = lambda self : None;
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ """Proxy of C++ b2MouseJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2MouseJointDef"""
+ this = _Box2D2.new_b2MouseJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["target"] = _Box2D2.b2MouseJointDef_target_set
+ __swig_getmethods__["target"] = _Box2D2.b2MouseJointDef_target_get
+ if _newclass:target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
+ __swig_setmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_set
+ __swig_getmethods__["maxForce"] = _Box2D2.b2MouseJointDef_maxForce_get
+ if _newclass:maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
+ __swig_setmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_set
+ __swig_getmethods__["frequencyHz"] = _Box2D2.b2MouseJointDef_frequencyHz_get
+ if _newclass:frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
+ __swig_setmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_set
+ __swig_getmethods__["dampingRatio"] = _Box2D2.b2MouseJointDef_dampingRatio_get
+ if _newclass:dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
+ __swig_setmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_set
+ __swig_getmethods__["timeStep"] = _Box2D2.b2MouseJointDef_timeStep_get
+ if _newclass:timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+ __del__ = lambda self : None;
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ """Proxy of C++ b2MouseJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2MouseJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2MouseJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2MouseJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2MouseJoint_GetReactionTorque(*args)
+
+ def SetTarget(*args):
+ """SetTarget(self, b2Vec2 target)"""
+ return _Box2D2.b2MouseJoint_SetTarget(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
+ this = _Box2D2.new_b2MouseJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_set
+ __swig_getmethods__["m_localAnchor"] = _Box2D2.b2MouseJoint_m_localAnchor_get
+ if _newclass:m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
+ __swig_setmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_set
+ __swig_getmethods__["m_target"] = _Box2D2.b2MouseJoint_m_target_get
+ if _newclass:m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2MouseJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2MouseJoint_m_force_get, _Box2D2.b2MouseJoint_m_force_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2MouseJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
+ __swig_setmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_set
+ __swig_getmethods__["m_C"] = _Box2D2.b2MouseJoint_m_C_get
+ if _newclass:m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
+ __swig_setmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_set
+ __swig_getmethods__["m_maxForce"] = _Box2D2.b2MouseJoint_m_maxForce_get
+ if _newclass:m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
+ __swig_setmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_set
+ __swig_getmethods__["m_beta"] = _Box2D2.b2MouseJoint_m_beta_get
+ if _newclass:m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
+ __swig_setmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_set
+ __swig_getmethods__["m_gamma"] = _Box2D2.b2MouseJoint_m_gamma_get
+ if _newclass:m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+ __del__ = lambda self : None;
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ """Proxy of C++ b2PrismaticJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PrismaticJointDef"""
+ this = _Box2D2.new_b2PrismaticJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
+ return _Box2D2.b2PrismaticJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PrismaticJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PrismaticJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
+ __swig_setmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_set
+ __swig_getmethods__["localAxis1"] = _Box2D2.b2PrismaticJointDef_localAxis1_get
+ if _newclass:localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2PrismaticJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2PrismaticJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
+ __swig_setmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_set
+ __swig_getmethods__["lowerTranslation"] = _Box2D2.b2PrismaticJointDef_lowerTranslation_get
+ if _newclass:lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
+ __swig_setmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_set
+ __swig_getmethods__["upperTranslation"] = _Box2D2.b2PrismaticJointDef_upperTranslation_get
+ if _newclass:upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2PrismaticJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
+ __swig_setmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_set
+ __swig_getmethods__["maxMotorForce"] = _Box2D2.b2PrismaticJointDef_maxMotorForce_get
+ if _newclass:maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2PrismaticJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+ __del__ = lambda self : None;
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ """Proxy of C++ b2PrismaticJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PrismaticJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PrismaticJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PrismaticJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetReactionTorque(*args)
+
+ def GetJointTranslation(*args):
+ """GetJointTranslation(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2PrismaticJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorForce(*args):
+ """SetMaxMotorForce(self, float32 force)"""
+ return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
+
+ def GetMotorForce(*args):
+ """GetMotorForce(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
+ this = _Box2D2.new_b2PrismaticJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PrismaticJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PrismaticJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_set
+ __swig_getmethods__["m_localXAxis1"] = _Box2D2.b2PrismaticJoint_m_localXAxis1_get
+ if _newclass:m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
+ __swig_setmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_set
+ __swig_getmethods__["m_localYAxis1"] = _Box2D2.b2PrismaticJoint_m_localYAxis1_get
+ if _newclass:m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
+ __swig_setmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_set
+ __swig_getmethods__["m_refAngle"] = _Box2D2.b2PrismaticJoint_m_refAngle_get
+ if _newclass:m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
+ __swig_setmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_set
+ __swig_getmethods__["m_linearJacobian"] = _Box2D2.b2PrismaticJoint_m_linearJacobian_get
+ if _newclass:m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
+ __swig_setmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_set
+ __swig_getmethods__["m_linearMass"] = _Box2D2.b2PrismaticJoint_m_linearMass_get
+ if _newclass:m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PrismaticJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
+ __swig_setmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_set
+ __swig_getmethods__["m_angularMass"] = _Box2D2.b2PrismaticJoint_m_angularMass_get
+ if _newclass:m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
+ __swig_setmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_set
+ __swig_getmethods__["m_torque"] = _Box2D2.b2PrismaticJoint_m_torque_get
+ if _newclass:m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
+ __swig_setmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_set
+ __swig_getmethods__["m_motorJacobian"] = _Box2D2.b2PrismaticJoint_m_motorJacobian_get
+ if _newclass:m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2PrismaticJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2PrismaticJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2PrismaticJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_set
+ __swig_getmethods__["m_lowerTranslation"] = _Box2D2.b2PrismaticJoint_m_lowerTranslation_get
+ if _newclass:m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
+ __swig_setmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_set
+ __swig_getmethods__["m_upperTranslation"] = _Box2D2.b2PrismaticJoint_m_upperTranslation_get
+ if _newclass:m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
+ __swig_setmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_set
+ __swig_getmethods__["m_maxMotorForce"] = _Box2D2.b2PrismaticJoint_m_maxMotorForce_get
+ if _newclass:m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2PrismaticJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2PrismaticJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2PrismaticJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2PrismaticJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+ __del__ = lambda self : None;
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ """Proxy of C++ b2RevoluteJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2RevoluteJointDef"""
+ this = _Box2D2.new_b2RevoluteJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
+ return _Box2D2.b2RevoluteJointDef_Initialize(*args)
+
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2RevoluteJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2RevoluteJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
+ __swig_setmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_set
+ __swig_getmethods__["referenceAngle"] = _Box2D2.b2RevoluteJointDef_referenceAngle_get
+ if _newclass:referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
+ __swig_setmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_set
+ __swig_getmethods__["enableLimit"] = _Box2D2.b2RevoluteJointDef_enableLimit_get
+ if _newclass:enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
+ __swig_setmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_set
+ __swig_getmethods__["lowerAngle"] = _Box2D2.b2RevoluteJointDef_lowerAngle_get
+ if _newclass:lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
+ __swig_setmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_set
+ __swig_getmethods__["upperAngle"] = _Box2D2.b2RevoluteJointDef_upperAngle_get
+ if _newclass:upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
+ __swig_setmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_set
+ __swig_getmethods__["enableMotor"] = _Box2D2.b2RevoluteJointDef_enableMotor_get
+ if _newclass:enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
+ __swig_setmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_set
+ __swig_getmethods__["motorSpeed"] = _Box2D2.b2RevoluteJointDef_motorSpeed_get
+ if _newclass:motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
+ __swig_setmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_set
+ __swig_getmethods__["maxMotorTorque"] = _Box2D2.b2RevoluteJointDef_maxMotorTorque_get
+ if _newclass:maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+ __del__ = lambda self : None;
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ """Proxy of C++ b2RevoluteJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2RevoluteJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2RevoluteJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2RevoluteJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetReactionTorque(*args)
+
+ def GetJointAngle(*args):
+ """GetJointAngle(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2RevoluteJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorTorque(*args):
+ """SetMaxMotorTorque(self, float32 torque)"""
+ return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
+
+ def GetMotorTorque(*args):
+ """GetMotorTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
+ this = _Box2D2.new_b2RevoluteJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2RevoluteJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2RevoluteJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_set
+ __swig_getmethods__["m_pivotForce"] = _Box2D2.b2RevoluteJoint_m_pivotForce_get
+ if _newclass:m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
+ __swig_setmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_set
+ __swig_getmethods__["m_motorForce"] = _Box2D2.b2RevoluteJoint_m_motorForce_get
+ if _newclass:m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
+ __swig_setmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_set
+ __swig_getmethods__["m_limitForce"] = _Box2D2.b2RevoluteJoint_m_limitForce_get
+ if _newclass:m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
+ __swig_setmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set
+ __swig_getmethods__["m_limitPositionImpulse"] = _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get
+ if _newclass:m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
+ __swig_setmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_set
+ __swig_getmethods__["m_pivotMass"] = _Box2D2.b2RevoluteJoint_m_pivotMass_get
+ if _newclass:m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
+ __swig_setmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_set
+ __swig_getmethods__["m_motorMass"] = _Box2D2.b2RevoluteJoint_m_motorMass_get
+ if _newclass:m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
+ __swig_setmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_set
+ __swig_getmethods__["m_enableMotor"] = _Box2D2.b2RevoluteJoint_m_enableMotor_get
+ if _newclass:m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
+ __swig_setmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set
+ __swig_getmethods__["m_maxMotorTorque"] = _Box2D2.b2RevoluteJoint_m_maxMotorTorque_get
+ if _newclass:m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
+ __swig_setmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_set
+ __swig_getmethods__["m_motorSpeed"] = _Box2D2.b2RevoluteJoint_m_motorSpeed_get
+ if _newclass:m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
+ __swig_setmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_set
+ __swig_getmethods__["m_enableLimit"] = _Box2D2.b2RevoluteJoint_m_enableLimit_get
+ if _newclass:m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
+ __swig_setmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_set
+ __swig_getmethods__["m_referenceAngle"] = _Box2D2.b2RevoluteJoint_m_referenceAngle_get
+ if _newclass:m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
+ __swig_setmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_set
+ __swig_getmethods__["m_lowerAngle"] = _Box2D2.b2RevoluteJoint_m_lowerAngle_get
+ if _newclass:m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
+ __swig_setmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_set
+ __swig_getmethods__["m_upperAngle"] = _Box2D2.b2RevoluteJoint_m_upperAngle_get
+ if _newclass:m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
+ __swig_setmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_set
+ __swig_getmethods__["m_limitState"] = _Box2D2.b2RevoluteJoint_m_limitState_get
+ if _newclass:m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+ __del__ = lambda self : None;
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ """Proxy of C++ b2PulleyJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PulleyJointDef"""
+ this = _Box2D2.new_b2PulleyJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def Initialize(*args):
+ """
+ Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
+ b2Vec2 anchor1, b2Vec2 anchor2,
+ float32 ratio)
+ """
+ return _Box2D2.b2PulleyJointDef_Initialize(*args)
+
+ __swig_setmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_set
+ __swig_getmethods__["groundAnchor1"] = _Box2D2.b2PulleyJointDef_groundAnchor1_get
+ if _newclass:groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
+ __swig_setmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_set
+ __swig_getmethods__["groundAnchor2"] = _Box2D2.b2PulleyJointDef_groundAnchor2_get
+ if _newclass:groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
+ __swig_setmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_set
+ __swig_getmethods__["localAnchor1"] = _Box2D2.b2PulleyJointDef_localAnchor1_get
+ if _newclass:localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
+ __swig_setmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_set
+ __swig_getmethods__["localAnchor2"] = _Box2D2.b2PulleyJointDef_localAnchor2_get
+ if _newclass:localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
+ __swig_setmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_set
+ __swig_getmethods__["length1"] = _Box2D2.b2PulleyJointDef_length1_get
+ if _newclass:length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
+ __swig_setmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_set
+ __swig_getmethods__["maxLength1"] = _Box2D2.b2PulleyJointDef_maxLength1_get
+ if _newclass:maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
+ __swig_setmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_set
+ __swig_getmethods__["length2"] = _Box2D2.b2PulleyJointDef_length2_get
+ if _newclass:length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
+ __swig_setmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_set
+ __swig_getmethods__["maxLength2"] = _Box2D2.b2PulleyJointDef_maxLength2_get
+ if _newclass:maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2PulleyJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+ __del__ = lambda self : None;
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ """Proxy of C++ b2PulleyJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2PulleyJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2PulleyJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetReactionTorque(*args)
+
+ def GetGroundAnchor1(*args):
+ """GetGroundAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
+
+ def GetGroundAnchor2(*args):
+ """GetGroundAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
+
+ def GetLength1(*args):
+ """GetLength1(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength1(*args)
+
+ def GetLength2(*args):
+ """GetLength2(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength2(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
+ this = _Box2D2.new_b2PulleyJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_set
+ __swig_getmethods__["m_ground"] = _Box2D2.b2PulleyJoint_m_ground_get
+ if _newclass:m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2PulleyJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2PulleyJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2PulleyJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2PulleyJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_set
+ __swig_getmethods__["m_u1"] = _Box2D2.b2PulleyJoint_m_u1_get
+ if _newclass:m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
+ __swig_setmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_set
+ __swig_getmethods__["m_u2"] = _Box2D2.b2PulleyJoint_m_u2_get
+ if _newclass:m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2PulleyJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2PulleyJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
+ __swig_setmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_set
+ __swig_getmethods__["m_maxLength1"] = _Box2D2.b2PulleyJoint_m_maxLength1_get
+ if _newclass:m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
+ __swig_setmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_set
+ __swig_getmethods__["m_maxLength2"] = _Box2D2.b2PulleyJoint_m_maxLength2_get
+ if _newclass:m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
+ __swig_setmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_set
+ __swig_getmethods__["m_pulleyMass"] = _Box2D2.b2PulleyJoint_m_pulleyMass_get
+ if _newclass:m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
+ __swig_setmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_set
+ __swig_getmethods__["m_limitMass1"] = _Box2D2.b2PulleyJoint_m_limitMass1_get
+ if _newclass:m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
+ __swig_setmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_set
+ __swig_getmethods__["m_limitMass2"] = _Box2D2.b2PulleyJoint_m_limitMass2_get
+ if _newclass:m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2PulleyJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
+ __swig_setmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_set
+ __swig_getmethods__["m_limitForce1"] = _Box2D2.b2PulleyJoint_m_limitForce1_get
+ if _newclass:m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
+ __swig_setmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_set
+ __swig_getmethods__["m_limitForce2"] = _Box2D2.b2PulleyJoint_m_limitForce2_get
+ if _newclass:m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
+ __swig_setmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_set
+ __swig_getmethods__["m_positionImpulse"] = _Box2D2.b2PulleyJoint_m_positionImpulse_get
+ if _newclass:m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
+ __swig_setmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set
+ __swig_getmethods__["m_limitPositionImpulse1"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get
+ if _newclass:m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
+ __swig_setmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set
+ __swig_getmethods__["m_limitPositionImpulse2"] = _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get
+ if _newclass:m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
+ __swig_setmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_set
+ __swig_getmethods__["m_state"] = _Box2D2.b2PulleyJoint_m_state_get
+ if _newclass:m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
+ __swig_setmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_set
+ __swig_getmethods__["m_limitState1"] = _Box2D2.b2PulleyJoint_m_limitState1_get
+ if _newclass:m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
+ __swig_setmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_set
+ __swig_getmethods__["m_limitState2"] = _Box2D2.b2PulleyJoint_m_limitState2_get
+ if _newclass:m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+ __del__ = lambda self : None;
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ """Proxy of C++ b2GearJointDef class"""
+ __swig_setmethods__ = {}
+ for _s in [b2JointDef]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJointDef, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2JointDef]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJointDef, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2GearJointDef"""
+ this = _Box2D2.new_b2GearJointDef(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_setmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_set
+ __swig_getmethods__["joint1"] = _Box2D2.b2GearJointDef_joint1_get
+ if _newclass:joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
+ __swig_setmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_set
+ __swig_getmethods__["joint2"] = _Box2D2.b2GearJointDef_joint2_get
+ if _newclass:joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
+ __swig_setmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_set
+ __swig_getmethods__["ratio"] = _Box2D2.b2GearJointDef_ratio_get
+ if _newclass:ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+ __del__ = lambda self : None;
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ """Proxy of C++ b2GearJoint class"""
+ __swig_setmethods__ = {}
+ for _s in [b2Joint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
+ __setattr__ = lambda self, name, value: _swig_setattr(self, b2GearJoint, name, value)
+ __swig_getmethods__ = {}
+ for _s in [b2Joint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
+ __getattr__ = lambda self, name: _swig_getattr(self, b2GearJoint, name)
+ __repr__ = _swig_repr
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2GearJoint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetReactionTorque(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2GearJointDef data) -> b2GearJoint"""
+ this = _Box2D2.new_b2GearJoint(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
+
+ __swig_setmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_set
+ __swig_getmethods__["m_ground1"] = _Box2D2.b2GearJoint_m_ground1_get
+ if _newclass:m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
+ __swig_setmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_set
+ __swig_getmethods__["m_ground2"] = _Box2D2.b2GearJoint_m_ground2_get
+ if _newclass:m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
+ __swig_setmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_set
+ __swig_getmethods__["m_revolute1"] = _Box2D2.b2GearJoint_m_revolute1_get
+ if _newclass:m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
+ __swig_setmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_set
+ __swig_getmethods__["m_prismatic1"] = _Box2D2.b2GearJoint_m_prismatic1_get
+ if _newclass:m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
+ __swig_setmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_set
+ __swig_getmethods__["m_revolute2"] = _Box2D2.b2GearJoint_m_revolute2_get
+ if _newclass:m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
+ __swig_setmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_set
+ __swig_getmethods__["m_prismatic2"] = _Box2D2.b2GearJoint_m_prismatic2_get
+ if _newclass:m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
+ __swig_setmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_set
+ __swig_getmethods__["m_groundAnchor1"] = _Box2D2.b2GearJoint_m_groundAnchor1_get
+ if _newclass:m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
+ __swig_setmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_set
+ __swig_getmethods__["m_groundAnchor2"] = _Box2D2.b2GearJoint_m_groundAnchor2_get
+ if _newclass:m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
+ __swig_setmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_set
+ __swig_getmethods__["m_localAnchor1"] = _Box2D2.b2GearJoint_m_localAnchor1_get
+ if _newclass:m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
+ __swig_setmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_set
+ __swig_getmethods__["m_localAnchor2"] = _Box2D2.b2GearJoint_m_localAnchor2_get
+ if _newclass:m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
+ __swig_setmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_set
+ __swig_getmethods__["m_J"] = _Box2D2.b2GearJoint_m_J_get
+ if _newclass:m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
+ __swig_setmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_set
+ __swig_getmethods__["m_constant"] = _Box2D2.b2GearJoint_m_constant_get
+ if _newclass:m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
+ __swig_setmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_set
+ __swig_getmethods__["m_ratio"] = _Box2D2.b2GearJoint_m_ratio_get
+ if _newclass:m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
+ __swig_setmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_set
+ __swig_getmethods__["m_mass"] = _Box2D2.b2GearJoint_m_mass_get
+ if _newclass:m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
+ __swig_setmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_set
+ __swig_getmethods__["m_force"] = _Box2D2.b2GearJoint_m_force_get
+ if _newclass:m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+ __del__ = lambda self : None;
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/box2d/box2d_macosx/_Box2D2.so b/elements/box2d/box2d_macosx/_Box2D2.so
new file mode 100755
index 0000000..4f0cfd9
--- /dev/null
+++ b/elements/box2d/box2d_macosx/_Box2D2.so
Binary files differ
diff --git a/elements/box2d/box2d_macosx/__init__.py b/elements/box2d/box2d_macosx/__init__.py
new file mode 100755
index 0000000..53d0f25
--- /dev/null
+++ b/elements/box2d/box2d_macosx/__init__.py
@@ -0,0 +1 @@
+from Box2D2 import *
diff --git a/elements/box2d/box2d_win/Box2D2.py b/elements/box2d/box2d_win/Box2D2.py
new file mode 100755
index 0000000..fa520ce
--- /dev/null
+++ b/elements/box2d/box2d_win/Box2D2.py
@@ -0,0 +1,2845 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.34
+#
+# Don't modify this file, modify the SWIG interface instead.
+
+import _Box2D2
+import new
+new_instancemethod = new.instancemethod
+try:
+ _swig_property = property
+except NameError:
+ pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "thisown"): return self.this.own(value)
+ if (name == "this"):
+ if type(value).__name__ == 'PySwigObject':
+ self.__dict__[name] = value
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+def _swig_setattr_nondynamic_method(set):
+ def set_attr(self,name,value):
+ if (name == "thisown"): return self.this.own(value)
+ if hasattr(self,name) or (name == "this"):
+ set(self,name,value)
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+ return set_attr
+
+
+try:
+ import weakref
+ weakref_proxy = weakref.proxy
+except:
+ weakref_proxy = lambda x: x
+
+
+
+def b2Alloc(*args):
+ """b2Alloc(int32 size) -> void"""
+ return _Box2D2.b2Alloc(*args)
+
+def b2Free(*args):
+ """b2Free(void mem)"""
+ return _Box2D2.b2Free(*args)
+class b2Version(object):
+ """Proxy of C++ b2Version class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ major = _swig_property(_Box2D2.b2Version_major_get, _Box2D2.b2Version_major_set)
+ minor = _swig_property(_Box2D2.b2Version_minor_get, _Box2D2.b2Version_minor_set)
+ revision = _swig_property(_Box2D2.b2Version_revision_get, _Box2D2.b2Version_revision_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Version"""
+ _Box2D2.b2Version_swiginit(self,_Box2D2.new_b2Version(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Version
+b2Version_swigregister = _Box2D2.b2Version_swigregister
+b2Version_swigregister(b2Version)
+cvar = _Box2D2.cvar
+b2_pi = cvar.b2_pi
+b2_maxManifoldPoints = cvar.b2_maxManifoldPoints
+b2_maxPolygonVertices = cvar.b2_maxPolygonVertices
+b2_maxProxies = cvar.b2_maxProxies
+b2_maxPairs = cvar.b2_maxPairs
+b2_linearSlop = cvar.b2_linearSlop
+b2_angularSlop = cvar.b2_angularSlop
+b2_toiSlop = cvar.b2_toiSlop
+b2_maxTOIContactsPerIsland = cvar.b2_maxTOIContactsPerIsland
+b2_velocityThreshold = cvar.b2_velocityThreshold
+b2_maxLinearCorrection = cvar.b2_maxLinearCorrection
+b2_maxAngularCorrection = cvar.b2_maxAngularCorrection
+b2_maxLinearVelocity = cvar.b2_maxLinearVelocity
+b2_maxLinearVelocitySquared = cvar.b2_maxLinearVelocitySquared
+b2_maxAngularVelocity = cvar.b2_maxAngularVelocity
+b2_maxAngularVelocitySquared = cvar.b2_maxAngularVelocitySquared
+b2_contactBaumgarte = cvar.b2_contactBaumgarte
+b2_timeToSleep = cvar.b2_timeToSleep
+b2_linearSleepTolerance = cvar.b2_linearSleepTolerance
+b2_angularSleepTolerance = cvar.b2_angularSleepTolerance
+
+
+def b2MixFriction(*args):
+ """b2MixFriction(float32 friction1, float32 friction2) -> float32"""
+ return _Box2D2.b2MixFriction(*args)
+
+def b2MixRestitution(*args):
+ """b2MixRestitution(float32 restitution1, float32 restitution2) -> float32"""
+ return _Box2D2.b2MixRestitution(*args)
+
+def b2IsValid(*args):
+ """b2IsValid(float32 x) -> bool"""
+ return _Box2D2.b2IsValid(*args)
+
+def b2InvSqrt(*args):
+ """b2InvSqrt(float32 x) -> float32"""
+ return _Box2D2.b2InvSqrt(*args)
+class b2Vec2(object):
+ """Proxy of C++ b2Vec2 class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Vec2
+ __init__(self, float32 x, float32 y) -> b2Vec2
+ """
+ _Box2D2.b2Vec2_swiginit(self,_Box2D2.new_b2Vec2(*args))
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Vec2_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, float32 x_, float32 y_)"""
+ return _Box2D2.b2Vec2_Set(*args)
+
+ def __neg__(*args):
+ """__neg__(self) -> b2Vec2"""
+ return _Box2D2.b2Vec2___neg__(*args)
+
+ def add_vector(*args):
+ """add_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_add_vector(*args)
+
+ def sub_vector(*args):
+ """sub_vector(self, b2Vec2 v)"""
+ return _Box2D2.b2Vec2_sub_vector(*args)
+
+ def mul_float(*args):
+ """mul_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_mul_float(*args)
+
+ def Length(*args):
+ """Length(self) -> float32"""
+ return _Box2D2.b2Vec2_Length(*args)
+
+ def LengthSquared(*args):
+ """LengthSquared(self) -> float32"""
+ return _Box2D2.b2Vec2_LengthSquared(*args)
+
+ def Normalize(*args):
+ """Normalize(self) -> float32"""
+ return _Box2D2.b2Vec2_Normalize(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Vec2_IsValid(*args)
+
+ x = _swig_property(_Box2D2.b2Vec2_x_get, _Box2D2.b2Vec2_x_set)
+ y = _swig_property(_Box2D2.b2Vec2_y_get, _Box2D2.b2Vec2_y_set)
+ def __repr__(self):
+ return "b2Vec2(%g,%g)" % (self.x, self.y)
+ def tuple(self):
+ return (self.x, self.y)
+ def fromTuple(self, tuple):
+ self.x, self.y = tuple
+ return self
+ def copy(self):
+ return b2Vec2(self.x, self.y)
+ def __iadd__(self, other):
+ self.add_vector(other)
+ return self
+ def __isub__(self, other):
+ self.sub_vector(other)
+ return self
+ def __imul__(self, a):
+ self.mul_float(a)
+ return self
+ def __idiv__(self, a):
+ self.div_float(a)
+ return self
+
+
+ def __div__(*args):
+ """__div__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___div__(*args)
+
+ def __mul__(*args):
+ """__mul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___mul__(*args)
+
+ def __add__(*args):
+ """__add__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___add__(*args)
+
+ def __sub__(*args):
+ """__sub__(self, b2Vec2 other) -> b2Vec2"""
+ return _Box2D2.b2Vec2___sub__(*args)
+
+ def __rmul__(*args):
+ """__rmul__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rmul__(*args)
+
+ def __rdiv__(*args):
+ """__rdiv__(self, float32 a) -> b2Vec2"""
+ return _Box2D2.b2Vec2___rdiv__(*args)
+
+ def div_float(*args):
+ """div_float(self, float32 a)"""
+ return _Box2D2.b2Vec2_div_float(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2Vec2
+b2Vec2.SetZero = new_instancemethod(_Box2D2.b2Vec2_SetZero,None,b2Vec2)
+b2Vec2.Set = new_instancemethod(_Box2D2.b2Vec2_Set,None,b2Vec2)
+b2Vec2.__neg__ = new_instancemethod(_Box2D2.b2Vec2___neg__,None,b2Vec2)
+b2Vec2.add_vector = new_instancemethod(_Box2D2.b2Vec2_add_vector,None,b2Vec2)
+b2Vec2.sub_vector = new_instancemethod(_Box2D2.b2Vec2_sub_vector,None,b2Vec2)
+b2Vec2.mul_float = new_instancemethod(_Box2D2.b2Vec2_mul_float,None,b2Vec2)
+b2Vec2.Length = new_instancemethod(_Box2D2.b2Vec2_Length,None,b2Vec2)
+b2Vec2.LengthSquared = new_instancemethod(_Box2D2.b2Vec2_LengthSquared,None,b2Vec2)
+b2Vec2.Normalize = new_instancemethod(_Box2D2.b2Vec2_Normalize,None,b2Vec2)
+b2Vec2.IsValid = new_instancemethod(_Box2D2.b2Vec2_IsValid,None,b2Vec2)
+b2Vec2.__div__ = new_instancemethod(_Box2D2.b2Vec2___div__,None,b2Vec2)
+b2Vec2.__mul__ = new_instancemethod(_Box2D2.b2Vec2___mul__,None,b2Vec2)
+b2Vec2.__add__ = new_instancemethod(_Box2D2.b2Vec2___add__,None,b2Vec2)
+b2Vec2.__sub__ = new_instancemethod(_Box2D2.b2Vec2___sub__,None,b2Vec2)
+b2Vec2.__rmul__ = new_instancemethod(_Box2D2.b2Vec2___rmul__,None,b2Vec2)
+b2Vec2.__rdiv__ = new_instancemethod(_Box2D2.b2Vec2___rdiv__,None,b2Vec2)
+b2Vec2.div_float = new_instancemethod(_Box2D2.b2Vec2_div_float,None,b2Vec2)
+b2Vec2_swigregister = _Box2D2.b2Vec2_swigregister
+b2Vec2_swigregister(b2Vec2)
+
+class b2Mat22(object):
+ """Proxy of C++ b2Mat22 class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Mat22
+ __init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22
+ __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22
+ __init__(self, float32 angle) -> b2Mat22
+ """
+ _Box2D2.b2Mat22_swiginit(self,_Box2D2.new_b2Mat22(*args))
+ def Set(*args):
+ """
+ Set(self, b2Vec2 c1, b2Vec2 c2)
+ Set(self, float32 angle)
+ """
+ return _Box2D2.b2Mat22_Set(*args)
+
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2Mat22_SetIdentity(*args)
+
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Mat22_SetZero(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Mat22_GetAngle(*args)
+
+ def Invert(*args):
+ """Invert(self) -> b2Mat22"""
+ return _Box2D2.b2Mat22_Invert(*args)
+
+ def Solve(*args):
+ """Solve(self, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Mat22_Solve(*args)
+
+ col1 = _swig_property(_Box2D2.b2Mat22_col1_get, _Box2D2.b2Mat22_col1_set)
+ col2 = _swig_property(_Box2D2.b2Mat22_col2_get, _Box2D2.b2Mat22_col2_set)
+ def __repr__(self):
+ return "b2Mat22(col1: %s col2: %s)" % (self.col1, self.col2)
+
+ __swig_destroy__ = _Box2D2.delete_b2Mat22
+b2Mat22.Set = new_instancemethod(_Box2D2.b2Mat22_Set,None,b2Mat22)
+b2Mat22.SetIdentity = new_instancemethod(_Box2D2.b2Mat22_SetIdentity,None,b2Mat22)
+b2Mat22.SetZero = new_instancemethod(_Box2D2.b2Mat22_SetZero,None,b2Mat22)
+b2Mat22.GetAngle = new_instancemethod(_Box2D2.b2Mat22_GetAngle,None,b2Mat22)
+b2Mat22.Invert = new_instancemethod(_Box2D2.b2Mat22_Invert,None,b2Mat22)
+b2Mat22.Solve = new_instancemethod(_Box2D2.b2Mat22_Solve,None,b2Mat22)
+b2Mat22_swigregister = _Box2D2.b2Mat22_swigregister
+b2Mat22_swigregister(b2Mat22)
+
+class b2XForm(object):
+ """Proxy of C++ b2XForm class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2XForm
+ __init__(self, b2Vec2 position, b2Mat22 R) -> b2XForm
+ """
+ _Box2D2.b2XForm_swiginit(self,_Box2D2.new_b2XForm(*args))
+ def SetIdentity(*args):
+ """SetIdentity(self)"""
+ return _Box2D2.b2XForm_SetIdentity(*args)
+
+ position = _swig_property(_Box2D2.b2XForm_position_get, _Box2D2.b2XForm_position_set)
+ R = _swig_property(_Box2D2.b2XForm_R_get, _Box2D2.b2XForm_R_set)
+ __swig_destroy__ = _Box2D2.delete_b2XForm
+b2XForm.SetIdentity = new_instancemethod(_Box2D2.b2XForm_SetIdentity,None,b2XForm)
+b2XForm_swigregister = _Box2D2.b2XForm_swigregister
+b2XForm_swigregister(b2XForm)
+
+class b2Sweep(object):
+ """Proxy of C++ b2Sweep class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetXForm(*args):
+ """GetXForm(self, b2XForm xf, float32 t)"""
+ return _Box2D2.b2Sweep_GetXForm(*args)
+
+ def Advance(*args):
+ """Advance(self, float32 t)"""
+ return _Box2D2.b2Sweep_Advance(*args)
+
+ localCenter = _swig_property(_Box2D2.b2Sweep_localCenter_get, _Box2D2.b2Sweep_localCenter_set)
+ c0 = _swig_property(_Box2D2.b2Sweep_c0_get, _Box2D2.b2Sweep_c0_set)
+ c = _swig_property(_Box2D2.b2Sweep_c_get, _Box2D2.b2Sweep_c_set)
+ a0 = _swig_property(_Box2D2.b2Sweep_a0_get, _Box2D2.b2Sweep_a0_set)
+ a = _swig_property(_Box2D2.b2Sweep_a_get, _Box2D2.b2Sweep_a_set)
+ t0 = _swig_property(_Box2D2.b2Sweep_t0_get, _Box2D2.b2Sweep_t0_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Sweep"""
+ _Box2D2.b2Sweep_swiginit(self,_Box2D2.new_b2Sweep(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Sweep
+b2Sweep.GetXForm = new_instancemethod(_Box2D2.b2Sweep_GetXForm,None,b2Sweep)
+b2Sweep.Advance = new_instancemethod(_Box2D2.b2Sweep_Advance,None,b2Sweep)
+b2Sweep_swigregister = _Box2D2.b2Sweep_swigregister
+b2Sweep_swigregister(b2Sweep)
+
+
+def b2Dot(*args):
+ """b2Dot(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2Dot(*args)
+
+def b2sub(*args):
+ """b2sub(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2sub(*args)
+
+def b2mul(*args):
+ """b2mul(float32 s, b2Vec2 a) -> b2Vec2"""
+ return _Box2D2.b2mul(*args)
+
+def b2equ(*args):
+ """b2equ(b2Vec2 a, b2Vec2 b) -> bool"""
+ return _Box2D2.b2equ(*args)
+
+def b2DistanceSquared(*args):
+ """b2DistanceSquared(b2Vec2 a, b2Vec2 b) -> float32"""
+ return _Box2D2.b2DistanceSquared(*args)
+
+def b2Min(*args):
+ """b2Min(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Min(*args)
+
+def b2Max(*args):
+ """b2Max(b2Vec2 a, b2Vec2 b) -> b2Vec2"""
+ return _Box2D2.b2Max(*args)
+
+def b2Clamp(*args):
+ """b2Clamp(b2Vec2 a, b2Vec2 low, b2Vec2 high) -> b2Vec2"""
+ return _Box2D2.b2Clamp(*args)
+RAND_LIMIT = _Box2D2.RAND_LIMIT
+
+def b2NextPowerOfTwo(*args):
+ """b2NextPowerOfTwo(uint32 x) -> uint32"""
+ return _Box2D2.b2NextPowerOfTwo(*args)
+
+def b2IsPowerOfTwo(*args):
+ """b2IsPowerOfTwo(uint32 x) -> bool"""
+ return _Box2D2.b2IsPowerOfTwo(*args)
+class b2ContactID(object):
+ """Proxy of C++ b2ContactID class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ key = _swig_property(_Box2D2.b2ContactID_key_get, _Box2D2.b2ContactID_key_set)
+ features = _swig_property(_Box2D2.b2ContactID_features_get)
+ def __repr__(self):
+ return "b2ContactID(key: %d Features: \n\t%s)" % \
+ (self.key, self.features)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID"""
+ _Box2D2.b2ContactID_swiginit(self,_Box2D2.new_b2ContactID(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactID
+b2ContactID_swigregister = _Box2D2.b2ContactID_swigregister
+b2ContactID_swigregister(b2ContactID)
+b2Vec2_zero = cvar.b2Vec2_zero
+b2Mat22_identity = cvar.b2Mat22_identity
+b2XForm_identity = cvar.b2XForm_identity
+
+def b2Cross(*args):
+ """
+ b2Cross(b2Vec2 a, b2Vec2 b) -> float32
+ b2Cross(b2Vec2 a, float32 s) -> b2Vec2
+ b2Cross(float32 s, b2Vec2 a) -> b2Vec2
+ """
+ return _Box2D2.b2Cross(*args)
+
+def b2add(*args):
+ """
+ b2add(b2Vec2 a, b2Vec2 b) -> b2Vec2
+ b2add(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ """
+ return _Box2D2.b2add(*args)
+
+def b2Mul(*args):
+ """
+ b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2Mul(*args)
+
+def b2MulT(*args):
+ """
+ b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2
+ b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22
+ b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2
+ """
+ return _Box2D2.b2MulT(*args)
+
+def b2Abs(*args):
+ """
+ b2Abs(float32 a) -> float32
+ b2Abs(b2Vec2 a) -> b2Vec2
+ b2Abs(b2Mat22 A) -> b2Mat22
+ """
+ return _Box2D2.b2Abs(*args)
+
+def b2Random(*args):
+ """
+ b2Random() -> float32
+ b2Random(float32 lo, float32 hi) -> float32
+ """
+ return _Box2D2.b2Random(*args)
+b2_nullFeature = cvar.b2_nullFeature
+
+class b2ContactID_features(object):
+ """Proxy of C++ b2ContactID_features class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ referenceEdge = _swig_property(_Box2D2.b2ContactID_features_referenceEdge_get, _Box2D2.b2ContactID_features_referenceEdge_set)
+ incidentEdge = _swig_property(_Box2D2.b2ContactID_features_incidentEdge_get, _Box2D2.b2ContactID_features_incidentEdge_set)
+ incidentVertex = _swig_property(_Box2D2.b2ContactID_features_incidentVertex_get, _Box2D2.b2ContactID_features_incidentVertex_set)
+ flip = _swig_property(_Box2D2.b2ContactID_features_flip_get, _Box2D2.b2ContactID_features_flip_set)
+ def __repr__(self):
+ return "b2ContactID::Features(\n\treferenceFace: %d incidentEdge: %d incidentVertex: %d flip: %d)" % \
+ (self.referenceFace, self.incidentEdge, self.incidentVertex, self.flip)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactID_features"""
+ _Box2D2.b2ContactID_features_swiginit(self,_Box2D2.new_b2ContactID_features(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactID_features
+b2ContactID_features_swigregister = _Box2D2.b2ContactID_features_swigregister
+b2ContactID_features_swigregister(b2ContactID_features)
+
+class b2ManifoldPoint(object):
+ """Proxy of C++ b2ManifoldPoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ localPoint1 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint1_get, _Box2D2.b2ManifoldPoint_localPoint1_set)
+ localPoint2 = _swig_property(_Box2D2.b2ManifoldPoint_localPoint2_get, _Box2D2.b2ManifoldPoint_localPoint2_set)
+ separation = _swig_property(_Box2D2.b2ManifoldPoint_separation_get, _Box2D2.b2ManifoldPoint_separation_set)
+ normalImpulse = _swig_property(_Box2D2.b2ManifoldPoint_normalImpulse_get, _Box2D2.b2ManifoldPoint_normalImpulse_set)
+ tangentImpulse = _swig_property(_Box2D2.b2ManifoldPoint_tangentImpulse_get, _Box2D2.b2ManifoldPoint_tangentImpulse_set)
+ id = _swig_property(_Box2D2.b2ManifoldPoint_id_get, _Box2D2.b2ManifoldPoint_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ManifoldPoint"""
+ _Box2D2.b2ManifoldPoint_swiginit(self,_Box2D2.new_b2ManifoldPoint(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ManifoldPoint
+b2ManifoldPoint_swigregister = _Box2D2.b2ManifoldPoint_swigregister
+b2ManifoldPoint_swigregister(b2ManifoldPoint)
+
+class b2Manifold(object):
+ """Proxy of C++ b2Manifold class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ points = _swig_property(_Box2D2.b2Manifold_points_get, _Box2D2.b2Manifold_points_set)
+ normal = _swig_property(_Box2D2.b2Manifold_normal_get, _Box2D2.b2Manifold_normal_set)
+ pointCount = _swig_property(_Box2D2.b2Manifold_pointCount_get, _Box2D2.b2Manifold_pointCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Manifold"""
+ _Box2D2.b2Manifold_swiginit(self,_Box2D2.new_b2Manifold(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Manifold
+b2Manifold_swigregister = _Box2D2.b2Manifold_swigregister
+b2Manifold_swigregister(b2Manifold)
+
+class b2Segment(object):
+ """Proxy of C++ b2Segment class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def TestSegment(*args):
+ """TestSegment(self, float32 lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> bool"""
+ return _Box2D2.b2Segment_TestSegment(*args)
+
+ p1 = _swig_property(_Box2D2.b2Segment_p1_get, _Box2D2.b2Segment_p1_set)
+ p2 = _swig_property(_Box2D2.b2Segment_p2_get, _Box2D2.b2Segment_p2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Segment"""
+ _Box2D2.b2Segment_swiginit(self,_Box2D2.new_b2Segment(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Segment
+b2Segment.TestSegment = new_instancemethod(_Box2D2.b2Segment_TestSegment,None,b2Segment)
+b2Segment_swigregister = _Box2D2.b2Segment_swigregister
+b2Segment_swigregister(b2Segment)
+
+class b2AABB(object):
+ """Proxy of C++ b2AABB class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2AABB_IsValid(*args)
+
+ lowerBound = _swig_property(_Box2D2.b2AABB_lowerBound_get, _Box2D2.b2AABB_lowerBound_set)
+ upperBound = _swig_property(_Box2D2.b2AABB_upperBound_get, _Box2D2.b2AABB_upperBound_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2AABB"""
+ _Box2D2.b2AABB_swiginit(self,_Box2D2.new_b2AABB(*args))
+ __swig_destroy__ = _Box2D2.delete_b2AABB
+b2AABB.IsValid = new_instancemethod(_Box2D2.b2AABB_IsValid,None,b2AABB)
+b2AABB_swigregister = _Box2D2.b2AABB_swigregister
+b2AABB_swigregister(b2AABB)
+
+class b2OBB(object):
+ """Proxy of C++ b2OBB class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ R = _swig_property(_Box2D2.b2OBB_R_get, _Box2D2.b2OBB_R_set)
+ center = _swig_property(_Box2D2.b2OBB_center_get, _Box2D2.b2OBB_center_set)
+ extents = _swig_property(_Box2D2.b2OBB_extents_get, _Box2D2.b2OBB_extents_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2OBB"""
+ _Box2D2.b2OBB_swiginit(self,_Box2D2.new_b2OBB(*args))
+ __swig_destroy__ = _Box2D2.delete_b2OBB
+b2OBB_swigregister = _Box2D2.b2OBB_swigregister
+b2OBB_swigregister(b2OBB)
+
+
+def b2CollideCircles(*args):
+ """
+ b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1,
+ b2CircleShape circle2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollideCircles(*args)
+
+def b2CollidePolygonAndCircle(*args):
+ """
+ b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1,
+ b2CircleShape circle, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygonAndCircle(*args)
+
+def b2CollidePolygons(*args):
+ """
+ b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1,
+ b2PolygonShape polygon2, b2XForm xf2)
+ """
+ return _Box2D2.b2CollidePolygons(*args)
+
+def b2TimeOfImpact(*args):
+ """b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32"""
+ return _Box2D2.b2TimeOfImpact(*args)
+
+def b2TestOverlap(*args):
+ """b2TestOverlap(b2AABB a, b2AABB b) -> bool"""
+ return _Box2D2.b2TestOverlap(*args)
+class b2MassData(object):
+ """Proxy of C++ b2MassData class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ mass = _swig_property(_Box2D2.b2MassData_mass_get, _Box2D2.b2MassData_mass_set)
+ center = _swig_property(_Box2D2.b2MassData_center_get, _Box2D2.b2MassData_center_set)
+ I = _swig_property(_Box2D2.b2MassData_I_get, _Box2D2.b2MassData_I_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2MassData"""
+ _Box2D2.b2MassData_swiginit(self,_Box2D2.new_b2MassData(*args))
+ __swig_destroy__ = _Box2D2.delete_b2MassData
+b2MassData_swigregister = _Box2D2.b2MassData_swigregister
+b2MassData_swigregister(b2MassData)
+
+def b2Distance(*args):
+ """
+ b2Distance(b2Vec2 a, b2Vec2 b) -> float32
+ b2Distance(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1,
+ b2Shape shape2, b2XForm xf2) -> float32
+ """
+ return _Box2D2.b2Distance(*args)
+
+class b2FilterData(object):
+ """Proxy of C++ b2FilterData class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ categoryBits = _swig_property(_Box2D2.b2FilterData_categoryBits_get, _Box2D2.b2FilterData_categoryBits_set)
+ maskBits = _swig_property(_Box2D2.b2FilterData_maskBits_get, _Box2D2.b2FilterData_maskBits_set)
+ groupIndex = _swig_property(_Box2D2.b2FilterData_groupIndex_get, _Box2D2.b2FilterData_groupIndex_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2FilterData"""
+ _Box2D2.b2FilterData_swiginit(self,_Box2D2.new_b2FilterData(*args))
+ __swig_destroy__ = _Box2D2.delete_b2FilterData
+b2FilterData_swigregister = _Box2D2.b2FilterData_swigregister
+b2FilterData_swigregister(b2FilterData)
+
+e_unknownShape = _Box2D2.e_unknownShape
+e_circleShape = _Box2D2.e_circleShape
+e_polygonShape = _Box2D2.e_polygonShape
+e_shapeTypeCount = _Box2D2.e_shapeTypeCount
+class b2ShapeDef(object):
+ """Proxy of C++ b2ShapeDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ShapeDef"""
+ _Box2D2.b2ShapeDef_swiginit(self,_Box2D2.new_b2ShapeDef(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ShapeDef
+ type = _swig_property(_Box2D2.b2ShapeDef_type_get, _Box2D2.b2ShapeDef_type_set)
+ userData = _swig_property(_Box2D2.b2ShapeDef_userData_get, _Box2D2.b2ShapeDef_userData_set)
+ friction = _swig_property(_Box2D2.b2ShapeDef_friction_get, _Box2D2.b2ShapeDef_friction_set)
+ restitution = _swig_property(_Box2D2.b2ShapeDef_restitution_get, _Box2D2.b2ShapeDef_restitution_set)
+ density = _swig_property(_Box2D2.b2ShapeDef_density_get, _Box2D2.b2ShapeDef_density_set)
+ isSensor = _swig_property(_Box2D2.b2ShapeDef_isSensor_get, _Box2D2.b2ShapeDef_isSensor_set)
+ filter = _swig_property(_Box2D2.b2ShapeDef_filter_get, _Box2D2.b2ShapeDef_filter_set)
+b2ShapeDef_swigregister = _Box2D2.b2ShapeDef_swigregister
+b2ShapeDef_swigregister(b2ShapeDef)
+
+class b2Shape(object):
+ """Proxy of C++ b2Shape class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> b2ShapeType"""
+ return _Box2D2.b2Shape_GetType(*args)
+
+ def IsSensor(*args):
+ """IsSensor(self) -> bool"""
+ return _Box2D2.b2Shape_IsSensor(*args)
+
+ def SetFilterData(*args):
+ """SetFilterData(self, b2FilterData filter)"""
+ return _Box2D2.b2Shape_SetFilterData(*args)
+
+ def GetFilterData(*args):
+ """GetFilterData(self) -> b2FilterData"""
+ return _Box2D2.b2Shape_GetFilterData(*args)
+
+ def GetBody(*args):
+ """GetBody(self) -> b2Body"""
+ return _Box2D2.b2Shape_GetBody(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Shape"""
+ return _Box2D2.b2Shape_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Shape_SetUserData(*args)
+
+ def TestPoint(*args):
+ """TestPoint(self, b2XForm xf, b2Vec2 p) -> bool"""
+ return _Box2D2.b2Shape_TestPoint(*args)
+
+ def TestSegment(*args):
+ """
+ TestSegment(self, b2XForm xf, float32 lambda, b2Vec2 normal, b2Segment segment,
+ float32 maxLambda) -> bool
+ """
+ return _Box2D2.b2Shape_TestSegment(*args)
+
+ def ComputeAABB(*args):
+ """ComputeAABB(self, b2AABB aabb, b2XForm xf)"""
+ return _Box2D2.b2Shape_ComputeAABB(*args)
+
+ def ComputeSweptAABB(*args):
+ """ComputeSweptAABB(self, b2AABB aabb, b2XForm xf1, b2XForm xf2)"""
+ return _Box2D2.b2Shape_ComputeSweptAABB(*args)
+
+ def ComputeMass(*args):
+ """ComputeMass(self, b2MassData massData)"""
+ return _Box2D2.b2Shape_ComputeMass(*args)
+
+ def GetSweepRadius(*args):
+ """GetSweepRadius(self) -> float32"""
+ return _Box2D2.b2Shape_GetSweepRadius(*args)
+
+ def GetFriction(*args):
+ """GetFriction(self) -> float32"""
+ return _Box2D2.b2Shape_GetFriction(*args)
+
+ def GetRestitution(*args):
+ """GetRestitution(self) -> float32"""
+ return _Box2D2.b2Shape_GetRestitution(*args)
+
+ def __repr__(self):
+ return "b2Shape(from Body %s )" % (self.GetBody())
+ def typeName(self):
+ types = { e_unknownShape : "Unknown",
+ e_circleShape : "Circle",
+ e_polygonShape : "Polygon",
+ e_shapeTypeCount: "ShapeType" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the shape"""
+ return (getattr(self, "as%s" % self.typeName())) ()
+
+ def asCircle(*args):
+ """asCircle(self) -> b2CircleShape"""
+ return _Box2D2.b2Shape_asCircle(*args)
+
+ def asPolygon(*args):
+ """asPolygon(self) -> b2PolygonShape"""
+ return _Box2D2.b2Shape_asPolygon(*args)
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Shape_pyGetUserData(*args)
+
+b2Shape.GetType = new_instancemethod(_Box2D2.b2Shape_GetType,None,b2Shape)
+b2Shape.IsSensor = new_instancemethod(_Box2D2.b2Shape_IsSensor,None,b2Shape)
+b2Shape.SetFilterData = new_instancemethod(_Box2D2.b2Shape_SetFilterData,None,b2Shape)
+b2Shape.GetFilterData = new_instancemethod(_Box2D2.b2Shape_GetFilterData,None,b2Shape)
+b2Shape.GetBody = new_instancemethod(_Box2D2.b2Shape_GetBody,None,b2Shape)
+b2Shape.GetNext = new_instancemethod(_Box2D2.b2Shape_GetNext,None,b2Shape)
+b2Shape.SetUserData = new_instancemethod(_Box2D2.b2Shape_SetUserData,None,b2Shape)
+b2Shape.TestPoint = new_instancemethod(_Box2D2.b2Shape_TestPoint,None,b2Shape)
+b2Shape.TestSegment = new_instancemethod(_Box2D2.b2Shape_TestSegment,None,b2Shape)
+b2Shape.ComputeAABB = new_instancemethod(_Box2D2.b2Shape_ComputeAABB,None,b2Shape)
+b2Shape.ComputeSweptAABB = new_instancemethod(_Box2D2.b2Shape_ComputeSweptAABB,None,b2Shape)
+b2Shape.ComputeMass = new_instancemethod(_Box2D2.b2Shape_ComputeMass,None,b2Shape)
+b2Shape.GetSweepRadius = new_instancemethod(_Box2D2.b2Shape_GetSweepRadius,None,b2Shape)
+b2Shape.GetFriction = new_instancemethod(_Box2D2.b2Shape_GetFriction,None,b2Shape)
+b2Shape.GetRestitution = new_instancemethod(_Box2D2.b2Shape_GetRestitution,None,b2Shape)
+b2Shape.asCircle = new_instancemethod(_Box2D2.b2Shape_asCircle,None,b2Shape)
+b2Shape.asPolygon = new_instancemethod(_Box2D2.b2Shape_asPolygon,None,b2Shape)
+b2Shape.pyGetUserData = new_instancemethod(_Box2D2.b2Shape_pyGetUserData,None,b2Shape)
+b2Shape_swigregister = _Box2D2.b2Shape_swigregister
+b2Shape_swigregister(b2Shape)
+
+def b2JointInfo(self):
+ """Return a rather verbose string representation of a joint"""
+ props = dir(self)
+ ignoreList = ('this', 'thisown', 'next', 'prev', 'm_next', 'm_prev')
+ info = []
+ for prop in dir(self):
+ if prop[:2]=='__' or prop in ignoreList: continue
+ if not callable(getattr(self, prop)):
+ info.append(prop + ":")
+ info.append(str(getattr(self, prop)))
+ return "%s(%s)" % (self.__class__.__name__, " ".join(info))
+
+e_unknownJoint = _Box2D2.e_unknownJoint
+e_revoluteJoint = _Box2D2.e_revoluteJoint
+e_prismaticJoint = _Box2D2.e_prismaticJoint
+e_distanceJoint = _Box2D2.e_distanceJoint
+e_pulleyJoint = _Box2D2.e_pulleyJoint
+e_mouseJoint = _Box2D2.e_mouseJoint
+e_gearJoint = _Box2D2.e_gearJoint
+e_inactiveLimit = _Box2D2.e_inactiveLimit
+e_atLowerLimit = _Box2D2.e_atLowerLimit
+e_atUpperLimit = _Box2D2.e_atUpperLimit
+e_equalLimits = _Box2D2.e_equalLimits
+class b2Jacobian(object):
+ """Proxy of C++ b2Jacobian class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ linear1 = _swig_property(_Box2D2.b2Jacobian_linear1_get, _Box2D2.b2Jacobian_linear1_set)
+ angular1 = _swig_property(_Box2D2.b2Jacobian_angular1_get, _Box2D2.b2Jacobian_angular1_set)
+ linear2 = _swig_property(_Box2D2.b2Jacobian_linear2_get, _Box2D2.b2Jacobian_linear2_set)
+ angular2 = _swig_property(_Box2D2.b2Jacobian_angular2_get, _Box2D2.b2Jacobian_angular2_set)
+ def SetZero(*args):
+ """SetZero(self)"""
+ return _Box2D2.b2Jacobian_SetZero(*args)
+
+ def Set(*args):
+ """Set(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2)"""
+ return _Box2D2.b2Jacobian_Set(*args)
+
+ def Compute(*args):
+ """Compute(self, b2Vec2 x1, float32 a1, b2Vec2 x2, float32 a2) -> float32"""
+ return _Box2D2.b2Jacobian_Compute(*args)
+
+ def __repr__(self):
+ return "b2Jacobian(linear1: %s: linear2: %s angular1: %s angular2: %s)" %\
+ (self.linear1, self.linear2, self.angular1, self.angular2)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2Jacobian"""
+ _Box2D2.b2Jacobian_swiginit(self,_Box2D2.new_b2Jacobian(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Jacobian
+b2Jacobian.SetZero = new_instancemethod(_Box2D2.b2Jacobian_SetZero,None,b2Jacobian)
+b2Jacobian.Set = new_instancemethod(_Box2D2.b2Jacobian_Set,None,b2Jacobian)
+b2Jacobian.Compute = new_instancemethod(_Box2D2.b2Jacobian_Compute,None,b2Jacobian)
+b2Jacobian_swigregister = _Box2D2.b2Jacobian_swigregister
+b2Jacobian_swigregister(b2Jacobian)
+
+class b2JointEdge(object):
+ """Proxy of C++ b2JointEdge class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ other = _swig_property(_Box2D2.b2JointEdge_other_get, _Box2D2.b2JointEdge_other_set)
+ joint = _swig_property(_Box2D2.b2JointEdge_joint_get, _Box2D2.b2JointEdge_joint_set)
+ prev = _swig_property(_Box2D2.b2JointEdge_prev_get, _Box2D2.b2JointEdge_prev_set)
+ next = _swig_property(_Box2D2.b2JointEdge_next_get, _Box2D2.b2JointEdge_next_set)
+ def __repr__(self):
+ return "b2JointEdge(other: %s)" % (self.other)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2JointEdge"""
+ _Box2D2.b2JointEdge_swiginit(self,_Box2D2.new_b2JointEdge(*args))
+ __swig_destroy__ = _Box2D2.delete_b2JointEdge
+b2JointEdge_swigregister = _Box2D2.b2JointEdge_swigregister
+b2JointEdge_swigregister(b2JointEdge)
+
+class b2JointDef(object):
+ """Proxy of C++ b2JointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2JointDef"""
+ _Box2D2.b2JointDef_swiginit(self,_Box2D2.new_b2JointDef(*args))
+ type = _swig_property(_Box2D2.b2JointDef_type_get, _Box2D2.b2JointDef_type_set)
+ userData = _swig_property(_Box2D2.b2JointDef_userData_get, _Box2D2.b2JointDef_userData_set)
+ body1 = _swig_property(_Box2D2.b2JointDef_body1_get, _Box2D2.b2JointDef_body1_set)
+ body2 = _swig_property(_Box2D2.b2JointDef_body2_get, _Box2D2.b2JointDef_body2_set)
+ collideConnected = _swig_property(_Box2D2.b2JointDef_collideConnected_get, _Box2D2.b2JointDef_collideConnected_set)
+ def __repr__(self):
+ return "b2JointDef(body1: %s body2: %s)" % (self.body1, self.body2)
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+
+ __swig_destroy__ = _Box2D2.delete_b2JointDef
+b2JointDef_swigregister = _Box2D2.b2JointDef_swigregister
+b2JointDef_swigregister(b2JointDef)
+
+class b2Joint(object):
+ """Proxy of C++ b2Joint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetType(*args):
+ """GetType(self) -> b2JointType"""
+ return _Box2D2.b2Joint_GetType(*args)
+
+ def GetBody1(*args):
+ """GetBody1(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody1(*args)
+
+ def GetBody2(*args):
+ """GetBody2(self) -> b2Body"""
+ return _Box2D2.b2Joint_GetBody2(*args)
+
+ def GetAnchor1(*args):
+ """GetAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor1(*args)
+
+ def GetAnchor2(*args):
+ """GetAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetAnchor2(*args)
+
+ def GetReactionForce(*args):
+ """GetReactionForce(self) -> b2Vec2"""
+ return _Box2D2.b2Joint_GetReactionForce(*args)
+
+ def GetReactionTorque(*args):
+ """GetReactionTorque(self) -> float32"""
+ return _Box2D2.b2Joint_GetReactionTorque(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Joint"""
+ return _Box2D2.b2Joint_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Joint_SetUserData(*args)
+
+ def __repr__(self):
+ return "b2Joint(m_body1: %s m_body2: %s getAsType(): %s)" % (self.m_body1, self.m_body2, self.getAsType())
+ def typeName(self):
+ types = { e_unknownJoint : "Unknown",
+ e_mouseJoint : "Mouse",
+ e_gearJoint : "Gear",
+ e_distanceJoint : "Distance",
+ e_prismaticJoint: "Prismatic",
+ e_pulleyJoint : "Pulley",
+ e_revoluteJoint : "Revolute" }
+ return types[self.GetType()]
+ def getAsType(self):
+ """Return a typecasted version of the joint"""
+ return (getattr(self, "as%sJoint" % self.typeName())) ()
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Joint_pyGetUserData(*args)
+
+ def asMouseJoint(*args):
+ """asMouseJoint(self) -> b2MouseJoint"""
+ return _Box2D2.b2Joint_asMouseJoint(*args)
+
+ def asGearJoint(*args):
+ """asGearJoint(self) -> b2GearJoint"""
+ return _Box2D2.b2Joint_asGearJoint(*args)
+
+ def asDistanceJoint(*args):
+ """asDistanceJoint(self) -> b2DistanceJoint"""
+ return _Box2D2.b2Joint_asDistanceJoint(*args)
+
+ def asPrismaticJoint(*args):
+ """asPrismaticJoint(self) -> b2PrismaticJoint"""
+ return _Box2D2.b2Joint_asPrismaticJoint(*args)
+
+ def asPulleyJoint(*args):
+ """asPulleyJoint(self) -> b2PulleyJoint"""
+ return _Box2D2.b2Joint_asPulleyJoint(*args)
+
+ def asRevoluteJoint(*args):
+ """asRevoluteJoint(self) -> b2RevoluteJoint"""
+ return _Box2D2.b2Joint_asRevoluteJoint(*args)
+
+b2Joint.GetType = new_instancemethod(_Box2D2.b2Joint_GetType,None,b2Joint)
+b2Joint.GetBody1 = new_instancemethod(_Box2D2.b2Joint_GetBody1,None,b2Joint)
+b2Joint.GetBody2 = new_instancemethod(_Box2D2.b2Joint_GetBody2,None,b2Joint)
+b2Joint.GetAnchor1 = new_instancemethod(_Box2D2.b2Joint_GetAnchor1,None,b2Joint)
+b2Joint.GetAnchor2 = new_instancemethod(_Box2D2.b2Joint_GetAnchor2,None,b2Joint)
+b2Joint.GetReactionForce = new_instancemethod(_Box2D2.b2Joint_GetReactionForce,None,b2Joint)
+b2Joint.GetReactionTorque = new_instancemethod(_Box2D2.b2Joint_GetReactionTorque,None,b2Joint)
+b2Joint.GetNext = new_instancemethod(_Box2D2.b2Joint_GetNext,None,b2Joint)
+b2Joint.SetUserData = new_instancemethod(_Box2D2.b2Joint_SetUserData,None,b2Joint)
+b2Joint.pyGetUserData = new_instancemethod(_Box2D2.b2Joint_pyGetUserData,None,b2Joint)
+b2Joint.asMouseJoint = new_instancemethod(_Box2D2.b2Joint_asMouseJoint,None,b2Joint)
+b2Joint.asGearJoint = new_instancemethod(_Box2D2.b2Joint_asGearJoint,None,b2Joint)
+b2Joint.asDistanceJoint = new_instancemethod(_Box2D2.b2Joint_asDistanceJoint,None,b2Joint)
+b2Joint.asPrismaticJoint = new_instancemethod(_Box2D2.b2Joint_asPrismaticJoint,None,b2Joint)
+b2Joint.asPulleyJoint = new_instancemethod(_Box2D2.b2Joint_asPulleyJoint,None,b2Joint)
+b2Joint.asRevoluteJoint = new_instancemethod(_Box2D2.b2Joint_asRevoluteJoint,None,b2Joint)
+b2Joint_swigregister = _Box2D2.b2Joint_swigregister
+b2Joint_swigregister(b2Joint)
+
+class b2CircleDef(b2ShapeDef):
+ """Proxy of C++ b2CircleDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2CircleDef"""
+ _Box2D2.b2CircleDef_swiginit(self,_Box2D2.new_b2CircleDef(*args))
+ localPosition = _swig_property(_Box2D2.b2CircleDef_localPosition_get, _Box2D2.b2CircleDef_localPosition_set)
+ radius = _swig_property(_Box2D2.b2CircleDef_radius_get, _Box2D2.b2CircleDef_radius_set)
+ __swig_destroy__ = _Box2D2.delete_b2CircleDef
+b2CircleDef_swigregister = _Box2D2.b2CircleDef_swigregister
+b2CircleDef_swigregister(b2CircleDef)
+
+class b2CircleShape(b2Shape):
+ """Proxy of C++ b2CircleShape class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetLocalPosition(*args):
+ """GetLocalPosition(self) -> b2Vec2"""
+ return _Box2D2.b2CircleShape_GetLocalPosition(*args)
+
+ def GetRadius(*args):
+ """GetRadius(self) -> float32"""
+ return _Box2D2.b2CircleShape_GetRadius(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2CircleShape
+b2CircleShape.GetLocalPosition = new_instancemethod(_Box2D2.b2CircleShape_GetLocalPosition,None,b2CircleShape)
+b2CircleShape.GetRadius = new_instancemethod(_Box2D2.b2CircleShape_GetRadius,None,b2CircleShape)
+b2CircleShape_swigregister = _Box2D2.b2CircleShape_swigregister
+b2CircleShape_swigregister(b2CircleShape)
+
+class b2PolygonDef(b2ShapeDef):
+ """Proxy of C++ b2PolygonDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PolygonDef"""
+ _Box2D2.b2PolygonDef_swiginit(self,_Box2D2.new_b2PolygonDef(*args))
+ def SetAsBox(*args):
+ """
+ SetAsBox(self, float32 hx, float32 hy)
+ SetAsBox(self, float32 hx, float32 hy, b2Vec2 center, float32 angle)
+ """
+ return _Box2D2.b2PolygonDef_SetAsBox(*args)
+
+ vertices = _swig_property(_Box2D2.b2PolygonDef_vertices_get, _Box2D2.b2PolygonDef_vertices_set)
+ vertexCount = _swig_property(_Box2D2.b2PolygonDef_vertexCount_get, _Box2D2.b2PolygonDef_vertexCount_set)
+ def __repr__(self):
+ return "b2PolygonDef(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append(self.getVertex(i))
+ return vertices
+ def setVertices_tuple(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) )"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i][0], vertices[i][1])
+ def setVertices_b2Vec2(self, vertices):
+ """Sets all of the vertices (up to b2_maxPolygonVertices) given a tuple
+ in the format ( (x1,y1), (x2,y2) ... (xN,yN) ) where each vertex
+ is a b2Vec2"""
+ if len(vertices) > b2_maxPolygonVertices:
+ raise ValueError
+ self.vertexCount = len(vertices)
+ for i in range(0, self.vertexCount):
+ self.setVertex(i, vertices[i])
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonDef_getVertex(*args)
+
+ def setVertex(*args):
+ """
+ setVertex(self, uint16 vnum, b2Vec2 value)
+ setVertex(self, uint16 vnum, float32 x, float32 y)
+ """
+ return _Box2D2.b2PolygonDef_setVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonDef
+b2PolygonDef.SetAsBox = new_instancemethod(_Box2D2.b2PolygonDef_SetAsBox,None,b2PolygonDef)
+b2PolygonDef.getVertex = new_instancemethod(_Box2D2.b2PolygonDef_getVertex,None,b2PolygonDef)
+b2PolygonDef.setVertex = new_instancemethod(_Box2D2.b2PolygonDef_setVertex,None,b2PolygonDef)
+b2PolygonDef_swigregister = _Box2D2.b2PolygonDef_swigregister
+b2PolygonDef_swigregister(b2PolygonDef)
+
+class b2PolygonShape(b2Shape):
+ """Proxy of C++ b2PolygonShape class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetOBB(*args):
+ """GetOBB(self) -> b2OBB"""
+ return _Box2D2.b2PolygonShape_GetOBB(*args)
+
+ def GetCentroid(*args):
+ """GetCentroid(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCentroid(*args)
+
+ def GetVertexCount(*args):
+ """GetVertexCount(self) -> int32"""
+ return _Box2D2.b2PolygonShape_GetVertexCount(*args)
+
+ def GetCoreVertices(*args):
+ """GetCoreVertices(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetCoreVertices(*args)
+
+ def GetNormals(*args):
+ """GetNormals(self) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetNormals(*args)
+
+ def GetFirstVertex(*args):
+ """GetFirstVertex(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_GetFirstVertex(*args)
+
+ def Centroid(*args):
+ """Centroid(self, b2XForm xf) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Centroid(*args)
+
+ def Support(*args):
+ """Support(self, b2XForm xf, b2Vec2 d) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_Support(*args)
+
+ def __repr__(self):
+ return "b2PolygonShape(vertices: %s count: %d)" % (self.getVertices_tuple(), self.vertexCount)
+ def getVertices_tuple(self):
+ """Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.vertexCount):
+ vertices.append( (self.getVertex(i).x, self.getVertex(i).y ) )
+ return vertices
+ def getVertices_b2Vec2(self):
+ """Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]"""
+ vertices = []
+ for i in range(0, self.GetVertexCount()):
+ vertices.append(self.getVertex(i))
+ return vertices
+
+ def getVertex(*args):
+ """getVertex(self, uint16 vnum) -> b2Vec2"""
+ return _Box2D2.b2PolygonShape_getVertex(*args)
+
+ __swig_destroy__ = _Box2D2.delete_b2PolygonShape
+b2PolygonShape.GetOBB = new_instancemethod(_Box2D2.b2PolygonShape_GetOBB,None,b2PolygonShape)
+b2PolygonShape.GetCentroid = new_instancemethod(_Box2D2.b2PolygonShape_GetCentroid,None,b2PolygonShape)
+b2PolygonShape.GetVertexCount = new_instancemethod(_Box2D2.b2PolygonShape_GetVertexCount,None,b2PolygonShape)
+b2PolygonShape.GetCoreVertices = new_instancemethod(_Box2D2.b2PolygonShape_GetCoreVertices,None,b2PolygonShape)
+b2PolygonShape.GetNormals = new_instancemethod(_Box2D2.b2PolygonShape_GetNormals,None,b2PolygonShape)
+b2PolygonShape.GetFirstVertex = new_instancemethod(_Box2D2.b2PolygonShape_GetFirstVertex,None,b2PolygonShape)
+b2PolygonShape.Centroid = new_instancemethod(_Box2D2.b2PolygonShape_Centroid,None,b2PolygonShape)
+b2PolygonShape.Support = new_instancemethod(_Box2D2.b2PolygonShape_Support,None,b2PolygonShape)
+b2PolygonShape.getVertex = new_instancemethod(_Box2D2.b2PolygonShape_getVertex,None,b2PolygonShape)
+b2PolygonShape_swigregister = _Box2D2.b2PolygonShape_swigregister
+b2PolygonShape_swigregister(b2PolygonShape)
+
+class b2Pair(object):
+ """Proxy of C++ b2Pair class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ e_pairBuffered = _Box2D2.b2Pair_e_pairBuffered
+ e_pairRemoved = _Box2D2.b2Pair_e_pairRemoved
+ e_pairFinal = _Box2D2.b2Pair_e_pairFinal
+ def SetBuffered(*args):
+ """SetBuffered(self)"""
+ return _Box2D2.b2Pair_SetBuffered(*args)
+
+ def ClearBuffered(*args):
+ """ClearBuffered(self)"""
+ return _Box2D2.b2Pair_ClearBuffered(*args)
+
+ def IsBuffered(*args):
+ """IsBuffered(self) -> bool"""
+ return _Box2D2.b2Pair_IsBuffered(*args)
+
+ def SetRemoved(*args):
+ """SetRemoved(self)"""
+ return _Box2D2.b2Pair_SetRemoved(*args)
+
+ def ClearRemoved(*args):
+ """ClearRemoved(self)"""
+ return _Box2D2.b2Pair_ClearRemoved(*args)
+
+ def IsRemoved(*args):
+ """IsRemoved(self) -> bool"""
+ return _Box2D2.b2Pair_IsRemoved(*args)
+
+ def SetFinal(*args):
+ """SetFinal(self)"""
+ return _Box2D2.b2Pair_SetFinal(*args)
+
+ def IsFinal(*args):
+ """IsFinal(self) -> bool"""
+ return _Box2D2.b2Pair_IsFinal(*args)
+
+ userData = _swig_property(_Box2D2.b2Pair_userData_get, _Box2D2.b2Pair_userData_set)
+ proxyId1 = _swig_property(_Box2D2.b2Pair_proxyId1_get, _Box2D2.b2Pair_proxyId1_set)
+ proxyId2 = _swig_property(_Box2D2.b2Pair_proxyId2_get, _Box2D2.b2Pair_proxyId2_set)
+ next = _swig_property(_Box2D2.b2Pair_next_get, _Box2D2.b2Pair_next_set)
+ status = _swig_property(_Box2D2.b2Pair_status_get, _Box2D2.b2Pair_status_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Pair"""
+ _Box2D2.b2Pair_swiginit(self,_Box2D2.new_b2Pair(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Pair
+b2Pair.SetBuffered = new_instancemethod(_Box2D2.b2Pair_SetBuffered,None,b2Pair)
+b2Pair.ClearBuffered = new_instancemethod(_Box2D2.b2Pair_ClearBuffered,None,b2Pair)
+b2Pair.IsBuffered = new_instancemethod(_Box2D2.b2Pair_IsBuffered,None,b2Pair)
+b2Pair.SetRemoved = new_instancemethod(_Box2D2.b2Pair_SetRemoved,None,b2Pair)
+b2Pair.ClearRemoved = new_instancemethod(_Box2D2.b2Pair_ClearRemoved,None,b2Pair)
+b2Pair.IsRemoved = new_instancemethod(_Box2D2.b2Pair_IsRemoved,None,b2Pair)
+b2Pair.SetFinal = new_instancemethod(_Box2D2.b2Pair_SetFinal,None,b2Pair)
+b2Pair.IsFinal = new_instancemethod(_Box2D2.b2Pair_IsFinal,None,b2Pair)
+b2Pair_swigregister = _Box2D2.b2Pair_swigregister
+b2Pair_swigregister(b2Pair)
+b2_nullPair = cvar.b2_nullPair
+b2_nullProxy = cvar.b2_nullProxy
+b2_tableCapacity = cvar.b2_tableCapacity
+b2_tableMask = cvar.b2_tableMask
+
+class b2BufferedPair(object):
+ """Proxy of C++ b2BufferedPair class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ proxyId1 = _swig_property(_Box2D2.b2BufferedPair_proxyId1_get, _Box2D2.b2BufferedPair_proxyId1_set)
+ proxyId2 = _swig_property(_Box2D2.b2BufferedPair_proxyId2_get, _Box2D2.b2BufferedPair_proxyId2_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2BufferedPair"""
+ _Box2D2.b2BufferedPair_swiginit(self,_Box2D2.new_b2BufferedPair(*args))
+ __swig_destroy__ = _Box2D2.delete_b2BufferedPair
+b2BufferedPair_swigregister = _Box2D2.b2BufferedPair_swigregister
+b2BufferedPair_swigregister(b2BufferedPair)
+
+class b2PairCallback(object):
+ """Proxy of C++ b2PairCallback class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2PairCallback
+ def PairAdded(*args):
+ """PairAdded(self, void proxyUserData1, void proxyUserData2) -> void"""
+ return _Box2D2.b2PairCallback_PairAdded(*args)
+
+ def PairRemoved(*args):
+ """PairRemoved(self, void proxyUserData1, void proxyUserData2, void pairUserData)"""
+ return _Box2D2.b2PairCallback_PairRemoved(*args)
+
+b2PairCallback.PairAdded = new_instancemethod(_Box2D2.b2PairCallback_PairAdded,None,b2PairCallback)
+b2PairCallback.PairRemoved = new_instancemethod(_Box2D2.b2PairCallback_PairRemoved,None,b2PairCallback)
+b2PairCallback_swigregister = _Box2D2.b2PairCallback_swigregister
+b2PairCallback_swigregister(b2PairCallback)
+
+class b2PairManager(object):
+ """Proxy of C++ b2PairManager class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PairManager"""
+ _Box2D2.b2PairManager_swiginit(self,_Box2D2.new_b2PairManager(*args))
+ def Initialize(*args):
+ """Initialize(self, b2BroadPhase broadPhase, b2PairCallback callback)"""
+ return _Box2D2.b2PairManager_Initialize(*args)
+
+ def AddBufferedPair(*args):
+ """AddBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_AddBufferedPair(*args)
+
+ def RemoveBufferedPair(*args):
+ """RemoveBufferedPair(self, int32 proxyId1, int32 proxyId2)"""
+ return _Box2D2.b2PairManager_RemoveBufferedPair(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2PairManager_Commit(*args)
+
+ m_broadPhase = _swig_property(_Box2D2.b2PairManager_m_broadPhase_get, _Box2D2.b2PairManager_m_broadPhase_set)
+ m_callback = _swig_property(_Box2D2.b2PairManager_m_callback_get, _Box2D2.b2PairManager_m_callback_set)
+ m_pairs = _swig_property(_Box2D2.b2PairManager_m_pairs_get, _Box2D2.b2PairManager_m_pairs_set)
+ m_freePair = _swig_property(_Box2D2.b2PairManager_m_freePair_get, _Box2D2.b2PairManager_m_freePair_set)
+ m_pairCount = _swig_property(_Box2D2.b2PairManager_m_pairCount_get, _Box2D2.b2PairManager_m_pairCount_set)
+ m_pairBuffer = _swig_property(_Box2D2.b2PairManager_m_pairBuffer_get, _Box2D2.b2PairManager_m_pairBuffer_set)
+ m_pairBufferCount = _swig_property(_Box2D2.b2PairManager_m_pairBufferCount_get, _Box2D2.b2PairManager_m_pairBufferCount_set)
+ m_hashTable = _swig_property(_Box2D2.b2PairManager_m_hashTable_get, _Box2D2.b2PairManager_m_hashTable_set)
+ __swig_destroy__ = _Box2D2.delete_b2PairManager
+b2PairManager.Initialize = new_instancemethod(_Box2D2.b2PairManager_Initialize,None,b2PairManager)
+b2PairManager.AddBufferedPair = new_instancemethod(_Box2D2.b2PairManager_AddBufferedPair,None,b2PairManager)
+b2PairManager.RemoveBufferedPair = new_instancemethod(_Box2D2.b2PairManager_RemoveBufferedPair,None,b2PairManager)
+b2PairManager.Commit = new_instancemethod(_Box2D2.b2PairManager_Commit,None,b2PairManager)
+b2PairManager_swigregister = _Box2D2.b2PairManager_swigregister
+b2PairManager_swigregister(b2PairManager)
+
+class b2Bound(object):
+ """Proxy of C++ b2Bound class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def IsLower(*args):
+ """IsLower(self) -> bool"""
+ return _Box2D2.b2Bound_IsLower(*args)
+
+ def IsUpper(*args):
+ """IsUpper(self) -> bool"""
+ return _Box2D2.b2Bound_IsUpper(*args)
+
+ value = _swig_property(_Box2D2.b2Bound_value_get, _Box2D2.b2Bound_value_set)
+ proxyId = _swig_property(_Box2D2.b2Bound_proxyId_get, _Box2D2.b2Bound_proxyId_set)
+ stabbingCount = _swig_property(_Box2D2.b2Bound_stabbingCount_get, _Box2D2.b2Bound_stabbingCount_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Bound"""
+ _Box2D2.b2Bound_swiginit(self,_Box2D2.new_b2Bound(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Bound
+b2Bound.IsLower = new_instancemethod(_Box2D2.b2Bound_IsLower,None,b2Bound)
+b2Bound.IsUpper = new_instancemethod(_Box2D2.b2Bound_IsUpper,None,b2Bound)
+b2Bound_swigregister = _Box2D2.b2Bound_swigregister
+b2Bound_swigregister(b2Bound)
+b2_invalid = cvar.b2_invalid
+b2_nullEdge = cvar.b2_nullEdge
+
+class b2Proxy(object):
+ """Proxy of C++ b2Proxy class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetNext(*args):
+ """GetNext(self) -> uint16"""
+ return _Box2D2.b2Proxy_GetNext(*args)
+
+ def SetNext(*args):
+ """SetNext(self, uint16 next)"""
+ return _Box2D2.b2Proxy_SetNext(*args)
+
+ def IsValid(*args):
+ """IsValid(self) -> bool"""
+ return _Box2D2.b2Proxy_IsValid(*args)
+
+ lowerBounds = _swig_property(_Box2D2.b2Proxy_lowerBounds_get, _Box2D2.b2Proxy_lowerBounds_set)
+ upperBounds = _swig_property(_Box2D2.b2Proxy_upperBounds_get, _Box2D2.b2Proxy_upperBounds_set)
+ overlapCount = _swig_property(_Box2D2.b2Proxy_overlapCount_get, _Box2D2.b2Proxy_overlapCount_set)
+ timeStamp = _swig_property(_Box2D2.b2Proxy_timeStamp_get, _Box2D2.b2Proxy_timeStamp_set)
+ userData = _swig_property(_Box2D2.b2Proxy_userData_get, _Box2D2.b2Proxy_userData_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2Proxy"""
+ _Box2D2.b2Proxy_swiginit(self,_Box2D2.new_b2Proxy(*args))
+ __swig_destroy__ = _Box2D2.delete_b2Proxy
+b2Proxy.GetNext = new_instancemethod(_Box2D2.b2Proxy_GetNext,None,b2Proxy)
+b2Proxy.SetNext = new_instancemethod(_Box2D2.b2Proxy_SetNext,None,b2Proxy)
+b2Proxy.IsValid = new_instancemethod(_Box2D2.b2Proxy_IsValid,None,b2Proxy)
+b2Proxy_swigregister = _Box2D2.b2Proxy_swigregister
+b2Proxy_swigregister(b2Proxy)
+
+class b2BroadPhase(object):
+ """Proxy of C++ b2BroadPhase class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2PairCallback callback) -> b2BroadPhase"""
+ _Box2D2.b2BroadPhase_swiginit(self,_Box2D2.new_b2BroadPhase(*args))
+ __swig_destroy__ = _Box2D2.delete_b2BroadPhase
+ def InRange(*args):
+ """InRange(self, b2AABB aabb) -> bool"""
+ return _Box2D2.b2BroadPhase_InRange(*args)
+
+ def CreateProxy(*args):
+ """CreateProxy(self, b2AABB aabb, void userData) -> uint16"""
+ return _Box2D2.b2BroadPhase_CreateProxy(*args)
+
+ def DestroyProxy(*args):
+ """DestroyProxy(self, int32 proxyId)"""
+ return _Box2D2.b2BroadPhase_DestroyProxy(*args)
+
+ def MoveProxy(*args):
+ """MoveProxy(self, int32 proxyId, b2AABB aabb)"""
+ return _Box2D2.b2BroadPhase_MoveProxy(*args)
+
+ def Commit(*args):
+ """Commit(self)"""
+ return _Box2D2.b2BroadPhase_Commit(*args)
+
+ def GetProxy(*args):
+ """GetProxy(self, int32 proxyId) -> b2Proxy"""
+ return _Box2D2.b2BroadPhase_GetProxy(*args)
+
+ def Query(*args):
+ """Query(self, b2AABB aabb, void userData, int32 maxCount) -> int32"""
+ return _Box2D2.b2BroadPhase_Query(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2BroadPhase_Validate(*args)
+
+ def ValidatePairs(*args):
+ """ValidatePairs(self)"""
+ return _Box2D2.b2BroadPhase_ValidatePairs(*args)
+
+ m_pairManager = _swig_property(_Box2D2.b2BroadPhase_m_pairManager_get, _Box2D2.b2BroadPhase_m_pairManager_set)
+ m_proxyPool = _swig_property(_Box2D2.b2BroadPhase_m_proxyPool_get, _Box2D2.b2BroadPhase_m_proxyPool_set)
+ m_freeProxy = _swig_property(_Box2D2.b2BroadPhase_m_freeProxy_get, _Box2D2.b2BroadPhase_m_freeProxy_set)
+ m_bounds = _swig_property(_Box2D2.b2BroadPhase_m_bounds_get, _Box2D2.b2BroadPhase_m_bounds_set)
+ m_queryResults = _swig_property(_Box2D2.b2BroadPhase_m_queryResults_get, _Box2D2.b2BroadPhase_m_queryResults_set)
+ m_queryResultCount = _swig_property(_Box2D2.b2BroadPhase_m_queryResultCount_get, _Box2D2.b2BroadPhase_m_queryResultCount_set)
+ m_worldAABB = _swig_property(_Box2D2.b2BroadPhase_m_worldAABB_get, _Box2D2.b2BroadPhase_m_worldAABB_set)
+ m_quantizationFactor = _swig_property(_Box2D2.b2BroadPhase_m_quantizationFactor_get, _Box2D2.b2BroadPhase_m_quantizationFactor_set)
+ m_proxyCount = _swig_property(_Box2D2.b2BroadPhase_m_proxyCount_get, _Box2D2.b2BroadPhase_m_proxyCount_set)
+ m_timeStamp = _swig_property(_Box2D2.b2BroadPhase_m_timeStamp_get, _Box2D2.b2BroadPhase_m_timeStamp_set)
+ s_validate = _swig_property(_Box2D2.b2BroadPhase_s_validate_get, _Box2D2.b2BroadPhase_s_validate_set)
+b2BroadPhase.InRange = new_instancemethod(_Box2D2.b2BroadPhase_InRange,None,b2BroadPhase)
+b2BroadPhase.CreateProxy = new_instancemethod(_Box2D2.b2BroadPhase_CreateProxy,None,b2BroadPhase)
+b2BroadPhase.DestroyProxy = new_instancemethod(_Box2D2.b2BroadPhase_DestroyProxy,None,b2BroadPhase)
+b2BroadPhase.MoveProxy = new_instancemethod(_Box2D2.b2BroadPhase_MoveProxy,None,b2BroadPhase)
+b2BroadPhase.Commit = new_instancemethod(_Box2D2.b2BroadPhase_Commit,None,b2BroadPhase)
+b2BroadPhase.GetProxy = new_instancemethod(_Box2D2.b2BroadPhase_GetProxy,None,b2BroadPhase)
+b2BroadPhase.Query = new_instancemethod(_Box2D2.b2BroadPhase_Query,None,b2BroadPhase)
+b2BroadPhase.Validate = new_instancemethod(_Box2D2.b2BroadPhase_Validate,None,b2BroadPhase)
+b2BroadPhase.ValidatePairs = new_instancemethod(_Box2D2.b2BroadPhase_ValidatePairs,None,b2BroadPhase)
+b2BroadPhase_swigregister = _Box2D2.b2BroadPhase_swigregister
+b2BroadPhase_swigregister(b2BroadPhase)
+
+class b2DestructionListener(object):
+ """Proxy of C++ b2DestructionListener class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2DestructionListener
+ def SayGoodbye(*args):
+ """
+ SayGoodbye(self, b2Joint joint)
+ SayGoodbye(self, b2Shape shape)
+ """
+ return _Box2D2.b2DestructionListener_SayGoodbye(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2DestructionListener"""
+ if self.__class__ == b2DestructionListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ _Box2D2.b2DestructionListener_swiginit(self,_Box2D2.new_b2DestructionListener(*args))
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DestructionListener(self)
+ return weakref_proxy(self)
+b2DestructionListener.SayGoodbye = new_instancemethod(_Box2D2.b2DestructionListener_SayGoodbye,None,b2DestructionListener)
+b2DestructionListener_swigregister = _Box2D2.b2DestructionListener_swigregister
+b2DestructionListener_swigregister(b2DestructionListener)
+
+class b2BoundaryListener(object):
+ """Proxy of C++ b2BoundaryListener class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2BoundaryListener
+ def Violation(*args):
+ """Violation(self, b2Body body)"""
+ return _Box2D2.b2BoundaryListener_Violation(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2BoundaryListener"""
+ if self.__class__ == b2BoundaryListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ _Box2D2.b2BoundaryListener_swiginit(self,_Box2D2.new_b2BoundaryListener(*args))
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2BoundaryListener(self)
+ return weakref_proxy(self)
+b2BoundaryListener.Violation = new_instancemethod(_Box2D2.b2BoundaryListener_Violation,None,b2BoundaryListener)
+b2BoundaryListener_swigregister = _Box2D2.b2BoundaryListener_swigregister
+b2BoundaryListener_swigregister(b2BoundaryListener)
+
+class b2ContactFilter(object):
+ """Proxy of C++ b2ContactFilter class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactFilter
+ def ShouldCollide(*args):
+ """ShouldCollide(self, b2Shape shape1, b2Shape shape2) -> bool"""
+ return _Box2D2.b2ContactFilter_ShouldCollide(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactFilter"""
+ _Box2D2.b2ContactFilter_swiginit(self,_Box2D2.new_b2ContactFilter(*args))
+b2ContactFilter.ShouldCollide = new_instancemethod(_Box2D2.b2ContactFilter_ShouldCollide,None,b2ContactFilter)
+b2ContactFilter_swigregister = _Box2D2.b2ContactFilter_swigregister
+b2ContactFilter_swigregister(b2ContactFilter)
+
+class b2ContactListener(object):
+ """Proxy of C++ b2ContactListener class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ __swig_destroy__ = _Box2D2.delete_b2ContactListener
+ def Add(*args):
+ """Add(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Add(*args)
+
+ def Persist(*args):
+ """Persist(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Persist(*args)
+
+ def Remove(*args):
+ """Remove(self, b2ContactPoint point)"""
+ return _Box2D2.b2ContactListener_Remove(*args)
+
+ def Result(*args):
+ """Result(self, b2ContactResult point)"""
+ return _Box2D2.b2ContactListener_Result(*args)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactListener"""
+ if self.__class__ == b2ContactListener:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ _Box2D2.b2ContactListener_swiginit(self,_Box2D2.new_b2ContactListener(*args))
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2ContactListener(self)
+ return weakref_proxy(self)
+b2ContactListener.Add = new_instancemethod(_Box2D2.b2ContactListener_Add,None,b2ContactListener)
+b2ContactListener.Persist = new_instancemethod(_Box2D2.b2ContactListener_Persist,None,b2ContactListener)
+b2ContactListener.Remove = new_instancemethod(_Box2D2.b2ContactListener_Remove,None,b2ContactListener)
+b2ContactListener.Result = new_instancemethod(_Box2D2.b2ContactListener_Result,None,b2ContactListener)
+b2ContactListener_swigregister = _Box2D2.b2ContactListener_swigregister
+b2ContactListener_swigregister(b2ContactListener)
+
+class b2Color(object):
+ """Proxy of C++ b2Color class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """
+ __init__(self) -> b2Color
+ __init__(self, float32 r, float32 g, float32 b) -> b2Color
+ """
+ _Box2D2.b2Color_swiginit(self,_Box2D2.new_b2Color(*args))
+ r = _swig_property(_Box2D2.b2Color_r_get, _Box2D2.b2Color_r_set)
+ g = _swig_property(_Box2D2.b2Color_g_get, _Box2D2.b2Color_g_set)
+ b = _swig_property(_Box2D2.b2Color_b_get, _Box2D2.b2Color_b_set)
+ __swig_destroy__ = _Box2D2.delete_b2Color
+b2Color_swigregister = _Box2D2.b2Color_swigregister
+b2Color_swigregister(b2Color)
+
+class b2DebugDraw(object):
+ """Proxy of C++ b2DebugDraw class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DebugDraw"""
+ if self.__class__ == b2DebugDraw:
+ args = (None,) + args
+ else:
+ args = (self,) + args
+ _Box2D2.b2DebugDraw_swiginit(self,_Box2D2.new_b2DebugDraw(*args))
+ __swig_destroy__ = _Box2D2.delete_b2DebugDraw
+ e_shapeBit = _Box2D2.b2DebugDraw_e_shapeBit
+ e_jointBit = _Box2D2.b2DebugDraw_e_jointBit
+ e_coreShapeBit = _Box2D2.b2DebugDraw_e_coreShapeBit
+ e_aabbBit = _Box2D2.b2DebugDraw_e_aabbBit
+ e_obbBit = _Box2D2.b2DebugDraw_e_obbBit
+ e_pairBit = _Box2D2.b2DebugDraw_e_pairBit
+ e_centerOfMassBit = _Box2D2.b2DebugDraw_e_centerOfMassBit
+ def SetFlags(*args):
+ """SetFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_SetFlags(*args)
+
+ def GetFlags(*args):
+ """GetFlags(self) -> uint32"""
+ return _Box2D2.b2DebugDraw_GetFlags(*args)
+
+ def AppendFlags(*args):
+ """AppendFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_AppendFlags(*args)
+
+ def ClearFlags(*args):
+ """ClearFlags(self, uint32 flags)"""
+ return _Box2D2.b2DebugDraw_ClearFlags(*args)
+
+ def DrawPolygon(*args):
+ """DrawPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawPolygon(*args)
+
+ def DrawSolidPolygon(*args):
+ """DrawSolidPolygon(self, b2Vec2 vertices, int32 vertexCount, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidPolygon(*args)
+
+ def DrawCircle(*args):
+ """DrawCircle(self, b2Vec2 center, float32 radius, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawCircle(*args)
+
+ def DrawSolidCircle(*args):
+ """DrawSolidCircle(self, b2Vec2 center, float32 radius, b2Vec2 axis, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSolidCircle(*args)
+
+ def DrawSegment(*args):
+ """DrawSegment(self, b2Vec2 p1, b2Vec2 p2, b2Color color)"""
+ return _Box2D2.b2DebugDraw_DrawSegment(*args)
+
+ def DrawXForm(*args):
+ """DrawXForm(self, b2XForm xf)"""
+ return _Box2D2.b2DebugDraw_DrawXForm(*args)
+
+ def __disown__(self):
+ self.this.disown()
+ _Box2D2.disown_b2DebugDraw(self)
+ return weakref_proxy(self)
+b2DebugDraw.SetFlags = new_instancemethod(_Box2D2.b2DebugDraw_SetFlags,None,b2DebugDraw)
+b2DebugDraw.GetFlags = new_instancemethod(_Box2D2.b2DebugDraw_GetFlags,None,b2DebugDraw)
+b2DebugDraw.AppendFlags = new_instancemethod(_Box2D2.b2DebugDraw_AppendFlags,None,b2DebugDraw)
+b2DebugDraw.ClearFlags = new_instancemethod(_Box2D2.b2DebugDraw_ClearFlags,None,b2DebugDraw)
+b2DebugDraw.DrawPolygon = new_instancemethod(_Box2D2.b2DebugDraw_DrawPolygon,None,b2DebugDraw)
+b2DebugDraw.DrawSolidPolygon = new_instancemethod(_Box2D2.b2DebugDraw_DrawSolidPolygon,None,b2DebugDraw)
+b2DebugDraw.DrawCircle = new_instancemethod(_Box2D2.b2DebugDraw_DrawCircle,None,b2DebugDraw)
+b2DebugDraw.DrawSolidCircle = new_instancemethod(_Box2D2.b2DebugDraw_DrawSolidCircle,None,b2DebugDraw)
+b2DebugDraw.DrawSegment = new_instancemethod(_Box2D2.b2DebugDraw_DrawSegment,None,b2DebugDraw)
+b2DebugDraw.DrawXForm = new_instancemethod(_Box2D2.b2DebugDraw_DrawXForm,None,b2DebugDraw)
+b2DebugDraw_swigregister = _Box2D2.b2DebugDraw_swigregister
+b2DebugDraw_swigregister(b2DebugDraw)
+
+class b2BlockAllocator(object):
+ """Proxy of C++ b2BlockAllocator class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BlockAllocator"""
+ _Box2D2.b2BlockAllocator_swiginit(self,_Box2D2.new_b2BlockAllocator(*args))
+ __swig_destroy__ = _Box2D2.delete_b2BlockAllocator
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2BlockAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p, int32 size)"""
+ return _Box2D2.b2BlockAllocator_Free(*args)
+
+ def Clear(*args):
+ """Clear(self)"""
+ return _Box2D2.b2BlockAllocator_Clear(*args)
+
+b2BlockAllocator.Allocate = new_instancemethod(_Box2D2.b2BlockAllocator_Allocate,None,b2BlockAllocator)
+b2BlockAllocator.Free = new_instancemethod(_Box2D2.b2BlockAllocator_Free,None,b2BlockAllocator)
+b2BlockAllocator.Clear = new_instancemethod(_Box2D2.b2BlockAllocator_Clear,None,b2BlockAllocator)
+b2BlockAllocator_swigregister = _Box2D2.b2BlockAllocator_swigregister
+b2BlockAllocator_swigregister(b2BlockAllocator)
+b2_chunkSize = cvar.b2_chunkSize
+b2_maxBlockSize = cvar.b2_maxBlockSize
+b2_blockSizes = cvar.b2_blockSizes
+b2_chunkArrayIncrement = cvar.b2_chunkArrayIncrement
+
+class b2StackEntry(object):
+ """Proxy of C++ b2StackEntry class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ data = _swig_property(_Box2D2.b2StackEntry_data_get, _Box2D2.b2StackEntry_data_set)
+ size = _swig_property(_Box2D2.b2StackEntry_size_get, _Box2D2.b2StackEntry_size_set)
+ usedMalloc = _swig_property(_Box2D2.b2StackEntry_usedMalloc_get, _Box2D2.b2StackEntry_usedMalloc_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2StackEntry"""
+ _Box2D2.b2StackEntry_swiginit(self,_Box2D2.new_b2StackEntry(*args))
+ __swig_destroy__ = _Box2D2.delete_b2StackEntry
+b2StackEntry_swigregister = _Box2D2.b2StackEntry_swigregister
+b2StackEntry_swigregister(b2StackEntry)
+b2_stackSize = cvar.b2_stackSize
+b2_maxStackEntries = cvar.b2_maxStackEntries
+
+class b2StackAllocator(object):
+ """Proxy of C++ b2StackAllocator class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2StackAllocator"""
+ _Box2D2.b2StackAllocator_swiginit(self,_Box2D2.new_b2StackAllocator(*args))
+ __swig_destroy__ = _Box2D2.delete_b2StackAllocator
+ def Allocate(*args):
+ """Allocate(self, int32 size) -> void"""
+ return _Box2D2.b2StackAllocator_Allocate(*args)
+
+ def Free(*args):
+ """Free(self, void p)"""
+ return _Box2D2.b2StackAllocator_Free(*args)
+
+ def GetMaxAllocation(*args):
+ """GetMaxAllocation(self) -> int32"""
+ return _Box2D2.b2StackAllocator_GetMaxAllocation(*args)
+
+b2StackAllocator.Allocate = new_instancemethod(_Box2D2.b2StackAllocator_Allocate,None,b2StackAllocator)
+b2StackAllocator.Free = new_instancemethod(_Box2D2.b2StackAllocator_Free,None,b2StackAllocator)
+b2StackAllocator.GetMaxAllocation = new_instancemethod(_Box2D2.b2StackAllocator_GetMaxAllocation,None,b2StackAllocator)
+b2StackAllocator_swigregister = _Box2D2.b2StackAllocator_swigregister
+b2StackAllocator_swigregister(b2StackAllocator)
+
+class b2ContactRegister(object):
+ """Proxy of C++ b2ContactRegister class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ createFcn = _swig_property(_Box2D2.b2ContactRegister_createFcn_get, _Box2D2.b2ContactRegister_createFcn_set)
+ destroyFcn = _swig_property(_Box2D2.b2ContactRegister_destroyFcn_get, _Box2D2.b2ContactRegister_destroyFcn_set)
+ primary = _swig_property(_Box2D2.b2ContactRegister_primary_get, _Box2D2.b2ContactRegister_primary_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactRegister"""
+ _Box2D2.b2ContactRegister_swiginit(self,_Box2D2.new_b2ContactRegister(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactRegister
+b2ContactRegister_swigregister = _Box2D2.b2ContactRegister_swigregister
+b2ContactRegister_swigregister(b2ContactRegister)
+
+class b2ContactEdge(object):
+ """Proxy of C++ b2ContactEdge class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ other = _swig_property(_Box2D2.b2ContactEdge_other_get, _Box2D2.b2ContactEdge_other_set)
+ contact = _swig_property(_Box2D2.b2ContactEdge_contact_get, _Box2D2.b2ContactEdge_contact_set)
+ prev = _swig_property(_Box2D2.b2ContactEdge_prev_get, _Box2D2.b2ContactEdge_prev_set)
+ next = _swig_property(_Box2D2.b2ContactEdge_next_get, _Box2D2.b2ContactEdge_next_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactEdge"""
+ _Box2D2.b2ContactEdge_swiginit(self,_Box2D2.new_b2ContactEdge(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactEdge
+b2ContactEdge_swigregister = _Box2D2.b2ContactEdge_swigregister
+b2ContactEdge_swigregister(b2ContactEdge)
+
+class b2ContactPoint(object):
+ """Proxy of C++ b2ContactPoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ shape1 = _swig_property(_Box2D2.b2ContactPoint_shape1_get, _Box2D2.b2ContactPoint_shape1_set)
+ shape2 = _swig_property(_Box2D2.b2ContactPoint_shape2_get, _Box2D2.b2ContactPoint_shape2_set)
+ position = _swig_property(_Box2D2.b2ContactPoint_position_get, _Box2D2.b2ContactPoint_position_set)
+ velocity = _swig_property(_Box2D2.b2ContactPoint_velocity_get, _Box2D2.b2ContactPoint_velocity_set)
+ normal = _swig_property(_Box2D2.b2ContactPoint_normal_get, _Box2D2.b2ContactPoint_normal_set)
+ separation = _swig_property(_Box2D2.b2ContactPoint_separation_get, _Box2D2.b2ContactPoint_separation_set)
+ friction = _swig_property(_Box2D2.b2ContactPoint_friction_get, _Box2D2.b2ContactPoint_friction_set)
+ restitution = _swig_property(_Box2D2.b2ContactPoint_restitution_get, _Box2D2.b2ContactPoint_restitution_set)
+ id = _swig_property(_Box2D2.b2ContactPoint_id_get, _Box2D2.b2ContactPoint_id_set)
+ def __repr__(self):
+ return "b2ContactPoint(\n\tid: %s\n\tshape1: %s\n\tshape2: %s\n\tposition: %s\n\tnormal: %s\n\tseparation: %f normalForce: %f tangentForce: %f)" % \
+ (self.id, self.shape1, self.shape2, self.position, self.normal, self.separation, self.normalForce, self.tangentForce)
+
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactPoint"""
+ _Box2D2.b2ContactPoint_swiginit(self,_Box2D2.new_b2ContactPoint(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactPoint
+b2ContactPoint_swigregister = _Box2D2.b2ContactPoint_swigregister
+b2ContactPoint_swigregister(b2ContactPoint)
+
+class b2ContactResult(object):
+ """Proxy of C++ b2ContactResult class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ shape1 = _swig_property(_Box2D2.b2ContactResult_shape1_get, _Box2D2.b2ContactResult_shape1_set)
+ shape2 = _swig_property(_Box2D2.b2ContactResult_shape2_get, _Box2D2.b2ContactResult_shape2_set)
+ position = _swig_property(_Box2D2.b2ContactResult_position_get, _Box2D2.b2ContactResult_position_set)
+ normal = _swig_property(_Box2D2.b2ContactResult_normal_get, _Box2D2.b2ContactResult_normal_set)
+ normalImpulse = _swig_property(_Box2D2.b2ContactResult_normalImpulse_get, _Box2D2.b2ContactResult_normalImpulse_set)
+ tangentImpulse = _swig_property(_Box2D2.b2ContactResult_tangentImpulse_get, _Box2D2.b2ContactResult_tangentImpulse_set)
+ id = _swig_property(_Box2D2.b2ContactResult_id_get, _Box2D2.b2ContactResult_id_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactResult"""
+ _Box2D2.b2ContactResult_swiginit(self,_Box2D2.new_b2ContactResult(*args))
+ __swig_destroy__ = _Box2D2.delete_b2ContactResult
+b2ContactResult_swigregister = _Box2D2.b2ContactResult_swigregister
+b2ContactResult_swigregister(b2ContactResult)
+
+class b2Contact(object):
+ """Proxy of C++ b2Contact class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def GetManifolds(*args):
+ """GetManifolds(self) -> b2Manifold"""
+ return _Box2D2.b2Contact_GetManifolds(*args)
+
+ def GetManifoldCount(*args):
+ """GetManifoldCount(self) -> int32"""
+ return _Box2D2.b2Contact_GetManifoldCount(*args)
+
+ def IsSolid(*args):
+ """IsSolid(self) -> bool"""
+ return _Box2D2.b2Contact_IsSolid(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Contact"""
+ return _Box2D2.b2Contact_GetNext(*args)
+
+ def GetShape1(*args):
+ """GetShape1(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape1(*args)
+
+ def GetShape2(*args):
+ """GetShape2(self) -> b2Shape"""
+ return _Box2D2.b2Contact_GetShape2(*args)
+
+ e_nonSolidFlag = _Box2D2.b2Contact_e_nonSolidFlag
+ e_slowFlag = _Box2D2.b2Contact_e_slowFlag
+ e_islandFlag = _Box2D2.b2Contact_e_islandFlag
+ e_toiFlag = _Box2D2.b2Contact_e_toiFlag
+ def AddType(*args):
+ """
+ AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+ AddType = staticmethod(AddType)
+ def InitializeRegisters(*args):
+ """InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+ InitializeRegisters = staticmethod(InitializeRegisters)
+ def Create(*args):
+ """Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+ Create = staticmethod(Create)
+ def Destroy(*args):
+ """Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+ Destroy = staticmethod(Destroy)
+ __swig_destroy__ = _Box2D2.delete_b2Contact
+ def Update(*args):
+ """Update(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Update(*args)
+
+ def Evaluate(*args):
+ """Evaluate(self, b2ContactListener listener)"""
+ return _Box2D2.b2Contact_Evaluate(*args)
+
+ s_registers = _swig_property(_Box2D2.b2Contact_s_registers_get, _Box2D2.b2Contact_s_registers_set)
+ s_initialized = _swig_property(_Box2D2.b2Contact_s_initialized_get, _Box2D2.b2Contact_s_initialized_set)
+ m_flags = _swig_property(_Box2D2.b2Contact_m_flags_get, _Box2D2.b2Contact_m_flags_set)
+ m_manifoldCount = _swig_property(_Box2D2.b2Contact_m_manifoldCount_get, _Box2D2.b2Contact_m_manifoldCount_set)
+ m_prev = _swig_property(_Box2D2.b2Contact_m_prev_get, _Box2D2.b2Contact_m_prev_set)
+ m_next = _swig_property(_Box2D2.b2Contact_m_next_get, _Box2D2.b2Contact_m_next_set)
+ m_node1 = _swig_property(_Box2D2.b2Contact_m_node1_get, _Box2D2.b2Contact_m_node1_set)
+ m_node2 = _swig_property(_Box2D2.b2Contact_m_node2_get, _Box2D2.b2Contact_m_node2_set)
+ m_shape1 = _swig_property(_Box2D2.b2Contact_m_shape1_get, _Box2D2.b2Contact_m_shape1_set)
+ m_shape2 = _swig_property(_Box2D2.b2Contact_m_shape2_get, _Box2D2.b2Contact_m_shape2_set)
+ m_friction = _swig_property(_Box2D2.b2Contact_m_friction_get, _Box2D2.b2Contact_m_friction_set)
+ m_restitution = _swig_property(_Box2D2.b2Contact_m_restitution_get, _Box2D2.b2Contact_m_restitution_set)
+ m_toi = _swig_property(_Box2D2.b2Contact_m_toi_get, _Box2D2.b2Contact_m_toi_set)
+b2Contact.GetManifolds = new_instancemethod(_Box2D2.b2Contact_GetManifolds,None,b2Contact)
+b2Contact.GetManifoldCount = new_instancemethod(_Box2D2.b2Contact_GetManifoldCount,None,b2Contact)
+b2Contact.IsSolid = new_instancemethod(_Box2D2.b2Contact_IsSolid,None,b2Contact)
+b2Contact.GetNext = new_instancemethod(_Box2D2.b2Contact_GetNext,None,b2Contact)
+b2Contact.GetShape1 = new_instancemethod(_Box2D2.b2Contact_GetShape1,None,b2Contact)
+b2Contact.GetShape2 = new_instancemethod(_Box2D2.b2Contact_GetShape2,None,b2Contact)
+b2Contact.Update = new_instancemethod(_Box2D2.b2Contact_Update,None,b2Contact)
+b2Contact.Evaluate = new_instancemethod(_Box2D2.b2Contact_Evaluate,None,b2Contact)
+b2Contact_swigregister = _Box2D2.b2Contact_swigregister
+b2Contact_swigregister(b2Contact)
+
+def b2Contact_AddType(*args):
+ """
+ b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
+ b2ShapeType type1, b2ShapeType type2)
+ """
+ return _Box2D2.b2Contact_AddType(*args)
+
+def b2Contact_InitializeRegisters(*args):
+ """b2Contact_InitializeRegisters()"""
+ return _Box2D2.b2Contact_InitializeRegisters(*args)
+
+def b2Contact_Create(*args):
+ """b2Contact_Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact"""
+ return _Box2D2.b2Contact_Create(*args)
+
+def b2Contact_Destroy(*args):
+ """b2Contact_Destroy(b2Contact contact, b2BlockAllocator allocator)"""
+ return _Box2D2.b2Contact_Destroy(*args)
+
+class b2NullContact(b2Contact):
+ """Proxy of C++ b2NullContact class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2NullContact"""
+ _Box2D2.b2NullContact_swiginit(self,_Box2D2.new_b2NullContact(*args))
+ __swig_destroy__ = _Box2D2.delete_b2NullContact
+b2NullContact_swigregister = _Box2D2.b2NullContact_swigregister
+b2NullContact_swigregister(b2NullContact)
+
+class b2ContactManager(b2PairCallback):
+ """Proxy of C++ b2ContactManager class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2ContactManager"""
+ _Box2D2.b2ContactManager_swiginit(self,_Box2D2.new_b2ContactManager(*args))
+ def Destroy(*args):
+ """Destroy(self, b2Contact c)"""
+ return _Box2D2.b2ContactManager_Destroy(*args)
+
+ def Collide(*args):
+ """Collide(self)"""
+ return _Box2D2.b2ContactManager_Collide(*args)
+
+ m_world = _swig_property(_Box2D2.b2ContactManager_m_world_get, _Box2D2.b2ContactManager_m_world_set)
+ m_nullContact = _swig_property(_Box2D2.b2ContactManager_m_nullContact_get, _Box2D2.b2ContactManager_m_nullContact_set)
+ m_destroyImmediate = _swig_property(_Box2D2.b2ContactManager_m_destroyImmediate_get, _Box2D2.b2ContactManager_m_destroyImmediate_set)
+ __swig_destroy__ = _Box2D2.delete_b2ContactManager
+b2ContactManager.Destroy = new_instancemethod(_Box2D2.b2ContactManager_Destroy,None,b2ContactManager)
+b2ContactManager.Collide = new_instancemethod(_Box2D2.b2ContactManager_Collide,None,b2ContactManager)
+b2ContactManager_swigregister = _Box2D2.b2ContactManager_swigregister
+b2ContactManager_swigregister(b2ContactManager)
+
+class b2TimeStep(object):
+ """Proxy of C++ b2TimeStep class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ dt = _swig_property(_Box2D2.b2TimeStep_dt_get, _Box2D2.b2TimeStep_dt_set)
+ inv_dt = _swig_property(_Box2D2.b2TimeStep_inv_dt_get, _Box2D2.b2TimeStep_inv_dt_set)
+ dtRatio = _swig_property(_Box2D2.b2TimeStep_dtRatio_get, _Box2D2.b2TimeStep_dtRatio_set)
+ maxIterations = _swig_property(_Box2D2.b2TimeStep_maxIterations_get, _Box2D2.b2TimeStep_maxIterations_set)
+ warmStarting = _swig_property(_Box2D2.b2TimeStep_warmStarting_get, _Box2D2.b2TimeStep_warmStarting_set)
+ positionCorrection = _swig_property(_Box2D2.b2TimeStep_positionCorrection_get, _Box2D2.b2TimeStep_positionCorrection_set)
+ def __init__(self, *args):
+ """__init__(self) -> b2TimeStep"""
+ _Box2D2.b2TimeStep_swiginit(self,_Box2D2.new_b2TimeStep(*args))
+ __swig_destroy__ = _Box2D2.delete_b2TimeStep
+b2TimeStep_swigregister = _Box2D2.b2TimeStep_swigregister
+b2TimeStep_swigregister(b2TimeStep)
+
+class b2World(object):
+ """Proxy of C++ b2World class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2AABB worldAABB, b2Vec2 gravity, bool doSleep) -> b2World"""
+ _Box2D2.b2World_swiginit(self,_Box2D2.new_b2World(*args))
+ __swig_destroy__ = _Box2D2.delete_b2World
+ def SetDestructionListener(*args):
+ """SetDestructionListener(self, b2DestructionListener listener)"""
+ return _Box2D2.b2World_SetDestructionListener(*args)
+
+ def SetBoundaryListener(*args):
+ """SetBoundaryListener(self, b2BoundaryListener listener)"""
+ return _Box2D2.b2World_SetBoundaryListener(*args)
+
+ def SetContactFilter(*args):
+ """SetContactFilter(self, b2ContactFilter filter)"""
+ return _Box2D2.b2World_SetContactFilter(*args)
+
+ def SetContactListener(*args):
+ """SetContactListener(self, b2ContactListener listener)"""
+ return _Box2D2.b2World_SetContactListener(*args)
+
+ def SetDebugDraw(*args):
+ """SetDebugDraw(self, b2DebugDraw debugDraw)"""
+ return _Box2D2.b2World_SetDebugDraw(*args)
+
+ def CreateBody(*args):
+ """CreateBody(self, b2BodyDef def) -> b2Body"""
+ return _Box2D2.b2World_CreateBody(*args)
+
+ def DestroyBody(*args):
+ """DestroyBody(self, b2Body body)"""
+ return _Box2D2.b2World_DestroyBody(*args)
+
+ def CreateJoint(*args):
+ """CreateJoint(self, b2JointDef def) -> b2Joint"""
+ return _Box2D2.b2World_CreateJoint(*args)
+
+ def DestroyJoint(*args):
+ """DestroyJoint(self, b2Joint joint)"""
+ return _Box2D2.b2World_DestroyJoint(*args)
+
+ def GetGroundBody(*args):
+ """GetGroundBody(self) -> b2Body"""
+ return _Box2D2.b2World_GetGroundBody(*args)
+
+ def Step(*args):
+ """Step(self, float32 timeStep, int32 iterations)"""
+ return _Box2D2.b2World_Step(*args)
+
+ def GetBodyList(*args):
+ """GetBodyList(self) -> b2Body"""
+ return _Box2D2.b2World_GetBodyList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2Joint"""
+ return _Box2D2.b2World_GetJointList(*args)
+
+ def Refilter(*args):
+ """Refilter(self, b2Shape shape)"""
+ return _Box2D2.b2World_Refilter(*args)
+
+ def SetWarmStarting(*args):
+ """SetWarmStarting(self, bool flag)"""
+ return _Box2D2.b2World_SetWarmStarting(*args)
+
+ def SetPositionCorrection(*args):
+ """SetPositionCorrection(self, bool flag)"""
+ return _Box2D2.b2World_SetPositionCorrection(*args)
+
+ def SetContinuousPhysics(*args):
+ """SetContinuousPhysics(self, bool flag)"""
+ return _Box2D2.b2World_SetContinuousPhysics(*args)
+
+ def Validate(*args):
+ """Validate(self)"""
+ return _Box2D2.b2World_Validate(*args)
+
+ def GetProxyCount(*args):
+ """GetProxyCount(self) -> int32"""
+ return _Box2D2.b2World_GetProxyCount(*args)
+
+ def GetPairCount(*args):
+ """GetPairCount(self) -> int32"""
+ return _Box2D2.b2World_GetPairCount(*args)
+
+ def GetBodyCount(*args):
+ """GetBodyCount(self) -> int32"""
+ return _Box2D2.b2World_GetBodyCount(*args)
+
+ def GetJointCount(*args):
+ """GetJointCount(self) -> int32"""
+ return _Box2D2.b2World_GetJointCount(*args)
+
+ def GetContactCount(*args):
+ """GetContactCount(self) -> int32"""
+ return _Box2D2.b2World_GetContactCount(*args)
+
+ def SetGravity(*args):
+ """SetGravity(self, b2Vec2 gravity)"""
+ return _Box2D2.b2World_SetGravity(*args)
+
+ def Query(*args):
+ """
+ Query(self, b2AABB aabb, b2Shape shapes, int32 maxCount) -> int32
+ Query(self, b2AABB aabb, uint32 maxCount) -> PyObject
+ """
+ return _Box2D2.b2World_Query(*args)
+
+b2World.SetDestructionListener = new_instancemethod(_Box2D2.b2World_SetDestructionListener,None,b2World)
+b2World.SetBoundaryListener = new_instancemethod(_Box2D2.b2World_SetBoundaryListener,None,b2World)
+b2World.SetContactFilter = new_instancemethod(_Box2D2.b2World_SetContactFilter,None,b2World)
+b2World.SetContactListener = new_instancemethod(_Box2D2.b2World_SetContactListener,None,b2World)
+b2World.SetDebugDraw = new_instancemethod(_Box2D2.b2World_SetDebugDraw,None,b2World)
+b2World.CreateBody = new_instancemethod(_Box2D2.b2World_CreateBody,None,b2World)
+b2World.DestroyBody = new_instancemethod(_Box2D2.b2World_DestroyBody,None,b2World)
+b2World.CreateJoint = new_instancemethod(_Box2D2.b2World_CreateJoint,None,b2World)
+b2World.DestroyJoint = new_instancemethod(_Box2D2.b2World_DestroyJoint,None,b2World)
+b2World.GetGroundBody = new_instancemethod(_Box2D2.b2World_GetGroundBody,None,b2World)
+b2World.Step = new_instancemethod(_Box2D2.b2World_Step,None,b2World)
+b2World.GetBodyList = new_instancemethod(_Box2D2.b2World_GetBodyList,None,b2World)
+b2World.GetJointList = new_instancemethod(_Box2D2.b2World_GetJointList,None,b2World)
+b2World.Refilter = new_instancemethod(_Box2D2.b2World_Refilter,None,b2World)
+b2World.SetWarmStarting = new_instancemethod(_Box2D2.b2World_SetWarmStarting,None,b2World)
+b2World.SetPositionCorrection = new_instancemethod(_Box2D2.b2World_SetPositionCorrection,None,b2World)
+b2World.SetContinuousPhysics = new_instancemethod(_Box2D2.b2World_SetContinuousPhysics,None,b2World)
+b2World.Validate = new_instancemethod(_Box2D2.b2World_Validate,None,b2World)
+b2World.GetProxyCount = new_instancemethod(_Box2D2.b2World_GetProxyCount,None,b2World)
+b2World.GetPairCount = new_instancemethod(_Box2D2.b2World_GetPairCount,None,b2World)
+b2World.GetBodyCount = new_instancemethod(_Box2D2.b2World_GetBodyCount,None,b2World)
+b2World.GetJointCount = new_instancemethod(_Box2D2.b2World_GetJointCount,None,b2World)
+b2World.GetContactCount = new_instancemethod(_Box2D2.b2World_GetContactCount,None,b2World)
+b2World.SetGravity = new_instancemethod(_Box2D2.b2World_SetGravity,None,b2World)
+b2World.Query = new_instancemethod(_Box2D2.b2World_Query,None,b2World)
+b2World_swigregister = _Box2D2.b2World_swigregister
+b2World_swigregister(b2World)
+
+class b2BodyDef(object):
+ """Proxy of C++ b2BodyDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2BodyDef"""
+ _Box2D2.b2BodyDef_swiginit(self,_Box2D2.new_b2BodyDef(*args))
+ massData = _swig_property(_Box2D2.b2BodyDef_massData_get, _Box2D2.b2BodyDef_massData_set)
+ userData = _swig_property(_Box2D2.b2BodyDef_userData_get, _Box2D2.b2BodyDef_userData_set)
+ position = _swig_property(_Box2D2.b2BodyDef_position_get, _Box2D2.b2BodyDef_position_set)
+ angle = _swig_property(_Box2D2.b2BodyDef_angle_get, _Box2D2.b2BodyDef_angle_set)
+ linearDamping = _swig_property(_Box2D2.b2BodyDef_linearDamping_get, _Box2D2.b2BodyDef_linearDamping_set)
+ angularDamping = _swig_property(_Box2D2.b2BodyDef_angularDamping_get, _Box2D2.b2BodyDef_angularDamping_set)
+ allowSleep = _swig_property(_Box2D2.b2BodyDef_allowSleep_get, _Box2D2.b2BodyDef_allowSleep_set)
+ isSleeping = _swig_property(_Box2D2.b2BodyDef_isSleeping_get, _Box2D2.b2BodyDef_isSleeping_set)
+ fixedRotation = _swig_property(_Box2D2.b2BodyDef_fixedRotation_get, _Box2D2.b2BodyDef_fixedRotation_set)
+ isBullet = _swig_property(_Box2D2.b2BodyDef_isBullet_get, _Box2D2.b2BodyDef_isBullet_set)
+ __swig_destroy__ = _Box2D2.delete_b2BodyDef
+b2BodyDef_swigregister = _Box2D2.b2BodyDef_swigregister
+b2BodyDef_swigregister(b2BodyDef)
+
+class b2Body(object):
+ """Proxy of C++ b2Body class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ def __init__(self): raise AttributeError, "No constructor defined"
+ __repr__ = _swig_repr
+ def CreateShape(*args):
+ """CreateShape(self, b2ShapeDef shapeDef) -> b2Shape"""
+ return _Box2D2.b2Body_CreateShape(*args)
+
+ def DestroyShape(*args):
+ """DestroyShape(self, b2Shape shape)"""
+ return _Box2D2.b2Body_DestroyShape(*args)
+
+ def SetMass(*args):
+ """SetMass(self, b2MassData massData)"""
+ return _Box2D2.b2Body_SetMass(*args)
+
+ def SetMassFromShapes(*args):
+ """SetMassFromShapes(self)"""
+ return _Box2D2.b2Body_SetMassFromShapes(*args)
+
+ def SetXForm(*args):
+ """SetXForm(self, b2Vec2 position, float32 angle) -> bool"""
+ return _Box2D2.b2Body_SetXForm(*args)
+
+ def GetXForm(*args):
+ """GetXForm(self) -> b2XForm"""
+ return _Box2D2.b2Body_GetXForm(*args)
+
+ def GetPosition(*args):
+ """GetPosition(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetPosition(*args)
+
+ def GetAngle(*args):
+ """GetAngle(self) -> float32"""
+ return _Box2D2.b2Body_GetAngle(*args)
+
+ def GetWorldCenter(*args):
+ """GetWorldCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldCenter(*args)
+
+ def GetLocalCenter(*args):
+ """GetLocalCenter(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalCenter(*args)
+
+ def SetLinearVelocity(*args):
+ """SetLinearVelocity(self, b2Vec2 v)"""
+ return _Box2D2.b2Body_SetLinearVelocity(*args)
+
+ def GetLinearVelocity(*args):
+ """GetLinearVelocity(self) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocity(*args)
+
+ def SetAngularVelocity(*args):
+ """SetAngularVelocity(self, float32 omega)"""
+ return _Box2D2.b2Body_SetAngularVelocity(*args)
+
+ def GetAngularVelocity(*args):
+ """GetAngularVelocity(self) -> float32"""
+ return _Box2D2.b2Body_GetAngularVelocity(*args)
+
+ def ApplyForce(*args):
+ """ApplyForce(self, b2Vec2 force, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyForce(*args)
+
+ def ApplyTorque(*args):
+ """ApplyTorque(self, float32 torque)"""
+ return _Box2D2.b2Body_ApplyTorque(*args)
+
+ def ApplyImpulse(*args):
+ """ApplyImpulse(self, b2Vec2 impulse, b2Vec2 point)"""
+ return _Box2D2.b2Body_ApplyImpulse(*args)
+
+ def GetMass(*args):
+ """GetMass(self) -> float32"""
+ return _Box2D2.b2Body_GetMass(*args)
+
+ def GetInertia(*args):
+ """GetInertia(self) -> float32"""
+ return _Box2D2.b2Body_GetInertia(*args)
+
+ def GetWorldPoint(*args):
+ """GetWorldPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldPoint(*args)
+
+ def GetWorldVector(*args):
+ """GetWorldVector(self, b2Vec2 localVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetWorldVector(*args)
+
+ def GetLocalPoint(*args):
+ """GetLocalPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalPoint(*args)
+
+ def GetLocalVector(*args):
+ """GetLocalVector(self, b2Vec2 worldVector) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLocalVector(*args)
+
+ def GetLinearVelocityFromWorldPoint(*args):
+ """GetLinearVelocityFromWorldPoint(self, b2Vec2 worldPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromWorldPoint(*args)
+
+ def GetLinearVelocityFromLocalPoint(*args):
+ """GetLinearVelocityFromLocalPoint(self, b2Vec2 localPoint) -> b2Vec2"""
+ return _Box2D2.b2Body_GetLinearVelocityFromLocalPoint(*args)
+
+ def IsBullet(*args):
+ """IsBullet(self) -> bool"""
+ return _Box2D2.b2Body_IsBullet(*args)
+
+ def SetBullet(*args):
+ """SetBullet(self, bool flag)"""
+ return _Box2D2.b2Body_SetBullet(*args)
+
+ def IsStatic(*args):
+ """IsStatic(self) -> bool"""
+ return _Box2D2.b2Body_IsStatic(*args)
+
+ def IsDynamic(*args):
+ """IsDynamic(self) -> bool"""
+ return _Box2D2.b2Body_IsDynamic(*args)
+
+ def IsFrozen(*args):
+ """IsFrozen(self) -> bool"""
+ return _Box2D2.b2Body_IsFrozen(*args)
+
+ def IsSleeping(*args):
+ """IsSleeping(self) -> bool"""
+ return _Box2D2.b2Body_IsSleeping(*args)
+
+ def AllowSleeping(*args):
+ """AllowSleeping(self, bool flag)"""
+ return _Box2D2.b2Body_AllowSleeping(*args)
+
+ def WakeUp(*args):
+ """WakeUp(self)"""
+ return _Box2D2.b2Body_WakeUp(*args)
+
+ def PutToSleep(*args):
+ """PutToSleep(self)"""
+ return _Box2D2.b2Body_PutToSleep(*args)
+
+ def GetShapeList(*args):
+ """GetShapeList(self) -> b2Shape"""
+ return _Box2D2.b2Body_GetShapeList(*args)
+
+ def GetJointList(*args):
+ """GetJointList(self) -> b2JointEdge"""
+ return _Box2D2.b2Body_GetJointList(*args)
+
+ def GetNext(*args):
+ """GetNext(self) -> b2Body"""
+ return _Box2D2.b2Body_GetNext(*args)
+
+ def GetUserData(self): # override the C++ version as it does not work.
+ """Get the specified userData (m_userData)"""
+ return self.pyGetUserData()
+
+
+ def SetUserData(*args):
+ """SetUserData(self, void data)"""
+ return _Box2D2.b2Body_SetUserData(*args)
+
+ def GetWorld(*args):
+ """GetWorld(self) -> b2World"""
+ return _Box2D2.b2Body_GetWorld(*args)
+
+ def __repr__(self):
+ return "b2Body(Position: %s)" % (self.GetPosition())
+
+ def pyGetUserData(*args):
+ """pyGetUserData(self) -> PyObject"""
+ return _Box2D2.b2Body_pyGetUserData(*args)
+
+b2Body.CreateShape = new_instancemethod(_Box2D2.b2Body_CreateShape,None,b2Body)
+b2Body.DestroyShape = new_instancemethod(_Box2D2.b2Body_DestroyShape,None,b2Body)
+b2Body.SetMass = new_instancemethod(_Box2D2.b2Body_SetMass,None,b2Body)
+b2Body.SetMassFromShapes = new_instancemethod(_Box2D2.b2Body_SetMassFromShapes,None,b2Body)
+b2Body.SetXForm = new_instancemethod(_Box2D2.b2Body_SetXForm,None,b2Body)
+b2Body.GetXForm = new_instancemethod(_Box2D2.b2Body_GetXForm,None,b2Body)
+b2Body.GetPosition = new_instancemethod(_Box2D2.b2Body_GetPosition,None,b2Body)
+b2Body.GetAngle = new_instancemethod(_Box2D2.b2Body_GetAngle,None,b2Body)
+b2Body.GetWorldCenter = new_instancemethod(_Box2D2.b2Body_GetWorldCenter,None,b2Body)
+b2Body.GetLocalCenter = new_instancemethod(_Box2D2.b2Body_GetLocalCenter,None,b2Body)
+b2Body.SetLinearVelocity = new_instancemethod(_Box2D2.b2Body_SetLinearVelocity,None,b2Body)
+b2Body.GetLinearVelocity = new_instancemethod(_Box2D2.b2Body_GetLinearVelocity,None,b2Body)
+b2Body.SetAngularVelocity = new_instancemethod(_Box2D2.b2Body_SetAngularVelocity,None,b2Body)
+b2Body.GetAngularVelocity = new_instancemethod(_Box2D2.b2Body_GetAngularVelocity,None,b2Body)
+b2Body.ApplyForce = new_instancemethod(_Box2D2.b2Body_ApplyForce,None,b2Body)
+b2Body.ApplyTorque = new_instancemethod(_Box2D2.b2Body_ApplyTorque,None,b2Body)
+b2Body.ApplyImpulse = new_instancemethod(_Box2D2.b2Body_ApplyImpulse,None,b2Body)
+b2Body.GetMass = new_instancemethod(_Box2D2.b2Body_GetMass,None,b2Body)
+b2Body.GetInertia = new_instancemethod(_Box2D2.b2Body_GetInertia,None,b2Body)
+b2Body.GetWorldPoint = new_instancemethod(_Box2D2.b2Body_GetWorldPoint,None,b2Body)
+b2Body.GetWorldVector = new_instancemethod(_Box2D2.b2Body_GetWorldVector,None,b2Body)
+b2Body.GetLocalPoint = new_instancemethod(_Box2D2.b2Body_GetLocalPoint,None,b2Body)
+b2Body.GetLocalVector = new_instancemethod(_Box2D2.b2Body_GetLocalVector,None,b2Body)
+b2Body.GetLinearVelocityFromWorldPoint = new_instancemethod(_Box2D2.b2Body_GetLinearVelocityFromWorldPoint,None,b2Body)
+b2Body.GetLinearVelocityFromLocalPoint = new_instancemethod(_Box2D2.b2Body_GetLinearVelocityFromLocalPoint,None,b2Body)
+b2Body.IsBullet = new_instancemethod(_Box2D2.b2Body_IsBullet,None,b2Body)
+b2Body.SetBullet = new_instancemethod(_Box2D2.b2Body_SetBullet,None,b2Body)
+b2Body.IsStatic = new_instancemethod(_Box2D2.b2Body_IsStatic,None,b2Body)
+b2Body.IsDynamic = new_instancemethod(_Box2D2.b2Body_IsDynamic,None,b2Body)
+b2Body.IsFrozen = new_instancemethod(_Box2D2.b2Body_IsFrozen,None,b2Body)
+b2Body.IsSleeping = new_instancemethod(_Box2D2.b2Body_IsSleeping,None,b2Body)
+b2Body.AllowSleeping = new_instancemethod(_Box2D2.b2Body_AllowSleeping,None,b2Body)
+b2Body.WakeUp = new_instancemethod(_Box2D2.b2Body_WakeUp,None,b2Body)
+b2Body.PutToSleep = new_instancemethod(_Box2D2.b2Body_PutToSleep,None,b2Body)
+b2Body.GetShapeList = new_instancemethod(_Box2D2.b2Body_GetShapeList,None,b2Body)
+b2Body.GetJointList = new_instancemethod(_Box2D2.b2Body_GetJointList,None,b2Body)
+b2Body.GetNext = new_instancemethod(_Box2D2.b2Body_GetNext,None,b2Body)
+b2Body.SetUserData = new_instancemethod(_Box2D2.b2Body_SetUserData,None,b2Body)
+b2Body.GetWorld = new_instancemethod(_Box2D2.b2Body_GetWorld,None,b2Body)
+b2Body.pyGetUserData = new_instancemethod(_Box2D2.b2Body_pyGetUserData,None,b2Body)
+b2Body_swigregister = _Box2D2.b2Body_swigregister
+b2Body_swigregister(b2Body)
+
+class b2DistanceJointDef(b2JointDef):
+ """Proxy of C++ b2DistanceJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2DistanceJointDef"""
+ _Box2D2.b2DistanceJointDef_swiginit(self,_Box2D2.new_b2DistanceJointDef(*args))
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor1, b2Vec2 anchor2)"""
+ return _Box2D2.b2DistanceJointDef_Initialize(*args)
+
+ localAnchor1 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor1_get, _Box2D2.b2DistanceJointDef_localAnchor1_set)
+ localAnchor2 = _swig_property(_Box2D2.b2DistanceJointDef_localAnchor2_get, _Box2D2.b2DistanceJointDef_localAnchor2_set)
+ length = _swig_property(_Box2D2.b2DistanceJointDef_length_get, _Box2D2.b2DistanceJointDef_length_set)
+ frequencyHz = _swig_property(_Box2D2.b2DistanceJointDef_frequencyHz_get, _Box2D2.b2DistanceJointDef_frequencyHz_set)
+ dampingRatio = _swig_property(_Box2D2.b2DistanceJointDef_dampingRatio_get, _Box2D2.b2DistanceJointDef_dampingRatio_set)
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJointDef
+b2DistanceJointDef.Initialize = new_instancemethod(_Box2D2.b2DistanceJointDef_Initialize,None,b2DistanceJointDef)
+b2DistanceJointDef_swigregister = _Box2D2.b2DistanceJointDef_swigregister
+b2DistanceJointDef_swigregister(b2DistanceJointDef)
+
+class b2DistanceJoint(b2Joint):
+ """Proxy of C++ b2DistanceJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self, b2DistanceJointDef data) -> b2DistanceJoint"""
+ _Box2D2.b2DistanceJoint_swiginit(self,_Box2D2.new_b2DistanceJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2DistanceJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2DistanceJoint_SolvePositionConstraints(*args)
+
+ m_localAnchor1 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor1_get, _Box2D2.b2DistanceJoint_m_localAnchor1_set)
+ m_localAnchor2 = _swig_property(_Box2D2.b2DistanceJoint_m_localAnchor2_get, _Box2D2.b2DistanceJoint_m_localAnchor2_set)
+ m_u = _swig_property(_Box2D2.b2DistanceJoint_m_u_get, _Box2D2.b2DistanceJoint_m_u_set)
+ m_frequencyHz = _swig_property(_Box2D2.b2DistanceJoint_m_frequencyHz_get, _Box2D2.b2DistanceJoint_m_frequencyHz_set)
+ m_dampingRatio = _swig_property(_Box2D2.b2DistanceJoint_m_dampingRatio_get, _Box2D2.b2DistanceJoint_m_dampingRatio_set)
+ m_gamma = _swig_property(_Box2D2.b2DistanceJoint_m_gamma_get, _Box2D2.b2DistanceJoint_m_gamma_set)
+ m_bias = _swig_property(_Box2D2.b2DistanceJoint_m_bias_get, _Box2D2.b2DistanceJoint_m_bias_set)
+ m_impulse = _swig_property(_Box2D2.b2DistanceJoint_m_impulse_get, _Box2D2.b2DistanceJoint_m_impulse_set)
+ m_mass = _swig_property(_Box2D2.b2DistanceJoint_m_mass_get, _Box2D2.b2DistanceJoint_m_mass_set)
+ m_length = _swig_property(_Box2D2.b2DistanceJoint_m_length_get, _Box2D2.b2DistanceJoint_m_length_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2DistanceJoint
+b2DistanceJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2DistanceJoint_InitVelocityConstraints,None,b2DistanceJoint)
+b2DistanceJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2DistanceJoint_SolveVelocityConstraints,None,b2DistanceJoint)
+b2DistanceJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2DistanceJoint_SolvePositionConstraints,None,b2DistanceJoint)
+b2DistanceJoint_swigregister = _Box2D2.b2DistanceJoint_swigregister
+b2DistanceJoint_swigregister(b2DistanceJoint)
+
+class b2MouseJointDef(b2JointDef):
+ """Proxy of C++ b2MouseJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2MouseJointDef"""
+ _Box2D2.b2MouseJointDef_swiginit(self,_Box2D2.new_b2MouseJointDef(*args))
+ target = _swig_property(_Box2D2.b2MouseJointDef_target_get, _Box2D2.b2MouseJointDef_target_set)
+ maxForce = _swig_property(_Box2D2.b2MouseJointDef_maxForce_get, _Box2D2.b2MouseJointDef_maxForce_set)
+ frequencyHz = _swig_property(_Box2D2.b2MouseJointDef_frequencyHz_get, _Box2D2.b2MouseJointDef_frequencyHz_set)
+ dampingRatio = _swig_property(_Box2D2.b2MouseJointDef_dampingRatio_get, _Box2D2.b2MouseJointDef_dampingRatio_set)
+ timeStep = _swig_property(_Box2D2.b2MouseJointDef_timeStep_get, _Box2D2.b2MouseJointDef_timeStep_set)
+ __swig_destroy__ = _Box2D2.delete_b2MouseJointDef
+b2MouseJointDef_swigregister = _Box2D2.b2MouseJointDef_swigregister
+b2MouseJointDef_swigregister(b2MouseJointDef)
+
+class b2MouseJoint(b2Joint):
+ """Proxy of C++ b2MouseJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def SetTarget(*args):
+ """SetTarget(self, b2Vec2 target)"""
+ return _Box2D2.b2MouseJoint_SetTarget(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2MouseJointDef def) -> b2MouseJoint"""
+ _Box2D2.b2MouseJoint_swiginit(self,_Box2D2.new_b2MouseJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2MouseJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2MouseJoint_SolvePositionConstraints(*args)
+
+ m_localAnchor = _swig_property(_Box2D2.b2MouseJoint_m_localAnchor_get, _Box2D2.b2MouseJoint_m_localAnchor_set)
+ m_target = _swig_property(_Box2D2.b2MouseJoint_m_target_get, _Box2D2.b2MouseJoint_m_target_set)
+ m_impulse = _swig_property(_Box2D2.b2MouseJoint_m_impulse_get, _Box2D2.b2MouseJoint_m_impulse_set)
+ m_mass = _swig_property(_Box2D2.b2MouseJoint_m_mass_get, _Box2D2.b2MouseJoint_m_mass_set)
+ m_C = _swig_property(_Box2D2.b2MouseJoint_m_C_get, _Box2D2.b2MouseJoint_m_C_set)
+ m_maxForce = _swig_property(_Box2D2.b2MouseJoint_m_maxForce_get, _Box2D2.b2MouseJoint_m_maxForce_set)
+ m_beta = _swig_property(_Box2D2.b2MouseJoint_m_beta_get, _Box2D2.b2MouseJoint_m_beta_set)
+ m_gamma = _swig_property(_Box2D2.b2MouseJoint_m_gamma_get, _Box2D2.b2MouseJoint_m_gamma_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2MouseJoint
+b2MouseJoint.SetTarget = new_instancemethod(_Box2D2.b2MouseJoint_SetTarget,None,b2MouseJoint)
+b2MouseJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2MouseJoint_InitVelocityConstraints,None,b2MouseJoint)
+b2MouseJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2MouseJoint_SolveVelocityConstraints,None,b2MouseJoint)
+b2MouseJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2MouseJoint_SolvePositionConstraints,None,b2MouseJoint)
+b2MouseJoint_swigregister = _Box2D2.b2MouseJoint_swigregister
+b2MouseJoint_swigregister(b2MouseJoint)
+
+class b2PrismaticJointDef(b2JointDef):
+ """Proxy of C++ b2PrismaticJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PrismaticJointDef"""
+ _Box2D2.b2PrismaticJointDef_swiginit(self,_Box2D2.new_b2PrismaticJointDef(*args))
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor, b2Vec2 axis)"""
+ return _Box2D2.b2PrismaticJointDef_Initialize(*args)
+
+ localAnchor1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor1_get, _Box2D2.b2PrismaticJointDef_localAnchor1_set)
+ localAnchor2 = _swig_property(_Box2D2.b2PrismaticJointDef_localAnchor2_get, _Box2D2.b2PrismaticJointDef_localAnchor2_set)
+ localAxis1 = _swig_property(_Box2D2.b2PrismaticJointDef_localAxis1_get, _Box2D2.b2PrismaticJointDef_localAxis1_set)
+ referenceAngle = _swig_property(_Box2D2.b2PrismaticJointDef_referenceAngle_get, _Box2D2.b2PrismaticJointDef_referenceAngle_set)
+ enableLimit = _swig_property(_Box2D2.b2PrismaticJointDef_enableLimit_get, _Box2D2.b2PrismaticJointDef_enableLimit_set)
+ lowerTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_lowerTranslation_get, _Box2D2.b2PrismaticJointDef_lowerTranslation_set)
+ upperTranslation = _swig_property(_Box2D2.b2PrismaticJointDef_upperTranslation_get, _Box2D2.b2PrismaticJointDef_upperTranslation_set)
+ enableMotor = _swig_property(_Box2D2.b2PrismaticJointDef_enableMotor_get, _Box2D2.b2PrismaticJointDef_enableMotor_set)
+ maxMotorForce = _swig_property(_Box2D2.b2PrismaticJointDef_maxMotorForce_get, _Box2D2.b2PrismaticJointDef_maxMotorForce_set)
+ motorSpeed = _swig_property(_Box2D2.b2PrismaticJointDef_motorSpeed_get, _Box2D2.b2PrismaticJointDef_motorSpeed_set)
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJointDef
+b2PrismaticJointDef.Initialize = new_instancemethod(_Box2D2.b2PrismaticJointDef_Initialize,None,b2PrismaticJointDef)
+b2PrismaticJointDef_swigregister = _Box2D2.b2PrismaticJointDef_swigregister
+b2PrismaticJointDef_swigregister(b2PrismaticJointDef)
+
+class b2PrismaticJoint(b2Joint):
+ """Proxy of C++ b2PrismaticJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetJointTranslation(*args):
+ """GetJointTranslation(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointTranslation(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2PrismaticJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2PrismaticJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2PrismaticJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorForce(*args):
+ """SetMaxMotorForce(self, float32 force)"""
+ return _Box2D2.b2PrismaticJoint_SetMaxMotorForce(*args)
+
+ def GetMotorForce(*args):
+ """GetMotorForce(self) -> float32"""
+ return _Box2D2.b2PrismaticJoint_GetMotorForce(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PrismaticJointDef def) -> b2PrismaticJoint"""
+ _Box2D2.b2PrismaticJoint_swiginit(self,_Box2D2.new_b2PrismaticJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PrismaticJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PrismaticJoint_SolvePositionConstraints(*args)
+
+ m_localAnchor1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor1_get, _Box2D2.b2PrismaticJoint_m_localAnchor1_set)
+ m_localAnchor2 = _swig_property(_Box2D2.b2PrismaticJoint_m_localAnchor2_get, _Box2D2.b2PrismaticJoint_m_localAnchor2_set)
+ m_localXAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localXAxis1_get, _Box2D2.b2PrismaticJoint_m_localXAxis1_set)
+ m_localYAxis1 = _swig_property(_Box2D2.b2PrismaticJoint_m_localYAxis1_get, _Box2D2.b2PrismaticJoint_m_localYAxis1_set)
+ m_refAngle = _swig_property(_Box2D2.b2PrismaticJoint_m_refAngle_get, _Box2D2.b2PrismaticJoint_m_refAngle_set)
+ m_linearJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_linearJacobian_get, _Box2D2.b2PrismaticJoint_m_linearJacobian_set)
+ m_linearMass = _swig_property(_Box2D2.b2PrismaticJoint_m_linearMass_get, _Box2D2.b2PrismaticJoint_m_linearMass_set)
+ m_force = _swig_property(_Box2D2.b2PrismaticJoint_m_force_get, _Box2D2.b2PrismaticJoint_m_force_set)
+ m_angularMass = _swig_property(_Box2D2.b2PrismaticJoint_m_angularMass_get, _Box2D2.b2PrismaticJoint_m_angularMass_set)
+ m_torque = _swig_property(_Box2D2.b2PrismaticJoint_m_torque_get, _Box2D2.b2PrismaticJoint_m_torque_set)
+ m_motorJacobian = _swig_property(_Box2D2.b2PrismaticJoint_m_motorJacobian_get, _Box2D2.b2PrismaticJoint_m_motorJacobian_set)
+ m_motorMass = _swig_property(_Box2D2.b2PrismaticJoint_m_motorMass_get, _Box2D2.b2PrismaticJoint_m_motorMass_set)
+ m_motorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_motorForce_get, _Box2D2.b2PrismaticJoint_m_motorForce_set)
+ m_limitForce = _swig_property(_Box2D2.b2PrismaticJoint_m_limitForce_get, _Box2D2.b2PrismaticJoint_m_limitForce_set)
+ m_limitPositionImpulse = _swig_property(_Box2D2.b2PrismaticJoint_m_limitPositionImpulse_get, _Box2D2.b2PrismaticJoint_m_limitPositionImpulse_set)
+ m_lowerTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_lowerTranslation_get, _Box2D2.b2PrismaticJoint_m_lowerTranslation_set)
+ m_upperTranslation = _swig_property(_Box2D2.b2PrismaticJoint_m_upperTranslation_get, _Box2D2.b2PrismaticJoint_m_upperTranslation_set)
+ m_maxMotorForce = _swig_property(_Box2D2.b2PrismaticJoint_m_maxMotorForce_get, _Box2D2.b2PrismaticJoint_m_maxMotorForce_set)
+ m_motorSpeed = _swig_property(_Box2D2.b2PrismaticJoint_m_motorSpeed_get, _Box2D2.b2PrismaticJoint_m_motorSpeed_set)
+ m_enableLimit = _swig_property(_Box2D2.b2PrismaticJoint_m_enableLimit_get, _Box2D2.b2PrismaticJoint_m_enableLimit_set)
+ m_enableMotor = _swig_property(_Box2D2.b2PrismaticJoint_m_enableMotor_get, _Box2D2.b2PrismaticJoint_m_enableMotor_set)
+ m_limitState = _swig_property(_Box2D2.b2PrismaticJoint_m_limitState_get, _Box2D2.b2PrismaticJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PrismaticJoint
+b2PrismaticJoint.GetJointTranslation = new_instancemethod(_Box2D2.b2PrismaticJoint_GetJointTranslation,None,b2PrismaticJoint)
+b2PrismaticJoint.GetJointSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_GetJointSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.IsLimitEnabled = new_instancemethod(_Box2D2.b2PrismaticJoint_IsLimitEnabled,None,b2PrismaticJoint)
+b2PrismaticJoint.EnableLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_EnableLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.GetLowerLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_GetLowerLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.GetUpperLimit = new_instancemethod(_Box2D2.b2PrismaticJoint_GetUpperLimit,None,b2PrismaticJoint)
+b2PrismaticJoint.SetLimits = new_instancemethod(_Box2D2.b2PrismaticJoint_SetLimits,None,b2PrismaticJoint)
+b2PrismaticJoint.IsMotorEnabled = new_instancemethod(_Box2D2.b2PrismaticJoint_IsMotorEnabled,None,b2PrismaticJoint)
+b2PrismaticJoint.EnableMotor = new_instancemethod(_Box2D2.b2PrismaticJoint_EnableMotor,None,b2PrismaticJoint)
+b2PrismaticJoint.SetMotorSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_SetMotorSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.GetMotorSpeed = new_instancemethod(_Box2D2.b2PrismaticJoint_GetMotorSpeed,None,b2PrismaticJoint)
+b2PrismaticJoint.SetMaxMotorForce = new_instancemethod(_Box2D2.b2PrismaticJoint_SetMaxMotorForce,None,b2PrismaticJoint)
+b2PrismaticJoint.GetMotorForce = new_instancemethod(_Box2D2.b2PrismaticJoint_GetMotorForce,None,b2PrismaticJoint)
+b2PrismaticJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2PrismaticJoint_InitVelocityConstraints,None,b2PrismaticJoint)
+b2PrismaticJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2PrismaticJoint_SolveVelocityConstraints,None,b2PrismaticJoint)
+b2PrismaticJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2PrismaticJoint_SolvePositionConstraints,None,b2PrismaticJoint)
+b2PrismaticJoint_swigregister = _Box2D2.b2PrismaticJoint_swigregister
+b2PrismaticJoint_swigregister(b2PrismaticJoint)
+
+class b2RevoluteJointDef(b2JointDef):
+ """Proxy of C++ b2RevoluteJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2RevoluteJointDef"""
+ _Box2D2.b2RevoluteJointDef_swiginit(self,_Box2D2.new_b2RevoluteJointDef(*args))
+ def Initialize(*args):
+ """Initialize(self, b2Body body1, b2Body body2, b2Vec2 anchor)"""
+ return _Box2D2.b2RevoluteJointDef_Initialize(*args)
+
+ localAnchor1 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor1_get, _Box2D2.b2RevoluteJointDef_localAnchor1_set)
+ localAnchor2 = _swig_property(_Box2D2.b2RevoluteJointDef_localAnchor2_get, _Box2D2.b2RevoluteJointDef_localAnchor2_set)
+ referenceAngle = _swig_property(_Box2D2.b2RevoluteJointDef_referenceAngle_get, _Box2D2.b2RevoluteJointDef_referenceAngle_set)
+ enableLimit = _swig_property(_Box2D2.b2RevoluteJointDef_enableLimit_get, _Box2D2.b2RevoluteJointDef_enableLimit_set)
+ lowerAngle = _swig_property(_Box2D2.b2RevoluteJointDef_lowerAngle_get, _Box2D2.b2RevoluteJointDef_lowerAngle_set)
+ upperAngle = _swig_property(_Box2D2.b2RevoluteJointDef_upperAngle_get, _Box2D2.b2RevoluteJointDef_upperAngle_set)
+ enableMotor = _swig_property(_Box2D2.b2RevoluteJointDef_enableMotor_get, _Box2D2.b2RevoluteJointDef_enableMotor_set)
+ motorSpeed = _swig_property(_Box2D2.b2RevoluteJointDef_motorSpeed_get, _Box2D2.b2RevoluteJointDef_motorSpeed_set)
+ maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJointDef_maxMotorTorque_get, _Box2D2.b2RevoluteJointDef_maxMotorTorque_set)
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJointDef
+b2RevoluteJointDef.Initialize = new_instancemethod(_Box2D2.b2RevoluteJointDef_Initialize,None,b2RevoluteJointDef)
+b2RevoluteJointDef_swigregister = _Box2D2.b2RevoluteJointDef_swigregister
+b2RevoluteJointDef_swigregister(b2RevoluteJointDef)
+
+class b2RevoluteJoint(b2Joint):
+ """Proxy of C++ b2RevoluteJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetJointAngle(*args):
+ """GetJointAngle(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointAngle(*args)
+
+ def GetJointSpeed(*args):
+ """GetJointSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetJointSpeed(*args)
+
+ def IsLimitEnabled(*args):
+ """IsLimitEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsLimitEnabled(*args)
+
+ def EnableLimit(*args):
+ """EnableLimit(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableLimit(*args)
+
+ def GetLowerLimit(*args):
+ """GetLowerLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetLowerLimit(*args)
+
+ def GetUpperLimit(*args):
+ """GetUpperLimit(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetUpperLimit(*args)
+
+ def SetLimits(*args):
+ """SetLimits(self, float32 lower, float32 upper)"""
+ return _Box2D2.b2RevoluteJoint_SetLimits(*args)
+
+ def IsMotorEnabled(*args):
+ """IsMotorEnabled(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_IsMotorEnabled(*args)
+
+ def EnableMotor(*args):
+ """EnableMotor(self, bool flag)"""
+ return _Box2D2.b2RevoluteJoint_EnableMotor(*args)
+
+ def SetMotorSpeed(*args):
+ """SetMotorSpeed(self, float32 speed)"""
+ return _Box2D2.b2RevoluteJoint_SetMotorSpeed(*args)
+
+ def GetMotorSpeed(*args):
+ """GetMotorSpeed(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorSpeed(*args)
+
+ def SetMaxMotorTorque(*args):
+ """SetMaxMotorTorque(self, float32 torque)"""
+ return _Box2D2.b2RevoluteJoint_SetMaxMotorTorque(*args)
+
+ def GetMotorTorque(*args):
+ """GetMotorTorque(self) -> float32"""
+ return _Box2D2.b2RevoluteJoint_GetMotorTorque(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2RevoluteJointDef def) -> b2RevoluteJoint"""
+ _Box2D2.b2RevoluteJoint_swiginit(self,_Box2D2.new_b2RevoluteJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2RevoluteJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2RevoluteJoint_SolvePositionConstraints(*args)
+
+ m_localAnchor1 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor1_get, _Box2D2.b2RevoluteJoint_m_localAnchor1_set)
+ m_localAnchor2 = _swig_property(_Box2D2.b2RevoluteJoint_m_localAnchor2_get, _Box2D2.b2RevoluteJoint_m_localAnchor2_set)
+ m_pivotForce = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotForce_get, _Box2D2.b2RevoluteJoint_m_pivotForce_set)
+ m_motorForce = _swig_property(_Box2D2.b2RevoluteJoint_m_motorForce_get, _Box2D2.b2RevoluteJoint_m_motorForce_set)
+ m_limitForce = _swig_property(_Box2D2.b2RevoluteJoint_m_limitForce_get, _Box2D2.b2RevoluteJoint_m_limitForce_set)
+ m_limitPositionImpulse = _swig_property(_Box2D2.b2RevoluteJoint_m_limitPositionImpulse_get, _Box2D2.b2RevoluteJoint_m_limitPositionImpulse_set)
+ m_pivotMass = _swig_property(_Box2D2.b2RevoluteJoint_m_pivotMass_get, _Box2D2.b2RevoluteJoint_m_pivotMass_set)
+ m_motorMass = _swig_property(_Box2D2.b2RevoluteJoint_m_motorMass_get, _Box2D2.b2RevoluteJoint_m_motorMass_set)
+ m_enableMotor = _swig_property(_Box2D2.b2RevoluteJoint_m_enableMotor_get, _Box2D2.b2RevoluteJoint_m_enableMotor_set)
+ m_maxMotorTorque = _swig_property(_Box2D2.b2RevoluteJoint_m_maxMotorTorque_get, _Box2D2.b2RevoluteJoint_m_maxMotorTorque_set)
+ m_motorSpeed = _swig_property(_Box2D2.b2RevoluteJoint_m_motorSpeed_get, _Box2D2.b2RevoluteJoint_m_motorSpeed_set)
+ m_enableLimit = _swig_property(_Box2D2.b2RevoluteJoint_m_enableLimit_get, _Box2D2.b2RevoluteJoint_m_enableLimit_set)
+ m_referenceAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_referenceAngle_get, _Box2D2.b2RevoluteJoint_m_referenceAngle_set)
+ m_lowerAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_lowerAngle_get, _Box2D2.b2RevoluteJoint_m_lowerAngle_set)
+ m_upperAngle = _swig_property(_Box2D2.b2RevoluteJoint_m_upperAngle_get, _Box2D2.b2RevoluteJoint_m_upperAngle_set)
+ m_limitState = _swig_property(_Box2D2.b2RevoluteJoint_m_limitState_get, _Box2D2.b2RevoluteJoint_m_limitState_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2RevoluteJoint
+b2RevoluteJoint.GetJointAngle = new_instancemethod(_Box2D2.b2RevoluteJoint_GetJointAngle,None,b2RevoluteJoint)
+b2RevoluteJoint.GetJointSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_GetJointSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.IsLimitEnabled = new_instancemethod(_Box2D2.b2RevoluteJoint_IsLimitEnabled,None,b2RevoluteJoint)
+b2RevoluteJoint.EnableLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_EnableLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.GetLowerLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_GetLowerLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.GetUpperLimit = new_instancemethod(_Box2D2.b2RevoluteJoint_GetUpperLimit,None,b2RevoluteJoint)
+b2RevoluteJoint.SetLimits = new_instancemethod(_Box2D2.b2RevoluteJoint_SetLimits,None,b2RevoluteJoint)
+b2RevoluteJoint.IsMotorEnabled = new_instancemethod(_Box2D2.b2RevoluteJoint_IsMotorEnabled,None,b2RevoluteJoint)
+b2RevoluteJoint.EnableMotor = new_instancemethod(_Box2D2.b2RevoluteJoint_EnableMotor,None,b2RevoluteJoint)
+b2RevoluteJoint.SetMotorSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_SetMotorSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.GetMotorSpeed = new_instancemethod(_Box2D2.b2RevoluteJoint_GetMotorSpeed,None,b2RevoluteJoint)
+b2RevoluteJoint.SetMaxMotorTorque = new_instancemethod(_Box2D2.b2RevoluteJoint_SetMaxMotorTorque,None,b2RevoluteJoint)
+b2RevoluteJoint.GetMotorTorque = new_instancemethod(_Box2D2.b2RevoluteJoint_GetMotorTorque,None,b2RevoluteJoint)
+b2RevoluteJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2RevoluteJoint_InitVelocityConstraints,None,b2RevoluteJoint)
+b2RevoluteJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2RevoluteJoint_SolveVelocityConstraints,None,b2RevoluteJoint)
+b2RevoluteJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2RevoluteJoint_SolvePositionConstraints,None,b2RevoluteJoint)
+b2RevoluteJoint_swigregister = _Box2D2.b2RevoluteJoint_swigregister
+b2RevoluteJoint_swigregister(b2RevoluteJoint)
+
+class b2PulleyJointDef(b2JointDef):
+ """Proxy of C++ b2PulleyJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2PulleyJointDef"""
+ _Box2D2.b2PulleyJointDef_swiginit(self,_Box2D2.new_b2PulleyJointDef(*args))
+ def Initialize(*args):
+ """
+ Initialize(self, b2Body body1, b2Body body2, b2Vec2 groundAnchor1, b2Vec2 groundAnchor2,
+ b2Vec2 anchor1, b2Vec2 anchor2,
+ float32 ratio)
+ """
+ return _Box2D2.b2PulleyJointDef_Initialize(*args)
+
+ groundAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor1_get, _Box2D2.b2PulleyJointDef_groundAnchor1_set)
+ groundAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_groundAnchor2_get, _Box2D2.b2PulleyJointDef_groundAnchor2_set)
+ localAnchor1 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor1_get, _Box2D2.b2PulleyJointDef_localAnchor1_set)
+ localAnchor2 = _swig_property(_Box2D2.b2PulleyJointDef_localAnchor2_get, _Box2D2.b2PulleyJointDef_localAnchor2_set)
+ length1 = _swig_property(_Box2D2.b2PulleyJointDef_length1_get, _Box2D2.b2PulleyJointDef_length1_set)
+ maxLength1 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength1_get, _Box2D2.b2PulleyJointDef_maxLength1_set)
+ length2 = _swig_property(_Box2D2.b2PulleyJointDef_length2_get, _Box2D2.b2PulleyJointDef_length2_set)
+ maxLength2 = _swig_property(_Box2D2.b2PulleyJointDef_maxLength2_get, _Box2D2.b2PulleyJointDef_maxLength2_set)
+ ratio = _swig_property(_Box2D2.b2PulleyJointDef_ratio_get, _Box2D2.b2PulleyJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJointDef
+b2PulleyJointDef.Initialize = new_instancemethod(_Box2D2.b2PulleyJointDef_Initialize,None,b2PulleyJointDef)
+b2PulleyJointDef_swigregister = _Box2D2.b2PulleyJointDef_swigregister
+b2PulleyJointDef_swigregister(b2PulleyJointDef)
+b2_minPulleyLength = cvar.b2_minPulleyLength
+
+class b2PulleyJoint(b2Joint):
+ """Proxy of C++ b2PulleyJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetGroundAnchor1(*args):
+ """GetGroundAnchor1(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor1(*args)
+
+ def GetGroundAnchor2(*args):
+ """GetGroundAnchor2(self) -> b2Vec2"""
+ return _Box2D2.b2PulleyJoint_GetGroundAnchor2(*args)
+
+ def GetLength1(*args):
+ """GetLength1(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength1(*args)
+
+ def GetLength2(*args):
+ """GetLength2(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetLength2(*args)
+
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2PulleyJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2PulleyJointDef data) -> b2PulleyJoint"""
+ _Box2D2.b2PulleyJoint_swiginit(self,_Box2D2.new_b2PulleyJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2PulleyJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2PulleyJoint_SolvePositionConstraints(*args)
+
+ m_ground = _swig_property(_Box2D2.b2PulleyJoint_m_ground_get, _Box2D2.b2PulleyJoint_m_ground_set)
+ m_groundAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor1_get, _Box2D2.b2PulleyJoint_m_groundAnchor1_set)
+ m_groundAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_groundAnchor2_get, _Box2D2.b2PulleyJoint_m_groundAnchor2_set)
+ m_localAnchor1 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor1_get, _Box2D2.b2PulleyJoint_m_localAnchor1_set)
+ m_localAnchor2 = _swig_property(_Box2D2.b2PulleyJoint_m_localAnchor2_get, _Box2D2.b2PulleyJoint_m_localAnchor2_set)
+ m_u1 = _swig_property(_Box2D2.b2PulleyJoint_m_u1_get, _Box2D2.b2PulleyJoint_m_u1_set)
+ m_u2 = _swig_property(_Box2D2.b2PulleyJoint_m_u2_get, _Box2D2.b2PulleyJoint_m_u2_set)
+ m_constant = _swig_property(_Box2D2.b2PulleyJoint_m_constant_get, _Box2D2.b2PulleyJoint_m_constant_set)
+ m_ratio = _swig_property(_Box2D2.b2PulleyJoint_m_ratio_get, _Box2D2.b2PulleyJoint_m_ratio_set)
+ m_maxLength1 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength1_get, _Box2D2.b2PulleyJoint_m_maxLength1_set)
+ m_maxLength2 = _swig_property(_Box2D2.b2PulleyJoint_m_maxLength2_get, _Box2D2.b2PulleyJoint_m_maxLength2_set)
+ m_pulleyMass = _swig_property(_Box2D2.b2PulleyJoint_m_pulleyMass_get, _Box2D2.b2PulleyJoint_m_pulleyMass_set)
+ m_limitMass1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass1_get, _Box2D2.b2PulleyJoint_m_limitMass1_set)
+ m_limitMass2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitMass2_get, _Box2D2.b2PulleyJoint_m_limitMass2_set)
+ m_force = _swig_property(_Box2D2.b2PulleyJoint_m_force_get, _Box2D2.b2PulleyJoint_m_force_set)
+ m_limitForce1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce1_get, _Box2D2.b2PulleyJoint_m_limitForce1_set)
+ m_limitForce2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitForce2_get, _Box2D2.b2PulleyJoint_m_limitForce2_set)
+ m_positionImpulse = _swig_property(_Box2D2.b2PulleyJoint_m_positionImpulse_get, _Box2D2.b2PulleyJoint_m_positionImpulse_set)
+ m_limitPositionImpulse1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse1_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse1_set)
+ m_limitPositionImpulse2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitPositionImpulse2_get, _Box2D2.b2PulleyJoint_m_limitPositionImpulse2_set)
+ m_state = _swig_property(_Box2D2.b2PulleyJoint_m_state_get, _Box2D2.b2PulleyJoint_m_state_set)
+ m_limitState1 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState1_get, _Box2D2.b2PulleyJoint_m_limitState1_set)
+ m_limitState2 = _swig_property(_Box2D2.b2PulleyJoint_m_limitState2_get, _Box2D2.b2PulleyJoint_m_limitState2_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2PulleyJoint
+b2PulleyJoint.GetGroundAnchor1 = new_instancemethod(_Box2D2.b2PulleyJoint_GetGroundAnchor1,None,b2PulleyJoint)
+b2PulleyJoint.GetGroundAnchor2 = new_instancemethod(_Box2D2.b2PulleyJoint_GetGroundAnchor2,None,b2PulleyJoint)
+b2PulleyJoint.GetLength1 = new_instancemethod(_Box2D2.b2PulleyJoint_GetLength1,None,b2PulleyJoint)
+b2PulleyJoint.GetLength2 = new_instancemethod(_Box2D2.b2PulleyJoint_GetLength2,None,b2PulleyJoint)
+b2PulleyJoint.GetRatio = new_instancemethod(_Box2D2.b2PulleyJoint_GetRatio,None,b2PulleyJoint)
+b2PulleyJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2PulleyJoint_InitVelocityConstraints,None,b2PulleyJoint)
+b2PulleyJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2PulleyJoint_SolveVelocityConstraints,None,b2PulleyJoint)
+b2PulleyJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2PulleyJoint_SolvePositionConstraints,None,b2PulleyJoint)
+b2PulleyJoint_swigregister = _Box2D2.b2PulleyJoint_swigregister
+b2PulleyJoint_swigregister(b2PulleyJoint)
+
+class b2GearJointDef(b2JointDef):
+ """Proxy of C++ b2GearJointDef class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ """__init__(self) -> b2GearJointDef"""
+ _Box2D2.b2GearJointDef_swiginit(self,_Box2D2.new_b2GearJointDef(*args))
+ joint1 = _swig_property(_Box2D2.b2GearJointDef_joint1_get, _Box2D2.b2GearJointDef_joint1_set)
+ joint2 = _swig_property(_Box2D2.b2GearJointDef_joint2_get, _Box2D2.b2GearJointDef_joint2_set)
+ ratio = _swig_property(_Box2D2.b2GearJointDef_ratio_get, _Box2D2.b2GearJointDef_ratio_set)
+ __swig_destroy__ = _Box2D2.delete_b2GearJointDef
+b2GearJointDef_swigregister = _Box2D2.b2GearJointDef_swigregister
+b2GearJointDef_swigregister(b2GearJointDef)
+
+class b2GearJoint(b2Joint):
+ """Proxy of C++ b2GearJoint class"""
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def GetRatio(*args):
+ """GetRatio(self) -> float32"""
+ return _Box2D2.b2GearJoint_GetRatio(*args)
+
+ def __init__(self, *args):
+ """__init__(self, b2GearJointDef data) -> b2GearJoint"""
+ _Box2D2.b2GearJoint_swiginit(self,_Box2D2.new_b2GearJoint(*args))
+ def InitVelocityConstraints(*args):
+ """InitVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_InitVelocityConstraints(*args)
+
+ def SolveVelocityConstraints(*args):
+ """SolveVelocityConstraints(self, b2TimeStep step)"""
+ return _Box2D2.b2GearJoint_SolveVelocityConstraints(*args)
+
+ def SolvePositionConstraints(*args):
+ """SolvePositionConstraints(self) -> bool"""
+ return _Box2D2.b2GearJoint_SolvePositionConstraints(*args)
+
+ m_ground1 = _swig_property(_Box2D2.b2GearJoint_m_ground1_get, _Box2D2.b2GearJoint_m_ground1_set)
+ m_ground2 = _swig_property(_Box2D2.b2GearJoint_m_ground2_get, _Box2D2.b2GearJoint_m_ground2_set)
+ m_revolute1 = _swig_property(_Box2D2.b2GearJoint_m_revolute1_get, _Box2D2.b2GearJoint_m_revolute1_set)
+ m_prismatic1 = _swig_property(_Box2D2.b2GearJoint_m_prismatic1_get, _Box2D2.b2GearJoint_m_prismatic1_set)
+ m_revolute2 = _swig_property(_Box2D2.b2GearJoint_m_revolute2_get, _Box2D2.b2GearJoint_m_revolute2_set)
+ m_prismatic2 = _swig_property(_Box2D2.b2GearJoint_m_prismatic2_get, _Box2D2.b2GearJoint_m_prismatic2_set)
+ m_groundAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor1_get, _Box2D2.b2GearJoint_m_groundAnchor1_set)
+ m_groundAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_groundAnchor2_get, _Box2D2.b2GearJoint_m_groundAnchor2_set)
+ m_localAnchor1 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor1_get, _Box2D2.b2GearJoint_m_localAnchor1_set)
+ m_localAnchor2 = _swig_property(_Box2D2.b2GearJoint_m_localAnchor2_get, _Box2D2.b2GearJoint_m_localAnchor2_set)
+ m_J = _swig_property(_Box2D2.b2GearJoint_m_J_get, _Box2D2.b2GearJoint_m_J_set)
+ m_constant = _swig_property(_Box2D2.b2GearJoint_m_constant_get, _Box2D2.b2GearJoint_m_constant_set)
+ m_ratio = _swig_property(_Box2D2.b2GearJoint_m_ratio_get, _Box2D2.b2GearJoint_m_ratio_set)
+ m_mass = _swig_property(_Box2D2.b2GearJoint_m_mass_get, _Box2D2.b2GearJoint_m_mass_set)
+ m_force = _swig_property(_Box2D2.b2GearJoint_m_force_get, _Box2D2.b2GearJoint_m_force_set)
+ def __repr__(self):
+ return b2JointInfo(self)
+
+ __swig_destroy__ = _Box2D2.delete_b2GearJoint
+b2GearJoint.GetRatio = new_instancemethod(_Box2D2.b2GearJoint_GetRatio,None,b2GearJoint)
+b2GearJoint.InitVelocityConstraints = new_instancemethod(_Box2D2.b2GearJoint_InitVelocityConstraints,None,b2GearJoint)
+b2GearJoint.SolveVelocityConstraints = new_instancemethod(_Box2D2.b2GearJoint_SolveVelocityConstraints,None,b2GearJoint)
+b2GearJoint.SolvePositionConstraints = new_instancemethod(_Box2D2.b2GearJoint_SolvePositionConstraints,None,b2GearJoint)
+b2GearJoint_swigregister = _Box2D2.b2GearJoint_swigregister
+b2GearJoint_swigregister(b2GearJoint)
+
+
+
diff --git a/elements/box2d/box2d_win/_Box2D2.pyd b/elements/box2d/box2d_win/_Box2D2.pyd
new file mode 100755
index 0000000..13b6966
--- /dev/null
+++ b/elements/box2d/box2d_win/_Box2D2.pyd
Binary files differ
diff --git a/elements/box2d/box2d_win/__init__.py b/elements/box2d/box2d_win/__init__.py
new file mode 100755
index 0000000..53d0f25
--- /dev/null
+++ b/elements/box2d/box2d_win/__init__.py
@@ -0,0 +1 @@
+from Box2D2 import *
diff --git a/elements/callbacks.py b/elements/callbacks.py
new file mode 100755
index 0000000..5402869
--- /dev/null
+++ b/elements/callbacks.py
@@ -0,0 +1,122 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+from locals import *
+from elements import box2d
+
+class CallbackHandler:
+ # List of contact callbacks and shapes to start them - sorted by type for quicker access
+ # Callbacks are saved as callbacks[callback_type][[function, parameters], ...]
+ callbacks = {}
+
+ def __init__(self, parent):
+ self.parent = parent
+
+ # init callback dict to avoid those slow try
+ # (especially for self.get, as it is called *often*)
+ for i in xrange(10):
+ self.callbacks[i] = []
+
+ def add(self, callback_type, callback_handler, *args):
+ """ Users can add callbacks for certain (or all) collisions
+
+ Parameters:
+ callback_type ......... CALLBACK_CONTACT (nothing else for now)
+ callback_handler ...... a callback function
+ args (optional) ....... a list of parameters which can be used with callbacks.get
+
+ Return:
+ callback_id ... used to remove a callback later (int)
+ """
+ # Create contact listener if required
+ if callback_type in [CALLBACK_CONTACT_ADD, CALLBACK_CONTACT_PERSIST, CALLBACK_CONTACT_REMOVE]:
+ if self.parent.klistener == None:
+ self.parent.klistener = kContactListener(self.get)
+ self.parent.world.SetContactListener( self.parent.klistener )
+ print "* kContactListener added"
+
+ # Get callback dict for this callback_type
+ c = self.callbacks[callback_type]
+
+ # Append to the Callback Dictionary
+ c.append([callback_handler, args])
+ self.callbacks[callback_type] = c
+
+ # Return Callback ID
+ # ID = callback_type.callback_index (1...n)
+ return "%i.%i" % (callback_type, len(c))
+
+ def get(self, callback_type):
+ return self.callbacks[callback_type]
+
+ def start(self, callback_type, *args):
+ callbacks = self.get(callback_type)
+ for c in callbacks:
+ callback, params = c
+ callback()
+
+class kContactListener(box2d.b2ContactListener):
+ def __init__(self, get_callbacks):
+ # Init the Box2D b2ContactListener
+ box2d.b2ContactListener.__init__(self)
+
+ # Function to get the current callbacks
+ self.get_callbacks = get_callbacks
+
+ def check_contact(self, contact_type, point):
+ # Checks if a callback should be started with this contact point
+ contacts = self.get_callbacks(contact_type)
+
+ # Step through all callbacks for this type (eg ADD, PERSIST, REMOVE)
+ for c in contacts:
+ callback, bodylist = c
+ if len(bodylist) == 0:
+ # Without bodylist it's a universal callback (for all bodies)
+ callback(point)
+
+ else:
+ # This is a callback with specified bodies
+ # See if this contact involves one of the specified
+ b1 = str(point.shape1.GetBody())
+ b2 = str(point.shape2.GetBody())
+ for s in bodylist:
+ s = str(s)
+ if b1 == s or b2 == s:
+ # Yes, that's the one :)
+ callback(point)
+
+ def Add(self, point):
+ """Called when a contact point is created"""
+ self.check_contact(CALLBACK_CONTACT_ADD, point)
+
+ def Persist(self, point):
+ """Called when a contact point persists for more than a time step"""
+ self.check_contact(CALLBACK_CONTACT_PERSIST, point)
+
+ def Remove(self, point):
+ """Called when a contact point is removed"""
+ self.check_contact(CALLBACK_CONTACT_REMOVE, point)
+
diff --git a/elements/camera.py b/elements/camera.py
new file mode 100755
index 0000000..c45b27d
--- /dev/null
+++ b/elements/camera.py
@@ -0,0 +1,124 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+from locals import *
+
+class Camera:
+ """ The Camera class. We will see :)
+ Please also see: http://www.assembla.com/spaces/elements/tickets/31
+
+ This class currently handles:
+ - Scaling factor
+ - Screen Offset from the World Coordinate System
+
+ Inputs from the user have to be checked for them.
+ - Places to check for it: elements.py, drawing.py, add_objects.py
+
+ """
+ scale_factor = 1.0 # All coords to the renderer are multiplied with the scale factor in elements.draw()
+ track_body = None # Body which means to be tracked. Offset is set at each elements.draw()
+
+ def __init__(self, parent):
+ self.parent = parent
+
+ def track(self, body):
+ """ Start tracking a specific body
+ """
+ self.track_body = body
+
+ def track_stop(self):
+ """ Stop tracking a body
+ """
+ self.track_body = None
+
+ def center(self, pos, screenCoord=True, stopTrack=True):
+ """ Centers the camera at given screen coordinates -- in pixel
+ Typical call: world.camera.center(event.pos)
+
+ Problem: Works ONLY WITH screenCoord now!
+ """
+ x, y = pos
+
+ x -= self.parent.display_width / 2
+ y -= self.parent.display_height / 2
+
+ if screenCoord:
+ x /= self.scale_factor
+ y /= self.scale_factor
+
+ # Set the offset
+ self.inc_offset((x, y), screenCoord, stopTrack)
+
+ def set_offset(self, offset, screenCoord=True, stopTrack=True):
+ """ Set an offset from the screen to the world cs
+ -- in screen (or world) coordinates and in pixel
+ """
+ # Stop tracking of an object
+ if stopTrack: self.track_stop()
+
+ # If screenCoords, we have to bring them to the world cs
+ if screenCoord: x, y = self.parent.to_world(offset)
+ else: x, y = offset
+
+ self._set_offset((x/self.parent.ppm, y/self.parent.ppm))
+
+ def inc_offset(self, offset, screenCoord=True, stopTrack=True):
+ """ Increment an offset from the screen to the world cs -- in world coordinates and in pixel
+ """
+ # Stop tracking of an object
+ if stopTrack: self.track_stop()
+
+ # Get Current Offset
+ x, y = self.parent.screen_offset_pixel
+ dx, dy = offset
+
+ # Bring the directions into the world coordinate system
+ if screenCoord:
+ if self.parent.inputAxis_x_left: dx *= -1
+ if self.parent.inputAxis_y_down: dy *= -1
+
+ # Set New Offset
+ self._set_offset(((x+dx)/self.parent.ppm, (y+dy)/self.parent.ppm))
+
+ def _set_offset(self, offset):
+ """ Set the screen offset to the world coordinate system
+ (using meters and the world coordinate system's orientation)
+ """
+ x, y = offset
+ self.parent.screen_offset = (x, y)
+ self.parent.screen_offset_pixel = (x*self.parent.ppm, y*self.parent.ppm)
+
+ def set_scale_factor(self, factor=1.0):
+ """ Zoom factor for the renderer 1.0 = 1:1 (original)
+ """
+ self.scale_factor = factor
+
+ def inc_scale_factor(self, factor=0.0):
+ """ Increases the zooms for the renderer a given factor
+ """
+ self.scale_factor += factor
+
+ \ No newline at end of file
diff --git a/elements/drawing.py b/elements/drawing.py
new file mode 100755
index 0000000..85f5247
--- /dev/null
+++ b/elements/drawing.py
@@ -0,0 +1,376 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+from math import pi
+from math import cos
+from math import sin
+from math import sqrt
+
+import tools
+
+# Functions of a rendering class
+# mandatory:
+# __init__
+# start_drawing
+# after_drawing
+# draw_circle
+# draw_polygon
+# draw_lines
+# set_lineWidth
+#
+# renderer-specific mandatory functions:
+# for pygame:
+# set_surface
+# for cairo:
+# draw_text
+# for opengl:
+#
+
+# IMPORTANT
+# The drawing functions get the coordinates in their screen coordinate system
+# no need for translations anymore :)
+
+class draw_pygame(object):
+ """ This class handles the drawing with pygame, which is really
+ simple since we only need draw_ellipse and draw_polygon.
+ """
+ lineWidth = 0
+
+ def __init__(self):
+ """ Load pygame.draw and pygame.Rect, and reference it for
+ the drawing methods
+
+ Parameters:
+ surface .... pygame surface (default: None)
+ lineWidth ..
+
+ Return: Class draw_pygame()
+ """
+ print "* Pygame selected as renderer"
+ from pygame import draw
+ from pygame import Rect
+
+ self.draw = draw
+ self.Rect = Rect
+
+ def set_lineWidth(self, lw):
+ """
+ """
+ self.lineWidth = lw
+
+ def set_surface(self, surface):
+ """
+ """
+ self.surface = surface
+
+ def get_surface(self):
+ """
+ """
+ return self.surface
+
+ def start_drawing(self):
+ pass
+
+ def after_drawing(self):
+ pass
+
+ def draw_circle(self, clr, pt, radius, angle):
+ """ Draw a circle
+
+ Parameters:
+ pt ........ (x, y)
+ clr ....... color in rgb ((r), (g), (b))
+ radius .... circle radius
+ angle ..... rotation in radians
+
+ Return: -
+ """
+ x, y = pt
+
+ x1 = x - radius
+ y1 = y - radius
+
+ rect = self.Rect( [x1, y1, 2*radius, 2*radius] )
+ self.draw.ellipse(self.surface, clr, rect, self.lineWidth)
+
+ # draw the orientation vector
+ if radius > 10:
+ rx = cos(angle) * radius
+ ry = -sin(angle) * radius
+
+ self.draw.line(self.surface, (255,255,255), pt, (x+rx, y+ry))
+
+ def draw_polygon(self, clr, points):
+ """ Draw a polygon
+
+ Parameters:
+ clr ....... color in rgb ((r), (g), (b))
+ points .... polygon points in normal (x,y) positions
+
+ Return: -
+ """
+ self.draw.polygon(self.surface, clr, points, self.lineWidth)
+ #self.draw.aalines(self.surface, clr, True, points)
+
+ def draw_lines(self, clr, closed, points, width=None):
+ """ Draw a polygon
+
+ Parameters:
+ clr ....... color in rgb ((r), (g), (b))
+ points .... polygon points in normal (x,y) positions
+
+ Return: -
+ """
+ if width == None:
+ lw = self.lineWidth
+ else:
+ lw = width
+
+ self.draw.lines(self.surface, clr, closed, points, lw)
+
+class draw_cairo(object):
+ """ This class handles the drawing with cairo, which is really
+ simple since we only need draw_ellipse and draw_polygon.
+ """
+ window = None
+ da = None
+ circle_surface = None
+ box_surface = None
+
+ def __init__(self, drawMethod="filled"):
+ """ Load cairo.draw and cairo.Rect, and reference it for
+ the drawing methods
+
+ Return: Class draw_cairo()
+ """
+ print "* Cairo selected as renderer"
+ import cairo
+ self.cairo = cairo
+ self.set_drawing_method(drawMethod)
+ #self.draw_box = self.draw_box_image
+
+ def set_lineWidth(self, lw): # unused
+ self.lineWidth = lw
+
+ def set_drawing_area(self, da):
+ """ Set the area for Cairo to draw to
+
+ da ...... drawing area (gtk.DrawingArea)
+
+ Return: -
+ """
+ self.da = da
+ self.window = da.window
+ print "* Cairo renderer drawing area set"
+
+ def set_drawing_method(self, type):
+ """ type = filled, image """
+ self.draw_circle = getattr(self, "draw_circle_%s" % type)
+ #self.draw_box = getattr(self, "draw_box_%s" % type)
+
+ def start_drawing(self):
+ self.width, self.height = self.window.get_size()
+ self.imagesurface = self.cairo.ImageSurface(self.cairo.FORMAT_ARGB32, self.width, self.height);
+ self.ctx = ctx = self.cairo.Context(self.imagesurface)
+
+ ctx.set_source_rgb(1, 1, 1) # background color
+ ctx.paint()
+
+ ctx.move_to(0, 0)
+ ctx.set_source_rgb(0, 0, 0) # defaults for the rest of the drawing
+ ctx.set_line_width(1)
+ ctx.set_tolerance(0.1)
+
+ ctx.set_line_join(self.cairo.LINE_CAP_BUTT)
+ # LINE_CAP_BUTT, LINE_CAP_ROUND, LINE_CAP_SQUARE, LINE_JOIN_BEVEL, LINE_JOIN_MITER, LINE_JOIN_ROUND
+
+ #ctx.set_dash([20/4.0, 20/4.0], 0)
+
+ def after_drawing(self):
+ dest_ctx = self.window.cairo_create()
+ dest_ctx.set_source_surface(self.imagesurface)
+ dest_ctx.paint()
+
+ def set_circle_image(self, filename):
+ self.circle_surface = self.cairo.ImageSurface.create_from_png(filename)
+ self.draw_circle = self.draw_circle_image
+
+# def set_box_image(self, filename):
+# self.box_surface = self.cairo.ImageSurface.create_from_png(filename)
+# self.draw_box = self.draw_box_image
+
+ def draw_circle_filled(self, clr, pt, radius, angle=0):
+ x, y = pt
+
+ clr = tools.rgb2floats(clr)
+ self.ctx.set_source_rgb(*clr)
+ self.ctx.move_to(x, y)
+ self.ctx.arc(x, y, radius, 0, 2*3.1415)
+ self.ctx.fill()
+
+ def draw_circle():
+ pass
+
+ def draw_circle_image(self, clr, pt, radius, angle=0, sf=None):
+ if sf == None:
+ sf = self.circle_surface
+ x, y = pt
+ self.ctx.save()
+ self.ctx.translate(x, y)
+ self.ctx.rotate(-angle)
+ image_r = sf.get_width() / 2
+ scale = float(radius) / image_r
+ self.ctx.scale(scale, scale)
+ self.ctx.translate(-0.5*sf.get_width(), -0.5*sf.get_height())
+ self.ctx.set_source_surface(sf)
+ self.ctx.paint()
+ self.ctx.restore()
+
+ def draw_image(self, source, pt, scale=1.0, rot=0, sourcepos=(0,0)):
+ self.ctx.save()
+ self.ctx.rotate(rot)
+ self.ctx.scale(scale, scale)
+ destx, desty = self.ctx.device_to_user_distance(pt[0], pt[1])
+ self.ctx.set_source_surface(source, destx-sourcepos[0], desty-sourcepos[1])
+ self.ctx.rectangle(destx, desty, source.get_width(), source.get_height())
+ self.ctx.fill()
+ self.ctx.restore()
+
+ def draw_polygon(self, clr, points):
+ """ Draw a polygon
+
+ Parameters:
+ clr ....... color in rgb ((r), (g), (b))
+ points .... polygon points in normal (x,y) positions
+
+ Return: -
+ """
+ clr = tools.rgb2floats(clr)
+ self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
+
+ pt = points[0]
+ self.ctx.move_to(pt[0], pt[1])
+ for pt in points[1:]:
+ self.ctx.line_to(pt[0], pt[1])
+
+ self.ctx.fill()
+
+ def draw_text(self, text, center, clr=(0,0,0), size=12, fontname="Georgia"):
+ clr = tools.rgb2floats(clr)
+ self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
+
+ self.ctx.select_font_face(fontname, self.cairo.FONT_SLANT_NORMAL, self.cairo.FONT_WEIGHT_NORMAL)
+ self.ctx.set_font_size(size)
+ x_bearing, y_bearing, width, height = self.ctx.text_extents(text)[:4]
+ self.ctx.move_to(center[0] + 0.5 - width / 2 - x_bearing, center[1] + 0.5 - height / 2 - y_bearing)
+ self.ctx.show_text(text)
+
+ def draw_lines(self, clr, closed, points):
+ """ Draw a polygon
+
+ Parameters:
+ clr ....... color in rgb ((r), (g), (b))
+ closed .... whether or not to close the lines (as a polygon)
+ points .... polygon points in normal (x,y) positions
+ Return: -
+ """
+ clr = tools.rgb2floats(clr)
+ self.ctx.set_source_rgb(clr[0], clr[1], clr[2])
+
+ pt = points[0]
+ self.ctx.move_to(pt[0], pt[1])
+ for pt in points[1:]:
+ self.ctx.line_to(pt[0], pt[1])
+
+ if closed:
+ pt = points[0]
+ self.ctx.line_to(pt[0], pt[1])
+
+ self.ctx.stroke()
+
+class draw_opengl_pyglet(object):
+ """ This class handles the drawing with pyglet
+ """
+ lineWidth = 0
+ def __init__(self):
+ """ Load pyglet.gl, and reference it for the drawing methods
+
+ Parameters:
+ surface .... not used with pyglet
+ lineWidth ..
+ """
+ print "* OpenGL_Pyglet selected as renderer"
+
+ from pyglet import gl
+ self.gl = gl
+
+ def set_lineWidth(self, lw):
+ self.lineWidth = lw
+
+ def draw_circle(self, clr, pt, radius, a=0):
+ clr = tools.rgb2floats(clr)
+ self.gl.glColor3f(clr[0], clr[1], clr[2])
+
+ x, y = pt
+ segs = 15
+ coef = 2.0*pi/segs;
+
+ self.gl.glBegin(self.gl.GL_LINE_LOOP)
+ for n in range(segs):
+ rads = n*coef
+ self.gl.glVertex2f(radius*cos(rads + a) + x, radius*sin(rads + a) + y)
+ self.gl.glVertex2f(x,y)
+ self.gl.glEnd()
+
+ def draw_polygon(self, clr, points):
+ clr = tools.rgb2floats(clr)
+ self.gl.glColor3f(clr[0], clr[1], clr[2])
+
+ self.gl.glBegin(self.gl.GL_LINES)
+
+ p1 = points[0]
+ for p in points[1:]:
+ x1, y1 = p1
+ x2, y2 = p1 = p
+
+ self.gl.glVertex2f(x1, y1)
+ self.gl.glVertex2f(x2, y2)
+
+ x1, y1 = points[0]
+
+ self.gl.glVertex2f(x2, y2)
+ self.gl.glVertex2f(x1, y1)
+
+ self.gl.glEnd()
+
+ def draw_lines(self, clr, closed, points):
+ pass
+
+ def start_drawing(self):
+ pass
+
+ def after_drawing(self):
+ pass
diff --git a/elements/elements.py b/elements/elements.py
new file mode 100755
index 0000000..398c484
--- /dev/null
+++ b/elements/elements.py
@@ -0,0 +1,384 @@
+#!/usr/bin/python
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+__version__= '0.1'
+__contact__ = '<elements@linuxuser.at>'
+
+# Load Box2D
+import box2d
+
+# Standard Imports
+from random import shuffle
+
+# Load Elements Definitions
+from locals import *
+
+# Load Elements Modules
+import tools
+import drawing
+import add_objects
+import callbacks
+import camera
+
+# Main Class
+class Elements:
+ """The class which handles all interaction with the box2d engine
+ """
+ # Settings
+ run_physics = True # Can pause the simulation
+ element_count = 0 # Element Count
+ renderer = None # Drawing class (from drawing.py)
+ input = INPUT_PIXELS # Default Input in Pixels! (can change to INPUT_METERS)
+ line_width = 0 # Line Width in Pixels (0 for fill)
+ klistener = None
+
+ screen_offset = (0, 0) # Offset screen from world coordinate system (x, y) [meter5]
+ screen_offset_pixel = (0, 0) # Offset screen from world coordinate system (x, y) [pixel]
+
+ # The internal coordination system is y+=up, x+=right
+ # But it's possible to change the input coords to something else,
+ # they will then be translated on input
+ inputAxis_x_left = False # positive to the right by default
+ inputAxis_y_down = True # positive to up by default
+
+ mouseJoint = None
+
+ def __init__(self, screen_size, gravity=(0.0,-9.0), ppm=100.0, renderer='pygame'):
+ """ Init the world with boundaries and gravity, and init colors.
+
+ Parameters:
+ screen_size .. (w, h) -- screen size in pixels [int]
+ gravity ...... (x, y) in m/s^2 [float] default: (0.0, -9.0)
+ ppm .......... pixels per meter [float] default: 100.0
+ renderer ..... which drawing method to use (str) default: 'pygame'
+
+ Return: class Elements()
+ """
+ self.set_screenSize(screen_size)
+ self.set_drawingMethod(renderer)
+
+ # Create Subclasses
+ self.add = add_objects.Add(self)
+ self.callbacks = callbacks.CallbackHandler(self)
+ self.camera = camera.Camera(self)
+
+ # Set Boundaries
+ self.worldAABB=box2d.b2AABB()
+ self.worldAABB.lowerBound.Set(-100.0, -100.0)
+ self.worldAABB.upperBound.Set(100.0, 100.0)
+
+ # Gravity + Bodies will sleep on outside
+ gx, gy = gravity
+ self.gravity = box2d.b2Vec2(gx, gy);
+ self.doSleep = True
+
+ # Create the World
+ self.world = box2d.b2World(self.worldAABB, self.gravity, self.doSleep)
+
+ # Init Colors
+ self.init_colors()
+
+ # Set Pixels per Meter
+ self.ppm = ppm
+
+ def set_inputUnit(self, input):
+ """ Change the input unit to either meter or pixels
+
+ Parameters:
+ input ... INPUT_METERS or INPUT_PIXELS
+
+ Return: -
+ """
+ self.input = input
+
+ def set_inputAxisOrigin(self, left=True, top=False):
+ """ Change the origin of the input coordinate system axis
+
+ Parameters:
+ left ... True or False -- x = 0 is at the left?
+ top .... True or False -- y = 0 is at the top?
+
+ Return: -
+ """
+ self.inputAxis_x_left = not left
+ self.inputAxis_y_down = top
+
+ def set_drawingMethod(self, m, *kw):
+ """ Set a drawing method (from drawing.py)
+
+ Parameters:
+ m .... 'pygame' or 'cairo'
+ *kw .. keywords to pass to the initializer of the drawing method
+
+ Return: True if ok, False if no method identifier m found
+ """
+ try:
+ self.renderer = getattr(drawing, "draw_%s" % m) (*kw)
+ return True
+ except AttributeError:
+ return False
+
+ def set_screenSize(self, size):
+ """ Set the current screen size
+
+ Parameters:
+ size ... (int(width), int(height)) in pixels
+
+ Return: -
+ """
+ self.display_width, self.display_height = size
+
+ def init_colors(self):
+ """ Init self.colors with a fix set of hex colors
+
+ Return: -
+ """
+ self.fixed_color = None
+ self.cur_color = 0
+ self.colors = [
+ "#737934", "#729a55", "#040404", "#1d4e29", "#ae5004", "#615c57",
+ "#6795ce", "#203d61", "#8f932b"
+ ]
+ shuffle(self.colors)
+
+ def set_color(self, clr):
+ """ Set a fixed color for all future Elements (until reset_color() is called)
+
+ Parameters:
+ clr ... Hex '#123123' or RGB ((r), (g), (b))
+
+ Return: -
+ """
+ self.fixed_color = clr
+
+ def reset_color(self):
+ """ All Elements from now on will be drawn in random colors
+
+ Return: -
+ """
+ self.fixed_color = None
+
+ def get_color(self):
+ """ Get a color - either the fixed one or the next from self.colors
+
+ Return: clr = ((R), (G), (B))
+ """
+ if self.fixed_color != None:
+ return self.fixed_color
+
+ if self.cur_color == len(self.colors):
+ self.cur_color = 0
+ shuffle(self.colors)
+
+ clr = self.colors[self.cur_color]
+ if clr[0] == "#":
+ clr = tools.hex2rgb(clr)
+
+ self.cur_color += 1
+ return clr
+
+ def update(self, fps=50.0, iterations=10):
+ """ Update the physics, if not paused (self.run_physics)
+
+ Parameters:
+ fps ......... fps with which the physics engine shall work
+ iterations .. substeps per step for smoother simulation
+
+ Return: -
+ """
+ if self.run_physics:
+ self.world.Step(1.0 / fps, iterations);
+
+ def translate_coord(self, point):
+ """ Flips the coordinates in another coordinate system orientation, if necessary
+ (screen <> world coordinate system)
+ """
+ x, y = point
+
+ if self.inputAxis_x_left:
+ x = self.display_width - x
+
+ if self.inputAxis_y_down:
+ y = self.display_height - y
+
+ return (x, y)
+
+ def translate_coords(self, pointlist):
+ """ Flips the coordinates in another coordinate system orientation, if necessary
+ (screen <> world coordinate system)
+ """
+ p_out = []
+ for p in pointlist:
+ p_out.append(self.translate_coord(p))
+ return p_out
+
+ def to_world(self, pos):
+ """ Transfers a coordinate from the screen to the world coordinate system (pixels)
+ - Change to the right axis orientation
+ - Include the offset: screen -- world coordinate system
+ - Include the scale factor (Screen coordinate system might have a scale factor)
+ """
+ dx, dy = self.screen_offset_pixel
+
+ x = pos[0] / self.camera.scale_factor
+ y = pos[1] / self.camera.scale_factor
+
+ x, y = self.translate_coord((round(x), round(y)))
+ return (x+dx, y+dy)
+
+ def to_screen(self, pos):
+ """ Transfers a coordinate from the world to the screen coordinate system (pixels)
+ and by the screen offset
+ """
+ dx, dy = self.screen_offset_pixel
+ x = pos[0] - dx
+ y = pos[1] - dy
+
+ sx, sy = self.translate_coord((x, y))
+ return (sx * self.camera.scale_factor, sy * self.camera.scale_factor)
+
+ def meter_to_screen(self, i):
+ return i * self.ppm * self.camera.scale_factor
+
+ def get_bodies_at_pos(self, search_point, include_static=False, area=0.01):
+ """ Check if given point (screen coordinates) is inside any body.
+ If yes, return all found bodies, if not found return False
+ """
+ sx, sy = self.to_world(search_point)
+ sx /= self.ppm # le sigh, screen2world returns pixels, so convert them to meters here.
+ sy /= self.ppm
+
+ f = area/self.camera.scale_factor
+
+ AABB=box2d.b2AABB()
+ AABB.lowerBound.Set(sx-f, sy-f);
+ AABB.upperBound.Set(sx+f, sy+f);
+
+ amount, shapes = self.world.Query(AABB, 2)
+
+ if amount == 0:
+ return False
+ else:
+ bodylist = []
+ for s in shapes:
+ body = s.GetBody()
+ if not include_static:
+ if body.IsStatic() or body.GetMass() == 0.0:
+ continue
+
+ if s.TestPoint(body.GetXForm(), box2d.b2Vec2(sx, sy)):
+ bodylist.append(body)
+
+ return bodylist
+
+ def draw(self):
+ """ If a drawing method is specified, this function passes the objects
+ to the module in pixels.
+
+ Return: True if the objects were successfully drawn
+ False if the renderer was not set or another error occurred
+ """
+ self.callbacks.start(CALLBACK_DRAWING_START)
+
+ # No need to run through the loop if there's no way to draw
+ if not self.renderer:
+ return False
+
+ if self.camera.track_body:
+ # Get Body Center
+ p1 = self.camera.track_body.GetWorldCenter()
+
+ # Center the Camera There, False = Don't stop the tracking
+ self.camera.center(self.to_screen((p1.x*self.ppm, p1.y*self.ppm)), stopTrack=False)
+
+ # Walk through all known elements
+ body = self.world.GetBodyList()
+ self.renderer.start_drawing()
+
+ while body:
+ xform = body.GetXForm()
+ shape = body.GetShapeList()
+ angle = body.GetAngle()
+
+ if shape:
+ userdata = body.GetUserData()
+ clr = userdata['color']
+
+ while shape:
+ type = shape.GetType()
+
+ if type == box2d.e_circleShape:
+ circle = shape.asCircle()
+ position = box2d.b2Mul(xform, circle.GetLocalPosition())
+
+ pos = self.to_screen((position.x*self.ppm, position.y*self.ppm))
+ self.renderer.draw_circle(clr, pos, self.meter_to_screen(circle.GetRadius()), angle)
+
+ elif type == box2d.e_polygonShape:
+ poly = shape.asPolygon()
+ points = []
+ for i in xrange(poly.GetVertexCount()):
+ pt = box2d.b2Mul(xform, poly.getVertex(i))
+ x, y = self.to_screen((pt.x*self.ppm, pt.y*self.ppm))
+ points.append([x, y])
+
+ self.renderer.draw_polygon(clr, points)
+
+ else:
+ print " unknown shape type:%d" % shape.GetType()
+
+ shape = shape.GetNext()
+ body = body.GetNext()
+
+ joint = self.world.GetJointList()
+ while joint:
+ p2 = joint.GetAnchor1()
+ p2 = self.to_screen((p2.x*self.ppm, p2.y*self.ppm))
+
+ p1 = joint.GetAnchor2()
+ p1 = self.to_screen((p1.x*self.ppm, p1.y*self.ppm))
+
+ if p1 == p2:
+ self.renderer.draw_circle((255,255,255), p1, 2, 0)
+ else:
+ self.renderer.draw_lines((0,0,0), False, [p1, p2], 3)
+ joint = joint.GetNext()
+
+ self.callbacks.start(CALLBACK_DRAWING_END)
+ self.renderer.after_drawing()
+
+ return True
+
+
+ def mouse_move(self, pos):
+ pos = self.to_world(pos)
+ x, y = pos
+ x /= self.ppm
+ y /= self.ppm
+
+ if self.mouseJoint:
+ self.mouseJoint.SetTarget(box2d.b2Vec2(x,y))
diff --git a/elements/locals.py b/elements/locals.py
new file mode 100755
index 0000000..85528f7
--- /dev/null
+++ b/elements/locals.py
@@ -0,0 +1,37 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+INPUT_METERS = 0
+INPUT_PIXELS = 1
+
+CALLBACK_CONTACT_ADD = 0
+CALLBACK_CONTACT_PERSIST = 1
+CALLBACK_CONTACT_REMOVE = 2
+
+CALLBACK_DRAWING_START = 3
+CALLBACK_DRAWING_END = 4
+
+FLT_EPSILON = 1.192092896e-07
diff --git a/elements/menu.py b/elements/menu.py
new file mode 100755
index 0000000..1c8a417
--- /dev/null
+++ b/elements/menu.py
@@ -0,0 +1,237 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+import pygame
+from pygame.locals import *
+
+import tools
+
+COLOR_HEX_BLUE1 = "6491a4"
+COLOR_HEX_BLUE2 = "9ec9ff"
+
+class MenuItem:
+ # padding [px]: left, top, right, bottom
+ padding = (5, 2, 5, 2)
+
+ def empty(self, *args):
+ pass
+
+ def __init__(self, title, pos, userData, parent=None, callback=None):
+ self.title = title
+ self.userData = userData
+ self.parent = parent
+ self.childs = []
+
+ if self.parent:
+ self.visible = False
+ else:
+ self.visible = True
+
+ if callback:
+ self.callback = callback
+ else:
+ self.callback = self.empty
+
+ # Create Surface and Stuff :)
+ self.font = pygame.font.Font(None, 32)
+ text = self.font.render(title, 1, (255,255,255))
+
+ rx, ry, rw, rh = rect = text.get_rect()
+ pl, pt, pr, pb = self.padding
+
+ s1 = pygame.Surface((rw+pl+pr, rh+pt+pb))
+ s1.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
+ s1.blit(text, (pl, pt))
+
+ s2 = pygame.Surface((rw+pl+pr, rh+pt+pb))
+ s2.fill(tools.hex2rgb(COLOR_HEX_BLUE2))
+ s2.blit(text, (pl, pt))
+
+ self.rect = s1.get_rect().move(pos)
+
+ self.surface_inactive = s1
+ self.surface_active = s2
+
+ def pos_inside(self, pos):
+ if not self.visible:
+ return False
+
+ x,y,w,h = self.rect
+ px, py = pos
+
+ if px > x and px < x+w and py > y and py < y+h:
+ return True
+ else:
+ return False
+
+class MenuClass:
+ """ Important: Never delete an Item, just overwrite it if deleting,
+ else the menuitem id's get messed up
+ """
+ # current active menu point it
+ focus = False
+
+ # each item is stored as MenuItem
+ items = []
+
+ # where to start drawing
+ start_at = (0, 0)
+
+ # menubar properties
+ height = 0 # px
+ width = 0 # px (set in set_width)
+ setWidth = False # if width was set by hand (if not, increase width by adding stuff)
+
+ def __init__(self):
+ self.draw_at = self.start_at
+
+ def set_width(self, width):
+ self.setWidth = True
+ self.width = width
+
+ def addItem(self, title, callback=None, userData='', parent=None):
+ # Get position for the Item
+ if parent: draw_at = (0,0)
+ else: draw_at = self.draw_at
+
+ # Create Items
+ M = MenuItem(title=title, pos=draw_at, userData=userData, parent=parent, callback=callback)
+ self.items.append(M)
+
+ # Set a new position
+ x,y,w,h = M.rect
+ x, y = self.draw_at
+
+ if parent:
+ # Set the info that the item has a child to the parent item
+ self.items[parent-1].childs.append(len(self.items)-1)
+
+ else:
+ # New next drawing position
+ self.draw_at = (x+w, y)
+
+ # Adjust the width of the menu bar
+ if not self.setWidth:
+ self.width = x+w
+
+ # Adjust the height of the menu bar
+ if h > self.height: self.height = h + 2
+
+ # Return array id of this item
+ return len(self.items)
+
+ def click(self, pos):
+ """ Checks a click for menuitems and starts the callback if found
+
+ Return: True if a menu item was found or hit the MenuBar, and False if not
+ """
+ focus_in = self.focus
+
+ found = False
+ for i in xrange(len(self.items)):
+ item = self.items[i]
+ if item.pos_inside(pos):
+ found = True
+ item.callback(item.title, item.userData)
+
+ # Expand the menu if necessary
+ if len(item.childs) > 0:
+ self.focus = i+1
+
+ # Close any opened menu windows if clicked somewhere else
+ if self.focus == focus_in:
+ self.focus = False
+ self.subwin_rect = (0,0,0,0)
+ for item in self.items:
+ if item.parent:
+ item.visible = False
+
+ # Check if click is inside menubar
+ x,y = pos
+ mx, my = self.start_at
+
+ if found:
+ return True
+ else:
+ return False
+
+ def draw(self, surface):
+ """ Draw the menu with pygame on a given surface
+ """
+ s = pygame.Surface((self.width, self.height))
+ s.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
+
+ surface.blit(s, (0,0))
+
+ for i in xrange(len(self.items)):
+ item = self.items[i]
+ if not item.parent:
+ x,y,w,h = item.rect
+ if self.focus == i+1:
+ surface.blit(item.surface_active, (x,y))
+ else:
+ surface.blit(item.surface_inactive, (x,y))
+
+ # If a menu item is open, draw that
+ if self.focus:
+ width = 0
+ height = 0
+
+ i = []
+ for j in self.items:
+ if j.parent == self.focus:
+ i.append(j)
+ x, y, w, h = j.rect
+ if w > width: width = w
+ height += h
+
+ if len(i) > 0:
+ s = pygame.Surface((width, height))
+ s.fill(tools.hex2rgb(COLOR_HEX_BLUE1))
+
+ # Parent Coordinates
+ px, py, pw, ph = self.items[self.focus-1].rect
+
+ # y Counter
+ y = 0
+
+ for item in i:
+ item.visible = True
+ s.blit(item.surface_inactive, (0, y))
+
+ ix, iy, iw, ih = item.rect
+ if (ix, iy) == (0, 0):
+ item.rect = item.rect.move((px, y+ph))
+ ix, iy, iw, ih = item.rect
+
+ if iw < width:
+ item.rect = (ix,iy,width,ih)
+
+ y += ih
+
+ surface.blit(s, (px,py+ph))
+ self.subwin_rect = s.get_rect().move(px, py+ph)
+
diff --git a/elements/tools.py b/elements/tools.py
new file mode 100755
index 0000000..9851ff8
--- /dev/null
+++ b/elements/tools.py
@@ -0,0 +1,65 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+# Some Hex Tools
+def hex2dec(hex):
+ """ Convert and hex value in a decimal number
+ """
+ return int(hex, 16)
+
+def hex2rgb(hex):
+ """ Convert a hex color (#123abc) in RGB ((r), (g), (b))
+ """
+ if hex[0:1] == '#': hex = hex[1:];
+ return (hex2dec(hex[:2]), hex2dec(hex[2:4]), hex2dec(hex[4:6]))
+
+def rgb2floats(rgb):
+ """Convert a color in the RGB (0..255,0..255,0..255) format to the
+ (0..1, 0..1, 0..1) float format
+ """
+ ret = []
+ for c in rgb:
+ ret.append(float(c) / 255)
+ return ret
+
+def point_in_poly(point, poly):
+ #print ">", point, poly
+ x, y = point
+ n = len(poly)
+ inside = False
+ p1x,p1y = poly[0]
+ for i in range(n+1):
+ p2x,p2y = poly[i % n]
+ if y > min(p1y,p2y):
+ if y <= max(p1y,p2y):
+ if x <= max(p1x,p2x):
+ if p1y != p2y:
+ xinters = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
+ if p1x == p2x or x <= xinters:
+ inside = not inside
+ p1x,p1y = p2x,p2y
+ return inside
+ \ No newline at end of file
diff --git a/elements/tools_poly.py b/elements/tools_poly.py
new file mode 100755
index 0000000..cd6c4c6
--- /dev/null
+++ b/elements/tools_poly.py
@@ -0,0 +1,440 @@
+"""
+This file is part of the 'Elements' Project
+Elements is a 2D Physics API for Python (supporting Box2D2)
+
+Copyright (C) 2008, The Elements Team, <elements@linuxuser.at>
+
+Home: http://elements.linuxuser.at
+IRC: #elements on irc.freenode.org
+
+Code: http://www.assembla.com/wiki/show/elements
+ svn co http://svn2.assembla.com/svn/elements
+
+License: GPLv3 | See LICENSE for the full text
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+from functools import partial
+
+from math import fabs
+from math import sqrt
+from math import atan
+from math import atan2
+from math import degrees
+from math import acos
+
+from locals import *
+from elements import box2d
+
+def ComputeCentroid(pd):
+ count = pd.vertexCount
+
+ if count < 3:
+ return False
+
+ c = box2d.b2Vec2(0, 0)
+ area = 0.0
+
+ # pRef is the reference point for forming triangles.
+ # It's location doesn't change the result (except for rounding error).
+ pRef = box2d.b2Vec2(0.0, 0.0)
+
+ inv3 = 1.0 / 3.0
+
+ for i in range(count):
+ # Triangle vertices.
+ p1 = pRef
+ p2 = pd.getVertex(i)
+ if i + 1 < count:
+ p3 = pd.getVertex(i+1)
+ else: p3 = pd.getVertex(0)
+
+ e1 = p2 - p1
+ e2 = p3 - p1
+
+ D = box2d.b2Cross(e1, e2)
+
+ triangleArea = 0.5 * D
+ area += triangleArea
+
+ # Area weighted centroid
+ c += triangleArea * inv3 * (p1 + p2 + p3)
+
+ # Centroid
+ # if area < FLT_EPSILON:
+ #raise ValueError, "ComputeCentroid: area < FLT_EPSILON"
+
+ return c / area
+
+def checkDef(pd):
+ """Check the polygon definition for invalid vertices, etc.
+
+ Return: True if valid, False if invalid
+ """
+
+# if pd.vertexCount < 3 or pd.vertexCount > box2d.b2_maxPolygonVertices:
+ #raise ValueError, "Invalid vertexCount"
+
+ threshold = FLT_EPSILON * FLT_EPSILON
+ verts = pd.getVertices_b2Vec2()
+ normals = []
+ v0 = verts[0]
+ for i in range(pd.vertexCount):
+ if i == pd.vertexCount-1:
+ v1 = verts[0]
+ else: v1 = verts[i+1]
+ edge=v1 - v0
+# if edge.LengthSquared() < threshold:
+# raise ValueError, "edge.LengthSquared < FLT_EPSILON**2"
+ normals.append( box2d.b2Cross(edge, 1.0) )
+ normals[-1].Normalize()
+ v0=v1
+
+ centroid = ComputeCentroid(pd)
+
+ d=box2d.b2Vec2()
+ for i in range(pd.vertexCount):
+ i1 = i - 1
+ if i1 < 0: i1 = pd.vertexCount - 1
+ i2 = i
+ n1 = normals[i1]
+ n2 = normals[i2]
+ v = verts[i] - centroid
+
+ d.x = box2d.b2Dot(n1, v) - box2d.b2_toiSlop
+ d.y = box2d.b2Dot(n2, v) - box2d.b2_toiSlop
+
+ # Shifting the edge inward by b2_toiSlop should
+ # not cause the plane to pass the centroid.
+
+ # Your shape has a radius/extent less than b2_toiSlop.
+# if d.x < 0.0 or d.y <= 0.0:
+# raise ValueError, "Your shape has a radius/extent less than b2_toiSlop."
+
+ A = box2d.b2Mat22()
+ A.col1.x = n1.x; A.col2.x = n1.y
+ A.col1.y = n2.x; A.col2.y = n2.y
+ #coreVertices[i] = A.Solve(d) + m_centroid
+
+ return True
+
+def calc_center(points):
+ """ Calculate the center of a polygon
+
+ Return: The center (x,y)
+ """
+ tot_x, tot_y = 0,0
+ for p in points:
+ tot_x += p[0]
+ tot_y += p[1]
+ n = len(points)
+ return (tot_x/n, tot_y/n)
+
+def poly_center_vertices(pointlist):
+ """ Rearranges vectors around the center
+
+ Return: pointlist ([(x, y), ...])
+ """
+ poly_points_center = []
+ center = cx, cy = calc_center(pointlist)
+
+ for p in pointlist:
+ x = p[0] - cx
+ y = cy - p[1]
+ poly_points_center.append((x, y))
+
+ return poly_points_center
+
+def is_line(vertices, tolerance=25.0):
+ """ Check if passed vertices are a line. Done by comparing
+ the angles of all vectors and check tolerance.
+
+ Parameters:
+ vertices ... a list of vertices (x, y)
+ tolerance .. how many degrees should be allowed max to be a line
+
+ Returns: True if line, False if no line
+ """
+ if len(vertices) <= 2:
+ return True
+
+ # Step 1: Points -> Vectors
+ p_old = vertices[0]
+ alphas = []
+
+
+ for p in vertices[1:]:
+ x1, y1 = p_old
+ x2, y2 = p
+ p_old = p
+
+ # Create Vector
+ vx, vy = (x2-x1, y2-y1)
+
+ # Check Length
+ l = sqrt((vx*vx) + (vy*vy))
+ if l == 0.0: continue
+
+ # Normalize vector
+ vx /= l
+ vy /= l
+
+ # Append angle
+ if fabs(vx) < 0.2: alpha = 90.0
+ else: alpha = degrees(atan(vy / vx))
+
+ alphas.append(fabs(alpha))
+
+ # Sort angles
+ alphas.sort()
+
+ # Get maximum difference
+ alpha_diff = fabs(alphas[-1] - alphas[0])
+ print "alpha difference:", alpha_diff
+
+ if alpha_diff < tolerance:
+ return True
+ else:
+ return False
+
+def reduce_poly_by_angle(vertices, tolerance=10.0, minlen=20):
+ """ This function reduces a poly by the angles of the vectors (detect lines)
+ If the angle difference from one vector to the last > tolerance: use last point
+ If the angle is quite the same, it's on the line
+
+ Parameters:
+ vertices ... a list of vertices (x, y)
+ tolerance .. how many degrees should be allowed max
+
+ Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
+ """
+ v_last = vertices[-1]
+ vertices = vxx = reduce_poly(vertices, minlen)
+
+ p_new = []
+ p_new.append(vertices[0])
+
+ dir = None
+ is_convex = True
+
+ for i in xrange(len(vertices)-1):
+ if i == 0:
+ p_old = vertices[i]
+ continue
+
+ x1, y1 = p_old
+ x2, y2 = vertices[i]
+ x3, y3 = vertices[i+1]
+ p_old = vertices[i]
+
+ # Create Vectors
+ v1x = (x2 - x1) * 1.0
+ v1y = (y2 - y1) * 1.0
+
+ v2x = (x3 - x2) * 1.0
+ v2y = (y3 - y2) * 1.0
+
+ # Calculate angle
+ a = ((v1x * v2x) + (v1y * v2y))
+ b = sqrt((v1x*v1x) + (v1y*v1y))
+ c = sqrt((v2x*v2x) + (v2y*v2y))
+
+ # No Division by 0 :)
+ if (b*c) == 0.0: continue
+
+ # Get the current degrees
+ # We have a bug here sometimes...
+ try:
+ angle = degrees(acos(a / (b*c)))
+ except:
+ # cos=1.0
+ print "cos=", a/(b*c)
+ continue
+
+ # Check if inside tolerance
+ if fabs(angle) > tolerance:
+ p_new.append(vertices[i])
+ # print "x", 180-angle, is_left(vertices[i-1], vertices[i], vertices[i+1])
+
+ # Check if convex:
+ if dir == None:
+ dir = is_left(vertices[i-1], vertices[i], vertices[i+1])
+ else:
+ if dir != is_left(vertices[i-1], vertices[i], vertices[i+1]):
+ is_convex = False
+
+ # We also want to append the last point :)
+ p_new.append(v_last)
+
+ # Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
+ return p_new, is_convex
+
+ """ OLD FUNCTION: """
+ # Wipe all points too close to each other
+ vxx = vertices = reduce_poly(vertices, minlen)
+
+ # Create Output List
+ p_new = []
+ p_new.append(vertices[0])
+
+ # Set the starting vertice
+ p_old = vertices[0]
+ alpha_old = None
+
+ # For each vector, compare the angle difference to the last one
+ for i in range(1, len(vertices)):
+ x1, y1 = p_old
+ x2, y2 = vertices[i]
+ p_old = (x2, y2)
+
+ # Make Vector
+ vx, vy = (x2-x1, y2-y1)
+
+ # Vector length
+ l = sqrt((vx*vx) + (vy*vy))
+
+ # normalize
+ vx /= l
+ vy /= l
+
+ # Get Angle
+ if fabs(vx) < 0.2:
+ alpha = 90
+ else:
+ alpha = degrees(atan(vy * 1.0) / (vx*1.0))
+
+ if alpha_old == None:
+ alpha_old = alpha
+ continue
+
+ # Get difference to previous angle
+ alpha_diff = fabs(alpha - alpha_old)
+ alpha_old = alpha
+
+ # If the new vector differs from the old one, we add the old point
+ # to the output list, as the line changed it's way :)
+ if alpha_diff > tolerance:
+ #print ">",alpha_diff, "\t", vx, vy, l
+ p_new.append(vertices[i-1])
+
+ # We also want to append the last point :)
+ p_new.append(vertices[-1])
+
+ # Returns: (1) New Pointlist, (2) Soft reduced pointlist (reduce_poly())
+ return p_new, vxx
+
+
+# The following functions is_left, reduce_poly and convex_hull are
+# from the pymunk project (http://code.google.com/p/pymunk/)
+def is_left(p0, p1, p2):
+ """Test if p2 is left, on or right of the (infinite) line (p0,p1).
+
+ :return: > 0 for p2 left of the line through p0 and p1
+ = 0 for p2 on the line
+ < 0 for p2 right of the line
+ """
+ sorting = (p1[0] - p0[0])*(p2[1]-p0[1]) - (p2[0]-p0[0])*(p1[1]-p0[1])
+ if sorting > 0: return 1
+ elif sorting < 0: return -1
+ else: return 0
+
+def is_convex(points):
+ """Test if a polygon (list of (x,y)) is strictly convex or not.
+
+ :return: True if the polygon is convex, False otherwise
+ """
+ #assert len(points) > 2, "not enough points to form a polygon"
+
+ p0 = points[0]
+ p1 = points[1]
+ p2 = points[2]
+
+ xc, yc = 0, 0
+ is_same_winding = is_left(p0, p1, p2)
+ for p2 in points[2:] + [p0] + [p1]:
+ if is_same_winding != is_left(p0, p1, p2):
+ return False
+ a = p1[0] - p0[0], p1[1] - p0[1] # p1-p0
+ b = p2[0] - p1[0], p2[1] - p1[1] # p2-p1
+ if sign(a[0]) != sign(b[0]): xc +=1
+ if sign(a[1]) != sign(b[1]): yc +=1
+ p0, p1 = p1, p2
+
+ return xc <= 2 and yc <= 2
+
+def sign(x):
+ if x < 0: return -1
+ else: return 1
+
+
+def reduce_poly(points, tolerance=50):
+ """Remove close points to simplify a polyline
+ tolerance is the min distance between two points squared.
+
+ :return: The reduced polygon as a list of (x,y)
+ """
+ curr_p = points[0]
+ reduced_ps = [points[0]]
+
+ for p in points[1:]:
+ x1, y1 = curr_p
+ x2, y2 = p
+ dx = fabs(x2 - x1)
+ dy = fabs(y2 - y1)
+ l = sqrt((dx*dx) + (dy*dy))
+ if l > tolerance:
+ curr_p = p
+ reduced_ps.append(p)
+
+ return reduced_ps
+
+def convex_hull(points):
+ """Create a convex hull from a list of points.
+ This function uses the Graham Scan Algorithm.
+
+ :return: Convex hull as a list of (x,y)
+ """
+ ### Find lowest rightmost point
+ p0 = points[0]
+ for p in points[1:]:
+ if p[1] < p0[1]:
+ p0 = p
+ elif p[1] == p0[1] and p[0] > p0[0]:
+ p0 = p
+ points.remove(p0)
+
+ ### Sort the points angularly about p0 as center
+ f = partial(is_left, p0)
+ points.sort(cmp = f)
+ points.reverse()
+ points.insert(0, p0)
+
+ ### Find the hull points
+ hull = [p0, points[1]]
+
+ for p in points[2:]:
+
+ pt1 = hull[-1]
+ pt2 = hull[-2]
+ l = is_left(pt2, pt1, p)
+ if l > 0:
+ hull.append(p)
+ else:
+ while l <= 0 and len(hull) > 2:
+ hull.pop()
+ pt1 = hull[-1]
+ pt2 = hull[-2]
+ l = is_left(pt2, pt1, p)
+ hull.append(p)
+ return hull
+
diff --git a/olpcgames/__init__.py b/olpcgames/__init__.py
new file mode 100755
index 0000000..504388c
--- /dev/null
+++ b/olpcgames/__init__.py
@@ -0,0 +1,102 @@
+"""Wrapper/adaptation system for writing/porting Pygame games to OLPC/Sugar
+
+The wrapper system attempts to substitute various pieces of the Pygame
+implementation in order to make code written without knowledge of the
+OLPC/Sugar environment run "naturally" under the GTK environment of
+Sugar. It also provides some convenience mechanisms for dealing with
+e.g. the Camera and Mesh Network system.
+
+Considerations for Developers:
+
+Pygame programs running under OLPCGames will generally not have
+"hardware" surfaces, and will not be able to have a reduced-resolution
+full-screen view to optimise rendering. The Pygame code will run in
+a secondary thread, with the main GTK UI running in the primary thread.
+A third "mainloop" thread will occasionally be created to handle the
+GStreamer interface to the camera.
+
+Attributes of Note:
+
+ ACTIVITY -- if not None, then the activity instance which represents
+ this activity at the Sugar shell level.
+ WIDGET -- PygameCanvas instance, a GTK widget with an embedded
+ socket object which is a proxy for the SDL window Pygame to which
+ pygame renders.
+
+ Constants: All event constants used by the package are defined at this
+ level. Note that eventually we will need to switch to using UserEvent
+ and making these values sub-types rather than top-level types.
+
+
+Pygame events at the Activity Level:
+
+ pygame.USEREVENT
+ code == olpcgames.FILE_READ_REQUEST
+ filename (unicode/string) -- filename from which to read
+ metadata (dictionary-like) -- mapping from key to string values
+
+ Note: due to a limitation in the Sugar API, the GTK event loop
+ will be *frozen* during this operation, as a result you cannot
+ make any DBUS or GTK calls, nor can you use GUI during the
+ call to provide input. That is, you have to process this event
+ synchronously.
+
+ code == olpcgames.FILE_WRITE_REQUEST
+ filename (unicode/string) -- file name to which to write
+ metadata (dictionary-like) -- mapping from key: value where all
+ values must (currently) be strings
+
+ Note: due to a limitation in the Sugar API, the GTK event loop
+ will be *frozen* during this operation, as a result you cannot
+ make any DBUS or GTK calls, nor can you use GUI during the
+ call to provide input. That is, you have to process this event
+ synchronously.
+
+see also the mesh and camera modules for more events.
+
+Deprecated:
+
+ This module includes the activity.PyGameActivity class currently,
+ this is a deprecated mechanism for accessing the activity class,
+ and uses the deprecated spelling (case) of the name. Use:
+
+ from olpcgames import activity
+
+ class MyActivity( activity.PygameActivity ):
+ ...
+
+ to define your PygameActivity subclass (note the case of the
+ spelling, which now matches Pygame's own spelling).
+"""
+from olpcgames._version import __version__
+ACTIVITY = None
+widget = WIDGET = None
+
+# XXX problem here, we're filling up the entirety of the Pygame
+# event-set with just this small bit of functionality, obviously
+# Pygame is not intending for this kind of usage!
+(
+ CAMERA_LOAD, CAMERA_LOAD_FAIL,
+
+ CONNECT,PARTICIPANT_ADD,
+ PARTICIPANT_REMOVE,
+ MESSAGE_UNI,MESSAGE_MULTI,
+) = range( 25, 32 )
+
+# These events use UserEvent.code, eventually *all* events should be
+# delivered as UserEvent with code set to the values defined here...
+
+(
+ #NET_CONNECT, NET_PARTICIPANT_ADD,NET_PARTICIPANT_REMOVE,
+ #NET_MESSAGE_UNICAST, NET_MESSAGE_MULTICAST,
+ #CAMERA_LOAD, CAMERA_LOAD_FAIL,
+ FILE_READ_REQUEST, FILE_WRITE_REQUEST,
+) = range(
+ 2**16, 2**16+2,
+)
+
+try:
+ from olpcgames.activity import PygameActivity as PyGameActivity
+except ImportError, err:
+ PyGameActivity = None
+
diff --git a/olpcgames/_cairoimage.py b/olpcgames/_cairoimage.py
new file mode 100755
index 0000000..3cfa22c
--- /dev/null
+++ b/olpcgames/_cairoimage.py
@@ -0,0 +1,135 @@
+"""Utility functions for cairo-specific operations
+
+USE_BASE_ARRAY -- if False (default), uses numpy arrays,
+ currently this is the only version that works on 32-bit
+ machines.
+"""
+import pygame, struct, logging
+big_endian = struct.pack( '=i', 1 ) == struct.pack( '>i', 1 )
+
+log = logging.getLogger( 'olpcgames._cairoimage' )
+##log.setLevel( logging.DEBUG )
+
+USE_BASE_ARRAY = False
+
+def newContext( width, height ):
+ """Create a new render-to-image context
+
+ width, height -- pixel dimensions to be rendered
+
+ Produces an ARGB format Cairo ImageSurface for
+ rendering your data into using rsvg, Cairo or Pango.
+
+ returns (ImageSurface, CairoContext) for rendering
+ """
+ import cairo
+ csrf = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
+ context = cairo.Context (csrf)
+ #log.info( 'Format (expect: %s): %s', cairo.FORMAT_ARGB32, csrf.get_format())
+ return csrf, context
+
+def mangle_color(color):
+ """Mange a colour depending on endian-ness, and swap-necessity
+
+ Converts a 3 or 4 int (or float) value in the range 0-255 into a
+ 4-float value in the range 0.0-1.0
+ """
+ r,g,b = color[:3]
+ if len(color) > 3:
+ a = color[3]
+ else:
+ a = 255.0
+ return map(_fixColorBase, (r,g,b,a) )
+
+def _fixColorBase( v ):
+ """Return a properly clamped colour in floating-point space"""
+ return max((0,min((v,255.0))))/255.0
+
+def asImage( csrf ):
+ """Get the pixels in csrf as a Pygame image
+
+ Note that Pygame 1.7.1 on (Gentoo Linux) AMD64 is incorrectly
+ calculating the required size ARGB images, so this code will *not* work
+ on that platform with that version of the library. Pygame-ctypes
+ does work correctly there.
+
+ Note also that Pygame 1.7.1 is showing a strange colour rotation
+ bug on 32-bit platforms, such that ARGB mode cannot be used for
+ images there. Instead we have to do an expensive bit-shift operation
+ to produce an RGBA image from the ARGB native Cairo format.
+
+ Will raise a ValueError if passed a Null image (i.e. dimension of 0)
+
+ returns Pygame.Surface (image) with convert_alpha() called for it.
+ """
+ # Create and return a new Pygame Image derived from the Cairo Surface
+ format = 'ARGB'
+ if hasattr(csrf,'get_data'):
+ # more recent API, native-format, but have to (potentially) convert the format...
+ log.debug( 'Native-mode api (get_data)' )
+ data = csrf.get_data()
+ if not big_endian:
+ # we use array here because it's considerably lighter-weight
+ # to import than the numpy module
+ log.debug( 'Not big-endian, byte-swapping array' )
+ if USE_BASE_ARRAY:
+ import array
+ a = array.array( 'I' )
+ a.fromstring( data )
+ a.byteswap()
+ data = a.tostring()
+ else:
+ import numpy
+ n = numpy.fromstring( data, dtype='I' )
+ n = ((n & 0xff000000) >> 24 ) | ((n & 0x00ffffff) << 8 )
+ n = n.byteswap()
+ data = n.tostring()
+ format = 'RGBA'
+ else:
+ log.debug( 'Big-endian, array unchanged' )
+ data = str(data) # there's one copy
+ else:
+ # older api, not native, but we know what it is...
+ log.debug( 'Non-native mode api, explicitly RGBA' )
+ data = csrf.get_data_as_rgba()
+ data = str(data) # there's one copy
+ format = 'RGBA'
+ width, height = csrf.get_width(),csrf.get_height()
+
+ try:
+ log.info( 'Format = %s', format )
+ return pygame.image.fromstring(
+ data,
+ (width,height),
+ format
+ ) # there's the next
+ except ValueError, err:
+ err.args += (len(data), (width,height), width*height*4,format )
+ raise
+
+if __name__ == "__main__":
+ import unittest
+ logging.basicConfig()
+ class Tests( unittest.TestCase ):
+ def test_colours( self ):
+ """Test that colours are correctly translated
+
+ If we draw a given colour in cairo, we want the same
+ colour to show up in Pygame, let's test that...
+ """
+ for sourceColour in [
+ (255,0,0, 255),
+ (0,255,0, 255),
+ (0,0,255, 255),
+ (255,255,0, 255),
+ (0,255,255,255),
+ (255,0,255,255),
+ ]:
+ csrf,cctx = newContext( 1,1 )
+ background = mangle_color( sourceColour )
+ cctx.set_source_rgba(*background)
+ cctx.paint()
+ img = asImage( csrf )
+ colour = img.get_at( (0,0))
+ assert colour == sourceColour, (sourceColour,mangle_color(sourceColour),colour)
+ unittest.main()
diff --git a/olpcgames/_gtkmain.py b/olpcgames/_gtkmain.py
new file mode 100755
index 0000000..33a6a83
--- /dev/null
+++ b/olpcgames/_gtkmain.py
@@ -0,0 +1,70 @@
+"""Support for GObject mainloop-requiring libraries when not inside GTK
+
+INITIALIZED -- whether we have a running gobject loop yet...
+LOOP_TRACKER -- if present, the manual gtk event loop used to
+ support gobject-based code running in a non-Gobject event loop
+
+Holder -- objects which can be held as attributes to keep the mainloop running
+"""
+import threading, logging
+log = logging.getLogger( 'olpcgames._gtkmain' )
+##log.setLevel( logging.DEBUG )
+
+INITIALIZED = False
+LOOP_TRACKER = None
+
+class _TrackLoop( object ):
+ """Tracks the number of open loops and stops when finished"""
+ count = 0
+ _mainloop = None
+ def increment( self ):
+ log.info( 'Increment from %s', self.count )
+ self.count += 1 # XXX race condition here?
+ if self.count == 1:
+ log.info( 'Creating GObject mainloop')
+ self.t_loop = threading.Thread(target=self.loop)
+ self.t_loop.setDaemon( True )
+ self.t_loop.start()
+ def decrement( self ):
+ log.info( 'Decrement from %s', self.count )
+ self.count -= 1
+ def loop( self ):
+ """Little thread loop that replicates the gtk mainloop"""
+ import gtk
+ while self.count >= 1:
+ log.debug( 'GTK loop restarting' )
+ while gtk.events_pending():
+ gtk.main_iteration()
+ log.debug( 'GTK loop exiting' )
+ try:
+ del self.t_loop
+ except AttributeError, err:
+ pass
+
+class Holder():
+ """Object which, while held, keeps the gtk mainloop running"""
+ def __init__( self ):
+ log.info( 'Beginning hold on GTK mainloop with Holder object' )
+ startGTK()
+ def __del__( self ):
+ log.info( 'Releasing hold on GTK mainloop with Holder object' )
+ stopGTK()
+
+def startGTK( ):
+ """GTK support is required here, process..."""
+ if not INITIALIZED:
+ init()
+ if LOOP_TRACKER:
+ LOOP_TRACKER.increment()
+def stopGTK( ):
+ """GTK support is no longer required, release"""
+ if LOOP_TRACKER:
+ LOOP_TRACKER.decrement()
+def init( ):
+ """Create a gobject mainloop in a sub-thread (you don't need to call this normally)"""
+ global INITIALIZED, LOOP_TRACKER
+ if not INITIALIZED:
+ if not LOOP_TRACKER:
+ LOOP_TRACKER = _TrackLoop()
+ INITIALIZED = True
+ return LOOP_TRACKER
diff --git a/olpcgames/_version.py b/olpcgames/_version.py
new file mode 100755
index 0000000..4c42917
--- /dev/null
+++ b/olpcgames/_version.py
@@ -0,0 +1,2 @@
+"""Module defining the current version of the library"""
+__version__ = '2.0'
diff --git a/olpcgames/activity.py b/olpcgames/activity.py
new file mode 100755
index 0000000..538ba13
--- /dev/null
+++ b/olpcgames/activity.py
@@ -0,0 +1,241 @@
+"""Embeds the Canvas widget into a Sugar-specific Activity environment
+
+The olpcgames.activity module encapsulates creation of a Pygame activity.
+Your Activity should inherit from this class. Simply setting some class
+attributes is all you need to do in a class inheriting from
+olpcgames.activity.PygameActivity in order to get Pygame to work.
+
+(The skeleton builder script creates this file automatically for you).
+
+Note:
+ You should not import pygame into your activity file, as the olpcgames
+ wrapper needs to be initialized before pygame is imported the first time.
+
+Example usage:
+
+ class PygameActivity(activity.Activity):
+ game_name = None
+ game_title = 'Pygame Game'
+ game_size = (units.grid_to_pixels(16),
+ units.grid_to_pixels(11))
+ pygame_mode = 'SDL'
+"""
+import logging
+logging.root.setLevel( logging.WARN )
+log = logging.getLogger( 'olpcgames.activity' )
+##log.setLevel( logging.DEBUG )
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gtk.gdk
+import os
+
+from sugar.activity import activity
+from sugar.graphics import style
+from olpcgames.canvas import PygameCanvas
+from olpcgames import mesh, util
+
+__all__ = ['PygameActivity']
+
+class PygameActivity(activity.Activity):
+ """Pygame-specific activity type, provides boilerplate toolbar, creates canvas
+
+ Subclass Overrides:
+
+ game_name -- specifies a fully-qualified name for the game's main-loop
+ format like so:
+ 'package.module:main'
+ if no function name is provided, "main" is assumed.
+
+ game_handler -- DEPRECATED. alternate specification via direct
+ reference to a main-loop function.
+
+ game_size -- two-value tuple specifying the size of the display in pixels,
+ this is currently static, so once the window is created it cannot be
+ changed.
+
+ If None, use the bulk of the screen for the Pygame surface based on
+ the values reported by the gtk.gdk functions. Note that None is
+ *not* the default value.
+
+ game_title -- title to be displayed in the Sugar Shell UI
+
+ pygame_mode -- chooses the rendering engine used for handling the
+ Pygame drawing mode, 'SDL' chooses the standard Pygame renderer,
+ 'Cairo' chooses the experimental pygamecairo renderer.
+
+ Note: You likely do *not* want to use Cairo, it is no longer maintained.
+
+ PYGAME_CANVAS_CLASS -- normally PygameCanvas, but can be overridden
+ if you want to provide a different canvas class, e.g. to provide a different
+ internal layout. Note: only used where pygame_mode == 'SDL'
+
+ The Activity, once created, will be made available as olpcgames.ACTIVITY,
+ and that access mechanism should allow code to test for the presence of the
+ activity before accessing Sugar-specific functionality.
+
+ XXX Note that currently the toolbar and window layout are hard-coded into
+ this super-class, with no easy way of overriding without completely rewriting
+ the __init__ method. We should allow for customising both the UI layout and
+ the toolbar contents/layout/connection.
+
+ XXX Note that if you change the title of your activity in the toolbar you may
+ see the same focus issues as we have patched around in the build_toolbar
+ method. If so, please report them to Mike Fletcher.
+ """
+ game_name = None
+ game_title = 'Pygame Game'
+ game_handler = None
+ game_size = (16 * style.GRID_CELL_SIZE,
+ 11 * style.GRID_CELL_SIZE)
+ pygame_mode = 'SDL'
+
+ def __init__(self, handle):
+ """Initialise the Activity with the activity-description handle"""
+ super(PygameActivity, self).__init__(handle)
+ self.make_global()
+ if self.game_size is None:
+ width,height = gtk.gdk.screen_width(), gtk.gdk.screen_height()
+ log.info( 'Total screen size: %s %s', width,height)
+ # for now just fudge the toolbar size...
+ self.game_size = width, height - (1*style.GRID_CELL_SIZE)
+ self.set_title(self.game_title)
+ toolbar = self.build_toolbar()
+ log.debug( 'Toolbar size: %s', toolbar.get_size_request())
+ canvas = self.build_canvas()
+ self.connect( 'configure-event', canvas._translator.do_resize_event )
+
+ def make_global( self ):
+ """Hack to make olpcgames.ACTIVITY point to us
+ """
+ import weakref, olpcgames
+ assert not olpcgames.ACTIVITY, """Activity.make_global called twice, have you created two Activity instances in a single process?"""
+ olpcgames.ACTIVITY = weakref.proxy( self )
+
+ def build_toolbar( self ):
+ """Build our Activity toolbar for the Sugar system
+
+ This is a customisation point for those games which want to
+ provide custom toolbars when running under Sugar.
+ """
+ toolbar = activity.ActivityToolbar(self)
+ toolbar.show()
+ self.set_toolbox(toolbar)
+ def shared_cb(*args, **kwargs):
+ log.info( 'shared: %s, %s', args, kwargs )
+ try:
+ mesh.activity_shared(self)
+ except Exception, err:
+ log.error( """Failure signaling activity sharing to mesh module: %s""", util.get_traceback(err) )
+ else:
+ log.info( 'mesh activity shared message sent, trying to grab focus' )
+ try:
+ self._pgc.grab_focus()
+ except Exception, err:
+ log.warn( 'Focus failed: %s', err )
+ else:
+ log.info( 'asserting focus' )
+ assert self._pgc.is_focus(), """Did not successfully set pygame canvas focus"""
+ log.info( 'callback finished' )
+
+ def joined_cb(*args, **kwargs):
+ log.info( 'joined: %s, %s', args, kwargs )
+ mesh.activity_joined(self)
+ self._pgc.grab_focus()
+ self.connect("shared", shared_cb)
+ self.connect("joined", joined_cb)
+
+ if self.get_shared():
+ # if set at this point, it means we've already joined (i.e.,
+ # launched from Neighborhood)
+ joined_cb()
+
+ toolbar.title.unset_flags(gtk.CAN_FOCUS)
+ return toolbar
+
+ PYGAME_CANVAS_CLASS = PygameCanvas
+ def build_canvas( self ):
+ """Construct the Pygame or PygameCairo canvas for drawing"""
+ assert self.game_handler or self.game_name, 'You must specify a game_handler or game_name on your Activity (%r)'%(
+ self.game_handler or self.game_name
+ )
+ if self.pygame_mode != 'Cairo':
+ self._pgc = self.PYGAME_CANVAS_CLASS(*self.game_size)
+ self.set_canvas(self._pgc)
+ self._pgc.grab_focus()
+ self._pgc.connect_game(self.game_handler or self.game_name)
+ # XXX Bad coder, do not hide in a widely subclassed operation
+ # map signal does not appear to show up on socket instances
+ gtk.gdk.threads_init()
+ return self._pgc
+ else:
+ import hippo
+ self._drawarea = gtk.DrawingArea()
+ canvas = hippo.Canvas()
+ canvas.grab_focus()
+ self.set_canvas(canvas)
+ self.show_all()
+
+ import pygamecairo
+ pygamecairo.install()
+
+ pygamecairo.display.init(canvas)
+ app = self.game_handler or self.game_name
+ if ':' not in app:
+ app += ':main'
+ mod_name, fn_name = app.split(':')
+ mod = __import__(mod_name, globals(), locals(), [])
+ fn = getattr(mod, fn_name)
+ fn()
+ def read_file(self, file_path):
+ """Handle request to read the given file on the Pygame side
+
+ This is complicated rather noticeably by the silly semantics of the Journal
+ where it unlinks the file as soon as this method returns. We either have to
+ handle the file-opening in PyGTK (not acceptable), block this thread until
+ the Pygame thread handles the event (which it may never do) or we have
+ to make the silly thing use a non-standard file-opening interface.
+ """
+ log.info( 'read_file: %s %s', file_path, self.metadata )
+ import olpcgames, pygame
+ from olpcgames import eventwrap
+ event = eventwrap.Event(
+ type = pygame.USEREVENT,
+ code = olpcgames.FILE_READ_REQUEST,
+ filename = file_path,
+ metadata = self.metadata,
+ )
+ eventwrap.post( event )
+ event.block()
+ def write_file( self, file_path ):
+ """Handle request to write to the given file on the Pygame side
+
+ This is rather complicated by the need to have the file complete by the
+ time the function returns. Very poor API, after all, if I have to write a
+ multi-hundred-megabyte file it might take many minutes to complete
+ writing.
+ """
+ log.info( 'write_file: %s %s', file_path, self.metadata )
+ if os.path.exists( file_path ):
+ self.read_file( file_path )
+ import olpcgames, pygame
+ from olpcgames import eventwrap
+ event = eventwrap.Event(
+ type = pygame.USEREVENT,
+ code = olpcgames.FILE_WRITE_REQUEST,
+ filename = file_path,
+ metadata = self.metadata,
+ )
+ eventwrap.post( event )
+ event.block()
+ if not os.path.exists( file_path ):
+ log.warn( '''No file created in %r''', file_path )
+ raise NotImplementedError( """Pygame Activity code did not produce a file for %s"""%( file_path, ))
+ else:
+ log.info( '''Stored file in %r''', file_path )
+
+
+import olpcgames
+olpcgames.PyGameActivity = PygameActivity
+PyGameActivity = PygameActivity
diff --git a/olpcgames/buildmanifest.py b/olpcgames/buildmanifest.py
new file mode 100755
index 0000000..899433b
--- /dev/null
+++ b/olpcgames/buildmanifest.py
@@ -0,0 +1,33 @@
+#! /usr/bin/env python
+"""Stupid little script to automate generation of MANIFEST and po/POTFILES.in
+
+Really this should have been handled by using distutils, but oh well,
+distutils is a hoary beast and I can't fault people for not wanting to
+spend days spelunking around inside it to find the solutions...
+"""
+from distutils.filelist import FileList
+import os
+
+def fileList( template ):
+ """Produce a formatted file-list for storing in a file"""
+ files = FileList()
+ for line in filter(None,template.splitlines()):
+ files.process_template_line( line )
+ content = '\n'.join( files.files )
+ return content
+
+
+def main( ):
+ """Do the quicky finding of files for our manifests"""
+ content = fileList( open('MANIFEST.in').read() )
+ open( 'MANIFEST','w').write( content )
+
+ content = fileList( open('POTFILES.in').read() )
+ try:
+ os.makedirs( 'po' )
+ except OSError, err:
+ pass
+ open( os.path.join('po','POTFILES.in'), 'w').write( content )
+
+if __name__ == "__main__":
+ main()
diff --git a/olpcgames/camera.py b/olpcgames/camera.py
new file mode 100755
index 0000000..249f295
--- /dev/null
+++ b/olpcgames/camera.py
@@ -0,0 +1,221 @@
+"""Accesses OLPC Camera functionality via gstreamer
+
+Depends upon:
+ pygame
+ gstreamer (particularly gst-launch)
+
+Activity demonstrating usage:
+
+ http://dev.laptop.org/git?p=projects/games-misc;a=tree;f=cameratest.activity;hb=HEAD
+
+
+"""
+import threading, subprocess
+import logging
+import olpcgames
+import time
+import os
+import pygame
+from olpcgames.util import get_activity_root
+
+log = logging.getLogger( 'olpcgames.camera' )
+#log.setLevel( logging.DEBUG )
+
+CAMERA_LOAD, CAMERA_LOAD_FAIL = olpcgames.CAMERA_LOAD, olpcgames.CAMERA_LOAD
+
+class Camera(object):
+ """A class representing a still-picture camera
+
+ Produces a simple gstreamer bus that terminates in a filesink, that is,
+ it stores the results in a file. When a picture is "snapped" the gstreamer
+ stream is iterated until it finishes processing and then the file can be
+ read.
+
+ There are two APIs available, a synchronous API which can potentially
+ stall your activity's GUI (and is NOT recommended) and an
+ asynchronous API which returns immediately and delivers the captured
+ camera image via a Pygame event. To be clear, it is recommended
+ that you use the snap_async method, *not* the snap method.
+
+ Note:
+
+ The Camera class is simply a convenience wrapper around a fairly
+ straightforward gst-launch bus. If you have more involved
+ requirements for your camera manipulations you will probably
+ find it easier to write your own camera implementation than to
+ use this one. Basically we provide here the "normal" use case of
+ snapping a picture into a pygame image.
+
+ Note:
+
+ With the current camera implementation taking a single photograph
+ requires about 6 seconds! Obviously we'll need to figure out what's
+ taking gstreamer so long to process the pipe and fix that.
+
+ """
+ _aliases = {
+ 'camera': 'v4l2src',
+ 'test': 'videotestsrc',
+ 'testing': 'videotestsrc',
+ 'png': 'pngenc',
+ 'jpeg': 'jpegenc',
+ 'jpg': 'jpegenc',
+ }
+ def __init__(self, source='camera', format='png', filename=None, directory = None):
+ """Initialises the Camera's internal description
+
+ source -- the gstreamer source for the video to capture, useful values:
+ 'v4l2src','camera' -- the camera
+ 'videotestsrc','test' -- test pattern generator source
+ format -- the gstreamer encoder to use for the capture, useful values:
+ 'pngenc','png' -- PNG format graphic
+ 'jpegenc','jpg','jpeg' -- JPEG format graphic
+ filename -- the filename to use for the capture, if not specified defaults
+ to a random UUID + '.' + format
+ directory -- the directory in which to create the temporary file, defaults
+ to get_activity_root() + 'tmp'
+ """
+ log.info( 'Creating camera' )
+ if not filename:
+ import uuid
+ filename = '%s.%s'%( uuid.uuid4(), format )
+ self.source = self._aliases.get( source, source )
+ self.format = self._aliases.get( format, format )
+ self.filename = filename
+ self.directory = directory
+ SNAP_PIPELINE = 'gst-launch','%(source)s','!','ffmpegcolorspace','!','%(format)s','!','filesink','location="%(filename)s"'
+ def _create_subprocess( self ):
+ """Method to create the gstreamer subprocess from our settings"""
+ if not self.directory:
+ path = os.path.join( get_activity_root(), 'tmp' )
+ try:
+ os.makedirs( path )
+ log.info( 'Created temporary directory: %s', path )
+ except (OSError,IOError), err:
+ pass
+ else:
+ path = self.directory
+ filename = os.path.join( path, self.filename )
+ format = self.format
+ source = self.source
+ pipeline = [s%locals() for s in self.SNAP_PIPELINE ]
+ return filename, subprocess.Popen(
+ pipeline,stderr = subprocess.PIPE
+ )
+
+ def snap(self):
+ """Snap a picture via the camera by iterating gstreamer until finished
+
+ Note: this is an unsafe implementation, it will cause the whole
+ activity to hang until the capture finishes. Time to finish is often
+ measured in whole seconds (3-6s).
+
+ It is *strongly* recommended that you use snap_async instead of snap!
+ """
+ log.debug( 'Starting snap' )
+ filename, pipe = self._create_subprocess()
+ if not pipe.wait():
+ log.debug( 'Ending snap, loading: %s', filename )
+ return self._load_and_clean( filename )
+ else:
+ raise IOError( """Unable to complete snapshot: %s""", pipe.stderr.read() )
+ def _load_and_clean( self, filename ):
+ """Use pygame to load given filename, delete after loading/attempt"""
+ try:
+ log.info( 'Loading snapshot file: %s', filename )
+ return pygame.image.load(filename)
+ finally:
+ try:
+ os.remove( filename )
+ except (IOError,OSError), err:
+ pass
+ def snap_async( self, token=None ):
+ """Snap a picture asynchronously generating event on success/failure
+
+ token -- passed back as attribute of the event which signals that capture
+ is finished
+
+ We return events of type CAMERA_LOAD with an attribute "succeed"
+ depending on whether we succeed or not. Attributes of the events which
+ are returned:
+
+ success -- whether the loading process succeeded
+ token -- as passed to this method
+ image -- pygame image.load result if successful, None otherwise
+ filename -- the filename in our temporary directory we used to store
+ the file temporarily (this file will be deleted before the event
+ is sent, the name is for informational purposes only).
+ err -- Exception instance if failed, None otherwise
+
+ Basically identical to the snap method, save that it posts a message
+ to the event bus in pygame.event instead of blocking and returning...
+
+ Example:
+ if event == pygame.MOUSEBUTTONDOWN:
+ camera = Camera( source='test', filename = 'picture32' )
+ camera.snap_async( myIdentifier )
+ ...
+ elif event.type == olpcgames.CAMERA_LOAD:
+ if event.token == myIdentifier:
+ doSomething( event.image )
+ """
+ log.debug( 'beginning async snap')
+ t = threading.Thread(target=self._background_snap, args=[token])
+ t.start()
+ return token
+
+ def _background_snap(
+ self,
+ token = None,
+ ):
+ """Process gst messages until pipe is finished
+
+ pipe -- gstreamer pipe definition for parse_launch, normally it will
+ produce a file into which the camera should store an image
+
+ We consider pipe to be finished when we have had two "state changed"
+ gstreamer events where the pending state is VOID, the first for when
+ we begin playing, the second for when we finish.
+ """
+ log.debug( 'Background thread kicking off gstreamer capture begun' )
+ from pygame.event import Event, post
+ filename, pipe = self._create_subprocess()
+ if not pipe.wait():
+ success = True
+ log.debug( 'Ending capture, loading: %s', filename )
+ try:
+ image = self._load_and_clean( filename )
+ except Exception, err:
+ image = None
+ success = False
+ else:
+ err = None
+ else:
+ success = False
+ err = pipe.stderr.read()
+ image = None
+ evt = Event(
+ CAMERA_LOAD,
+ dict(
+ filename=filename,
+ success = success,
+ token = token,
+ image=image,
+ err=err
+ )
+ )
+ post( evt )
+
+def snap():
+ """Dump a snapshot from the camera to a pygame surface in background thread
+
+ See Camera.snap
+ """
+ return Camera().snap()
+
+def snap_async( token=None, **named ):
+ """Dump snapshot from camera return asynchronously as event in Pygame
+
+ See Camera.snap_async
+ """
+ return Camera(**named).snap_async( token )
diff --git a/olpcgames/canvas.py b/olpcgames/canvas.py
new file mode 100755
index 0000000..2583827
--- /dev/null
+++ b/olpcgames/canvas.py
@@ -0,0 +1,171 @@
+"""Implements bridge connection between Sugar/GTK and Pygame"""
+import os
+import sys
+import logging
+log = logging.getLogger( 'olpcgames.canvas' )
+##log.setLevel( logging.DEBUG )
+import threading
+from pprint import pprint
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gobject
+import pygame
+
+from olpcgames import gtkEvent, util
+
+__all__ = ['PygameCanvas']
+
+class PygameCanvas(gtk.Layout):
+ """Canvas providing bridge methods to run Pygame in GTK
+
+ The PygameCanvas creates a secondary thread in which the Pygame instance will
+ live, providing synthetic Pygame events to that thread via a Queue. The GUI
+ connection is done by having the Pygame canvas use a GTK Port object as it's
+ window pointer, it draws to that X-level window in order to produce output.
+ """
+ mod_name = None
+ def __init__(self, width, height):
+ """Initializes the Canvas Object
+
+ width,height -- passed to the inner EventBox in order to request a given size,
+ the Socket is the only child of this EventBox, and the Pygame commands
+ will be writing to the Window ID of the socket. The internal EventBox is
+ centered via an Alignment instance within the PygameCanvas instance.
+
+ XXX Should refactor so that the internal setup can be controlled by the
+ sub-class, e.g. to get size from the host window, or something similar.
+ """
+ # Build the main widget
+ log.info( 'Creating the pygame canvas' )
+ super(PygameCanvas,self).__init__()
+ self.set_flags(gtk.CAN_FOCUS)
+
+ # Build the sub-widgets
+ self._align = gtk.Alignment(0.5, 0.5)
+ self._inner_evb = gtk.EventBox()
+ self._socket = gtk.Socket()
+
+
+ # Add internal widgets
+ self._inner_evb.set_size_request(width, height)
+ self._inner_evb.add(self._socket)
+
+ self._socket.show()
+
+ self._align.add(self._inner_evb)
+ self._inner_evb.show()
+
+ self._align.show()
+
+ self.put(self._align, 0,0)
+
+ # Construct a gtkEvent.Translator
+ self._translator = gtkEvent.Translator(self, self._inner_evb)
+ # <Cue Thus Spract Zarathustra>
+ self.show()
+ def connect_game(self, app):
+ """Imports the given main-loop and starts processing in secondary thread
+
+ app -- fully-qualified Python path-name for the game's main-loop, with
+ name within module as :functionname, if no : character is present then
+ :main will be assumed.
+
+ Side effects:
+
+ Sets the SDL_WINDOWID variable to our socket's window ID
+ Calls Pygame init
+ Causes the gtkEvent.Translator to "hook" Pygame
+ Creates and starts secondary thread for Game/Pygame event processing.
+ """
+ log.info( 'Connecting the pygame canvas' )
+ # Setup the embedding
+ os.environ['SDL_WINDOWID'] = str(self._socket.get_id())
+ #print 'Socket ID=%s'%os.environ['SDL_WINDOWID']
+ pygame.init()
+
+ self._translator.hook_pygame()
+
+ # Load the modules
+ # NOTE: This is delayed because pygame.init() must come after the embedding is up
+ if ':' not in app:
+ app += ':main'
+ mod_name, fn_name = app.split(':')
+ self.mod_name = mod_name
+ mod = __import__(mod_name, globals(), locals(), [])
+ fn = getattr(mod, fn_name)
+
+ # Start Pygame
+ self.__thread = threading.Thread(target=self._start, args=[fn])
+ self.__thread.start()
+
+ def _start(self, fn):
+ """The method that actually runs in the background thread"""
+ log.info( 'Staring the mainloop' )
+ import olpcgames
+ olpcgames.widget = olpcgames.WIDGET = self
+ try:
+ import sugar.activity.activity,os
+ except ImportError, err:
+ log.info( """Running outside Sugar""" )
+ else:
+ try:
+ os.chdir(sugar.activity.activity.get_bundle_path())
+ except KeyError, err:
+ pass
+
+ try:
+ try:
+ try:
+ log.info( '''Running mainloop: %s''', fn )
+ fn()
+ except Exception, err:
+ log.error(
+ """Uncaught top-level exception: %s""",
+ util.get_traceback( err ),
+ )
+ raise
+ else:
+ log.info( "Mainloop exited" )
+ finally:
+ log.debug( "Clearing any pending events" )
+ from olpcgames import eventwrap
+ eventwrap.clear()
+ finally:
+ log.info( 'Main function finished, calling main_quit' )
+ gtk.main_quit()
+
+ source_object_id = None
+ def view_source(self):
+ """Implement the 'view source' key by saving
+ datastore, and then telling the Journal to view it."""
+ if self.source_object_id is None:
+ from sugar import profile
+ from sugar.datastore import datastore
+ from sugar.activity.activity import get_bundle_name, get_bundle_path
+ from gettext import gettext as _
+ import os.path
+ jobject = datastore.create()
+ metadata = {
+ 'title': _('%s Source') % get_bundle_name(),
+ 'title_set_by_user': '1',
+ 'suggested_filename': 'pippy_app.py',
+ 'icon-color': profile.get_color().to_string(),
+ 'mime_type': 'text/x-python',
+ }
+ for k,v in metadata.items():
+ jobject.metadata[k] = v # dict.update method is missing =(
+ jobject.file_path = os.path.join(get_bundle_path(), 'pippy_app.py')
+ datastore.write(jobject)
+ self.__source_object_id = jobject.object_id
+ jobject.destroy()
+ self.journal_show_object(self.__source_object_id)
+ def journal_show_object(self, object_id):
+ """Invoke journal_show_object from sugar.activity.activity if it
+ exists."""
+ try:
+ from sugar.activity.activity import show_object_in_journal
+ show_object_in_journal(object_id)
+ except ImportError:
+ pass # no love from sugar.
diff --git a/olpcgames/copying b/olpcgames/copying
new file mode 100755
index 0000000..b8adee0
--- /dev/null
+++ b/olpcgames/copying
@@ -0,0 +1,24 @@
+* Copyright (c) 2007, One Laptop Per Child.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* * Neither the name of One Laptop Per Child nor the
+* names of its contributors may be used to endorse or promote products
+* derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY ONE LAPTOP PER CHILD ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL ONE LAPTOP PER CHILD BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/olpcgames/data/__init__.py b/olpcgames/data/__init__.py
new file mode 100755
index 0000000..8510186
--- /dev/null
+++ b/olpcgames/data/__init__.py
@@ -0,0 +1,36 @@
+"""Design-time __init__.py for resourcepackage
+
+This is the scanning version of __init__.py for your
+resource modules. You replace it with a blank or doc-only
+init when ready to release.
+"""
+try:
+ __file__
+except NameError:
+ pass
+else:
+ import os
+ if os.path.splitext(os.path.basename( __file__ ))[0] == "__init__":
+ try:
+ from resourcepackage import package, defaultgenerators
+ generators = defaultgenerators.generators.copy()
+
+ ### CUSTOMISATION POINT
+ ## import specialised generators here, such as for wxPython
+ #from resourcepackage import wxgenerators
+ #generators.update( wxgenerators.generators )
+ except ImportError:
+ pass
+ else:
+ package = package.Package(
+ packageName = __name__,
+ directory = os.path.dirname( os.path.abspath(__file__) ),
+ generators = generators,
+ )
+ package.scan(
+ ### CUSTOMISATION POINT
+ ## force true -> always re-loads from external files, otherwise
+ ## only reloads if the file is newer than the generated .py file.
+ # force = 1,
+ )
+
diff --git a/olpcgames/data/sleeping.svg b/olpcgames/data/sleeping.svg
new file mode 100755
index 0000000..2c7ef50
--- /dev/null
+++ b/olpcgames/data/sleeping.svg
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="737"
+ height="923"
+ version="1.0">
+ <defs>
+ <linearGradient
+ id="linearGradient3152">
+ <stop
+ style="stop-color:#b8ffb4;stop-opacity:1;"
+ offset="0" />
+ <stop
+ offset="0.5"
+ style="stop-color:#2eff22;stop-opacity:0.5;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ xlink:href="#linearGradient3152"
+ id="radialGradient3158"
+ cx="260"
+ cy="235"
+ fx="260"
+ fy="235"
+ r="259"
+ gradientTransform="matrix(1,0,0,1.2531846,0,-59.560934)"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <g
+ transform="translate(-3,-73)">
+ <path
+ style="opacity:1;color:#000000;fill:url(#radialGradient3158);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path2178"
+ d="M 519 235 A 259 324 0 1 1 0,235 A 259 324 0 1 1 519 235 z"
+ transform="matrix(1.4203822,0,0,1.4203822,0,200)" />
+ <path
+ style="fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 420,366 C 438,381 455,400 478,408 C 523,427 576,424 620,405 C 632,400 644,393 655,387 C 652,389 638,397 649,391 C 658,385 666,379 676,376 C 688,370 673,379 669,382 C 637,401 604,421 566,427 C 526,435 482,429 446,408 C 431,398 419,385 405,374 C 410,371 415,368 420,366 z " />
+ <path
+ style="fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 322,366 C 303,381 286,400 263,408 C 218,427 166,424 121,405 C 109,400 98,393 86,387 C 89,389 103,397 93,391 C 84,385 75,379 65,376 C 53,370 68,379 72,382 C 104,401 137,421 175,427 C 216,435 260,429 295,408 C 310,398 322,385 336,374 C 331,371 326,368 322,366 z " />
+ <path
+ style="fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 363,383 C 347,418 353,458 345,495 C 339,525 324,551 312,579 C 304,598 298,620 309,639 C 317,655 335,667 353,669 C 379,671 405,664 429,653 C 442,646 405,667 423,656 C 429,652 434,647 441,645 C 455,639 439,650 434,653 C 408,669 378,679 347,679 C 327,679 308,667 297,651 C 285,634 287,613 294,594 C 302,570 316,548 324,523 C 335,493 335,460 338,428 C 340,415 342,401 349,390 C 353,388 358,385 363,383 z " />
+ <path
+ style="fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 206,735 C 245,737 285,740 324,744 C 357,745 391,746 424,744 C 468,738 510,723 550,703 C 552,703 544,709 541,711 C 531,718 518,722 507,727 C 474,740 440,751 405,754 C 360,756 314,754 268,749 C 243,747 218,746 193,745 C 197,741 201,738 206,735 z " />
+ </g>
+</svg>
diff --git a/olpcgames/data/sleeping_svg.py b/olpcgames/data/sleeping_svg.py
new file mode 100755
index 0000000..c52398a
--- /dev/null
+++ b/olpcgames/data/sleeping_svg.py
@@ -0,0 +1,61 @@
+# -*- coding: ISO-8859-1 -*-
+"""Resource sleeping_svg (from file sleeping.svg)"""
+# written by resourcepackage: (1, 0, 1)
+source = 'sleeping.svg'
+package = 'olpcgames.data'
+data = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\012<svg\012\
+ xmlns=\"http://www.w3.org/2000/svg\"\012 xmlns:xlink=\"http:/\
+/www.w3.org/1999/xlink\"\012 width=\"737\"\012 height=\"923\"\012 ve\
+rsion=\"1.0\">\012 <defs>\012 <linearGradient\012 id=\"linearG\
+radient3152\">\012 <stop\012 style=\"stop-color:#b8ffb4\
+;stop-opacity:1;\"\012 offset=\"0\" />\012 <stop\012 \
+ offset=\"0.5\"\012 style=\"stop-color:#2eff22;stop-opaci\
+ty:0.5;\" />\012 <stop\012 style=\"stop-color:#ffffff;s\
+top-opacity:0;\"\012 offset=\"1\" />\012 </linearGradient>\
+\012 <radialGradient\012 xlink:href=\"#linearGradient3152\"\
+\012 id=\"radialGradient3158\"\012 cx=\"260\"\012 cy=\"2\
+35\"\012 fx=\"260\"\012 fy=\"235\"\012 r=\"259\"\012 gr\
+adientTransform=\"matrix(1,0,0,1.2531846,0,-59.560934)\"\012 \
+ gradientUnits=\"userSpaceOnUse\" />\012 </defs>\012 <g\012 tran\
+sform=\"translate(-3,-73)\">\012 <path\012 style=\"opacity:1\
+;color:#000000;fill:url(#radialGradient3158);fill-opacity:1;\
+fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-lineca\
+p:butt;stroke-linejoin:miter;marker:none;marker-start:none;m\
+arker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-da\
+sharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility\
+:visible;display:inline;overflow:visible\"\012 id=\"path217\
+8\"\012 d=\"M 519 235 A 259 324 0 1 1 0,235 A 259 324 0 1 \
+1 519 235 z\"\012 transform=\"matrix(1.4203822,0,0,1.42038\
+22,0,200)\" />\012 <path\012 style=\"fill:#000000;fill-opac\
+ity:0.75;fill-rule:nonzero;stroke:none;stroke-width:1pt;stro\
+ke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"\012 \
+ d=\"M 420,366 C 438,381 455,400 478,408 C 523,427 576,424 \
+620,405 C 632,400 644,393 655,387 C 652,389 638,397 649,391 \
+C 658,385 666,379 676,376 C 688,370 673,379 669,382 C 637,40\
+1 604,421 566,427 C 526,435 482,429 446,408 C 431,398 419,38\
+5 405,374 C 410,371 415,368 420,366 z \" />\012 <path\012 \
+style=\"fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stro\
+ke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin\
+:miter;stroke-opacity:1\"\012 d=\"M 322,366 C 303,381 286,4\
+00 263,408 C 218,427 166,424 121,405 C 109,400 98,393 86,387\
+ C 89,389 103,397 93,391 C 84,385 75,379 65,376 C 53,370 68,\
+379 72,382 C 104,401 137,421 175,427 C 216,435 260,429 295,4\
+08 C 310,398 322,385 336,374 C 331,371 326,368 322,366 z \" /\
+>\012 <path\012 style=\"fill:#000000;fill-opacity:0.75;fil\
+l-rule:nonzero;stroke:none;stroke-width:1pt;stroke-linecap:b\
+utt;stroke-linejoin:miter;stroke-opacity:1\"\012 d=\"M 363,\
+383 C 347,418 353,458 345,495 C 339,525 324,551 312,579 C 30\
+4,598 298,620 309,639 C 317,655 335,667 353,669 C 379,671 40\
+5,664 429,653 C 442,646 405,667 423,656 C 429,652 434,647 44\
+1,645 C 455,639 439,650 434,653 C 408,669 378,679 347,679 C \
+327,679 308,667 297,651 C 285,634 287,613 294,594 C 302,570 \
+316,548 324,523 C 335,493 335,460 338,428 C 340,415 342,401 \
+349,390 C 353,388 358,385 363,383 z \" />\012 <path\012 st\
+yle=\"fill:#000000;fill-opacity:0.75;fill-rule:nonzero;stroke\
+:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:m\
+iter;stroke-opacity:1\"\012 d=\"M 206,735 C 245,737 285,740\
+ 324,744 C 357,745 391,746 424,744 C 468,738 510,723 550,703\
+ C 552,703 544,709 541,711 C 531,718 518,722 507,727 C 474,7\
+40 440,751 405,754 C 360,756 314,754 268,749 C 243,747 218,7\
+46 193,745 C 197,741 201,738 206,735 z \" />\012 </g>\012</svg>\012"
+### end
diff --git a/olpcgames/dbusproxy.py b/olpcgames/dbusproxy.py
new file mode 100755
index 0000000..a103e28
--- /dev/null
+++ b/olpcgames/dbusproxy.py
@@ -0,0 +1,93 @@
+"""Spike test for a safer networking system for DBUS-based objects"""
+from olpcgames import eventwrap, util
+from dbus import proxies
+import logging
+log = logging.getLogger( 'dbus' )
+log.setLevel( logging.DEBUG )
+
+def wrap( value, tube=None,path=None ):
+ """Wrap object with any required pygame-side proxies"""
+ if isinstance( value,proxies._ProxyMethod ):
+ return DBUSMethod( value, tube=tube, path=path )
+ elif isinstance( value, proxies._DeferredMethod ):
+ value._proxy_method = DBUSMethod( value._proxy_method, tube=tube, path=path )
+ return value
+ elif isinstance( value, proxies.ProxyObject ):
+ return DBUSProxy( value, tube=tube, path=path )
+ else:
+ return value
+
+class DBUSProxy( object ):
+ """Proxy for the DBUS Proxy object"""
+ def __init__( self, proxy, tube=None, path=None ):
+ log.info( 'Creating Pygame-side proxy for %s (%s)', proxy,path )
+ self.__proxy = proxy
+ self.__tube = tube
+ self.__path = path
+ def __getattr__( self, key ):
+ """Retrieve attribute of given key"""
+ from dbus import proxies
+ return wrap( getattr( self.__proxy, key ) )
+ def add_signal_receiver( self, callback, eventName, interface, path=None, sender_keyword='sender'):
+ """Add a new signal handler (which will be called many times) for given signal
+ """
+ log.info( """Setting signal receiver %s for event %s on interface %s (object path %s) with sender_keyword = %r""",
+ callback, eventName, interface, path, sender_keyword,
+ )
+ log.debug( """proxy: %s proxy.tube: %s""", self.__proxy, self.__proxy.tube )
+ self.__tube.add_signal_receiver(
+ Callback( callback ),
+ eventName,
+ interface,
+ path = path or self.__path,
+ sender_keyword = sender_keyword,
+ )
+
+class DBUSMethod( object ):
+ """DBUS method which does callbacks in the Pygame (eventwrapper) thread"""
+ def __init__( self, proxy, tube,path ):
+ log.info( 'Creating Pygame-side method proxy for %s', proxy )
+ self.__proxy = proxy
+ self.__tube = tube
+ self.__path = path
+ def __call__( self, *args, **named ):
+ """Perform the asynchronous call"""
+ log.info( 'Calling proxy for %s with *%s, **%s', self.__proxy, args, named )
+ callback, errback = named.get( 'reply_handler'), named.get( 'error_handler' )
+ if not callback:
+ raise TypeError( """Require a reply_handler named argument to do any asynchronous call""" )
+ else:
+ callback = Callback( callback )
+ if not errback:
+ errback = defaultErrback
+ else:
+ errback = Callback( errback )
+ named['reply_handler'] = callback
+ named['error_handler'] = errback
+ return self.__proxy( *args, **named )
+
+def defaultErrback( error ):
+ """Log the error to stderr/log"""
+ log.error( """Failure in DBUS call: %s""", error )
+
+class Callback( object ):
+ """PyGTK-side callback which generates a CallbackResult to process on the Pygame side"""
+ def __init__( self, callable, callContext = None):
+ """Initialize the callback to process results"""
+ self.callable = callable
+ if callContext is None:
+ callContext = util.get_traceback( None )
+ self.callContext = callContext
+ def __call__( self, *args, **named ):
+ """PyGTK-side callback operation"""
+ log.info( 'Callback %s return value *%s, **%s', self.callable, args, named )
+ from olpcgames import eventwrap
+ args = [wrap(a) for a in args]
+ named = dict([
+ (k,wrap(v)) for k,v in named.items()
+ ])
+ eventwrap.post(
+ eventwrap.CallbackResult(
+ self.callable, args, named, callContext = self.callContext
+ )
+ )
diff --git a/olpcgames/eventwrap.py b/olpcgames/eventwrap.py
new file mode 100755
index 0000000..402109c
--- /dev/null
+++ b/olpcgames/eventwrap.py
@@ -0,0 +1,388 @@
+"""Provides substitute for Pygame's "event" module using gtkEvent
+
+Provides methods which will be substituted into Pygame in order to
+provide the synthetic events that we will feed into the Pygame queue.
+These methods are registered by the "install" method.
+
+This event queue does not support getting events only of a certain type.
+You need to get all pending events at a time, or filter them yourself. You
+can, however, block and unblock events of certain types, so that may be
+useful to you.
+
+Set_grab doesn't do anything (you are not allowed to grab events). Sorry.
+
+Extensions:
+
+ wait( timeout=None ) -- allows you to wait for only a specified period
+ before you return to the application. Can be used to e.g. wait for a
+ short period, then release some resources, then wait a bit more, then
+ release a few more resources, then a bit more...
+"""
+import pygame
+import gtk
+import Queue
+import thread, threading
+import logging
+from olpcgames import util
+
+log = logging.getLogger( 'olpcgames.eventwrap' )
+
+from pygame.event import Event, event_name, pump as pygame_pump, get as pygame_get
+
+class Event(object):
+ """Mock pygame events"""
+ def __init__(self, type, dict=None,**named):
+ """Initialise the new event variables from dictionary and named become attributes"""
+ self.type = type
+ if dict:
+ self.__dict__.update( dict )
+ self.__dict__.update( named )
+ def _get_dict( self ):
+ return self.__dict__
+ dict = property( _get_dict )
+ def __repr__( self ):
+ result = []
+ for key,value in self.__dict__.items():
+ if not key.startswith( '_' ):
+ result.append( '%s = %r'%( key, value ))
+ return '%s( %s, %s )'%(
+ self.__class__.__name__,
+ self.type,
+ ",".join( result ),
+ )
+ def block( self ):
+ """Block until this event is finished processing
+
+ Event process is only finalized on the *next* call to retrieve an event
+ after the processing operation in which the event is processed. In some
+ extremely rare cases we might actually see that happen, were the
+ file-saving event (for example) causes the Pygame event loop to exit.
+ In that case, the GTK event loop *could* hang.
+ """
+ log.info( '''Blocking GTK thread on event: %s''', self )
+ self.__lock = threading.Event()
+ self.__lock.wait()
+ def retire( self ):
+ """Block the GTK event loop until this event is processed"""
+ try:
+ self.__lock.set()
+ log.info( '''Released GTK thread on event: %s''', self )
+ except AttributeError, err:
+ pass
+
+class CallbackResult( object ):
+ def __init__( self, callable, args, named, callContext=None ):
+ """Perform callback in Pygame loop with args and named
+
+ callContext is used to provide more information when there is
+ a failure in the callback (for debugging purposes)
+ """
+ self.callable = callable
+ self.args = args
+ self.named = named
+ if callContext is None:
+ callContext = util.get_traceback( None )
+ self.callContext = callContext
+ def __call__( self ):
+ """Perform the actual callback in the Pygame event loop"""
+ try:
+ self.callable( *self.args, **self.named )
+ except Exception, err:
+ log.error(
+ """Failure in callback %s( *%s, **%s ): %s\n%s""",
+ getattr(self.callable, '__name__',self.callable),
+ self.args, self.named,
+ util.get_traceback( err ),
+ self.callContext
+ )
+
+
+_EVENTS_TO_RETIRE = []
+
+def _releaseEvents( ):
+ """Release/retire previously-processed events"""
+ if _EVENTS_TO_RETIRE:
+ for event in _EVENTS_TO_RETIRE:
+ try:
+ event.retire()
+ except AttributeError, err:
+ pass
+
+def _processCallbacks( events ):
+ """Process any callbacks in events and remove from the stream"""
+ result = []
+ for event in events:
+ if isinstance( event, CallbackResult ):
+ event()
+ else:
+ result.append( event )
+ if events and not result:
+ result.append(
+ Event( type=pygame.NOEVENT )
+ )
+ return result
+
+def _recordEvents( events ):
+ """Record the set of events to retire on the next iteration"""
+ global _EVENTS_TO_RETIRE
+ events = _processCallbacks( events )
+ _EVENTS_TO_RETIRE = events
+ return events
+
+def install():
+ """Installs this module (eventwrap) as an in-place replacement for the pygame.event module.
+
+ Use install() when you need to interact with Pygame code written
+ without reference to the olpcgames wrapper mechanisms to have the
+ code use this module's event queue.
+
+ XXX Really, use it everywhere you want to use olpcgames, as olpcgames
+ registers the handler itself, so you will always wind up with it registered when
+ you use olpcgames (the gtkEvent.Translator.hook_pygame method calls it).
+ """
+ log.info( 'Installing OLPCGames event wrapper' )
+ from olpcgames import eventwrap
+ import pygame
+ pygame.event = eventwrap
+ import sys
+ sys.modules["pygame.event"] = eventwrap
+
+# Event queue:
+class _FilterQueue( Queue.Queue ):
+ """Simple Queue sub-class with a put_left method"""
+ def get_type( self, filterFunction, block=True, timeout=None ):
+ """Get events of a given type
+
+ Note: can raise Empty *even* when blocking if someone else
+ pops the event off the queue before we get around to it.
+ """
+ self.not_empty.acquire()
+ try:
+ if not block:
+ if self._empty_type( filterFunction ):
+ raise Queue.Empty
+ elif timeout is None:
+ while self._empty_type( filterFunction ):
+ self.not_empty.wait()
+ else:
+ if timeout < 0:
+ raise ValueError("'timeout' must be a positive number")
+ endtime = _time() + timeout
+ while self._empty_type( filterFunction ):
+ remaining = endtime - _time()
+ if remaining <= 0.0:
+ raise Queue.Empty
+ self.not_empty.wait(remaining)
+ item = self._get_type( filterFunction )
+ self.not_full.notify()
+ return item
+ finally:
+ self.not_empty.release()
+ def _empty_type( self, filterFunction ):
+ """Are we empty with respect to filterFunction?"""
+ for element in self.queue:
+ if filterFunction( element ):
+ return False
+ return True
+ def _get_type( self, filterFunction ):
+ """Get the first instance which matches filterFunction"""
+ for element in self.queue:
+ if filterFunction( element ):
+ self.queue.remove( element )
+ return element
+ # someone popped the event off the queue before we got to it!
+ raise Queue.Empty
+ def peek_type( self, filterFunction= lambda x: True ):
+ """Peek to see if we have filterFunction-matching element
+
+ Note: obviously this is *not* thread safe, it's just informative...
+ """
+ try:
+ for element in self.queue:
+ if filterFunction( element ):
+ return element
+ return None
+ except RuntimeError, err:
+ return None # none yet, at least
+
+g_events = _FilterQueue()
+
+# Set of blocked events as set by set
+g_blocked = set()
+g_blockedlock = thread.allocate_lock() # should use threading instead
+g_blockAll = False
+
+def _typeChecker( types ):
+ """Create check whether an event is in types"""
+ try:
+ if 1 in types:
+ pass
+ def check( element ):
+ return element.type in types
+ return check
+ except TypeError, err:
+ def check( element ):
+ return element.type == types
+ return check
+
+def pump():
+ """Handle any window manager and other external events that aren't passed to the user
+
+ Call this periodically (once a frame) if you don't call get(), poll() or wait()
+ """
+ pygame_pump()
+ _releaseEvents()
+
+def get( types=None):
+ """Get a list of all pending events
+
+ types -- either an integer event-type or a sequence of integer event types
+ which restrict the set of event-types returned from the queue. Keep in mind
+ that if you do not remove events you may wind up with an eternally growing
+ queue or a full queue. Normally you will want to remove all events in your
+ top-level event-loop and propagate them yourself.
+
+ Note: if you use types you lose all event ordering guarantees, events
+ may show up after events which were originally produced before them due to
+ the re-ordering of the queue on filtering!
+ """
+ pump()
+ eventlist = []
+ try:
+ if types:
+ check = _typeChecker( types )
+ while True:
+ eventlist.append(g_events.get_type( check, block=False))
+ else:
+ while True:
+ eventlist.append(g_events.get(block=False))
+ except Queue.Empty:
+ pass
+
+ pygameEvents = pygame_get()
+ if pygameEvents:
+ log.info( 'Raw Pygame events: %s', pygameEvents)
+ eventlist.extend( pygameEvents )
+ return _recordEvents( eventlist )
+
+def poll():
+ """Get the next pending event if exists. Otherwise, return pygame.NOEVENT."""
+ pump()
+ try:
+ result = g_events.get(block=False)
+ return _recordEvents( [result] )[0]
+ except Queue.Empty:
+ return Event(pygame.NOEVENT)
+
+
+def wait( timeout = None):
+ """Get the next pending event, wait up to timeout if none
+
+ timeout -- if present, only wait up to timeout seconds, if we
+ do not find an event before then, return None. timeout
+ is an OLPCGames-specific extension.
+ """
+ pump()
+ try:
+ result = None
+ result = g_events.get(block=True, timeout=timeout)
+ try:
+ return _recordEvents( [result] )[0]
+ except IndexError, err:
+ return Event( type=pygame.NOEVENT )
+ except Queue.Empty, err:
+ return None
+
+def peek(types=None):
+ """True if there is any pending event
+
+ types -- optional set of event-types used to check whether
+ an event is of interest. If specified must be either a sequence
+ of integers/longs or an integer/long.
+ """
+ if types:
+ check = _typeChecker( types )
+ return g_events.peek_type( check ) is not None
+ return not g_events.empty()
+
+def clear():
+ """Clears the entire pending queue of events
+
+ Rarely used
+ """
+ try:
+ discarded = []
+ while True:
+ discarded.append( g_events.get(block=False) )
+ discarded = _recordEvents( discarded )
+ _releaseEvents()
+ return discarded
+ except Queue.Empty:
+ pass
+
+def set_blocked(item):
+ """Block item/items from being added to the event queue"""
+ g_blockedlock.acquire()
+ try:
+ # FIXME: we do not currently know how to block all event types when
+ # you set_blocked(none).
+ [g_blocked.add(x) for x in makeseq(item)]
+ finally:
+ g_blockedlock.release()
+
+def set_allowed(item):
+ """Allow item/items to be added to the event queue"""
+ g_blockedlock.acquire()
+ try:
+ if item is None:
+ # Allow all events when you set_allowed(none). Strange, eh?
+ # Pygame is a wonderful API.
+ g_blocked.clear()
+ else:
+ [g_blocked.remove(x) for x in makeseq(item)]
+ finally:
+ g_blockedlock.release()
+
+def get_blocked(*args, **kwargs):
+ g_blockedlock.acquire()
+ try:
+ blocked = frozenset(g_blocked)
+ return blocked
+ finally:
+ g_blockedlock.release()
+
+def set_grab(grabbing):
+ """This method will not be implemented"""
+
+def get_grab():
+ """This method will not be implemented"""
+
+def post(event):
+ """Post a new event to the Queue of events"""
+ g_blockedlock.acquire()
+ try:
+ if getattr(event,'type',None) not in g_blocked:
+ g_events.put(event, block=False)
+ finally:
+ g_blockedlock.release()
+
+def makeseq(obj):
+ """Accept either a scalar object or a sequence, and return a sequence
+ over which we can iterate. If we were passed a sequence, return it
+ unchanged. If we were passed a scalar, return a tuple containing only
+ that scalar. This allows the caller to easily support one-or-many.
+ """
+ # Strings are the exception because you can iterate over their chars
+ # -- yet, for all the purposes I've ever cared about, I want to treat
+ # a string as a scalar.
+ if isinstance(obj, basestring):
+ return (obj,)
+ try:
+ # Except as noted above, if you can get an iter() from an object,
+ # it's a collection.
+ iter(obj)
+ return obj
+ except TypeError:
+ # obj is a scalar. Wrap it in a tuple so we can iterate over the
+ # one item.
+ return (obj,)
diff --git a/olpcgames/gtkEvent.py b/olpcgames/gtkEvent.py
new file mode 100755
index 0000000..6b20102
--- /dev/null
+++ b/olpcgames/gtkEvent.py
@@ -0,0 +1,289 @@
+"""gtkEvent.py: translate GTK events into Pygame events."""
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gobject
+import pygame
+from olpcgames import eventwrap
+import logging
+log = logging.getLogger( 'olpcgames.gtkevent' )
+##log.setLevel( logging.DEBUG )
+
+class _MockEvent(object):
+ """Used to inject key-repeat events on the gtk side."""
+ def __init__(self, keyval):
+ self.keyval = keyval
+
+class Translator(object):
+ """Utility class to translate GTK events into Pygame events
+
+ The Translator object interprets incoming GTK events and generates
+ Pygame events in the eventwrap module's queue as a result.
+ It also handles generating Pygame style key-repeat events
+ by synthesizing them via a GTK timer.
+ """
+ key_trans = {
+ 'Alt_L': pygame.K_LALT,
+ 'Alt_R': pygame.K_RALT,
+ 'Control_L': pygame.K_LCTRL,
+ 'Control_R': pygame.K_RCTRL,
+ 'Shift_L': pygame.K_LSHIFT,
+ 'Shift_R': pygame.K_RSHIFT,
+ 'Super_L': pygame.K_LSUPER,
+ 'Super_R': pygame.K_RSUPER,
+ 'KP_Page_Up' : pygame.K_KP9,
+ 'KP_Page_Down' : pygame.K_KP3,
+ 'KP_End' : pygame.K_KP1,
+ 'KP_Home' : pygame.K_KP7,
+ 'KP_Up' : pygame.K_KP8,
+ 'KP_Down' : pygame.K_KP2,
+ 'KP_Left' : pygame.K_KP4,
+ 'KP_Right' : pygame.K_KP6,
+
+ }
+
+ mod_map = {
+ pygame.K_LALT: pygame.KMOD_LALT,
+ pygame.K_RALT: pygame.KMOD_RALT,
+ pygame.K_LCTRL: pygame.KMOD_LCTRL,
+ pygame.K_RCTRL: pygame.KMOD_RCTRL,
+ pygame.K_LSHIFT: pygame.KMOD_LSHIFT,
+ pygame.K_RSHIFT: pygame.KMOD_RSHIFT,
+ }
+
+ def __init__(self, mainwindow, mouselistener=None):
+ """Initialise the Translator with the windows to which to listen"""
+ # _inner_evb is Mouselistener
+ self._mainwindow = mainwindow
+ if mouselistener is None:
+ mouselistener = mainwindow
+
+ self._inner_evb = mouselistener
+
+ # Need to set our X event masks so we see mouse motion and stuff --
+ mainwindow.set_events(
+ gtk.gdk.KEY_PRESS_MASK | \
+ gtk.gdk.KEY_RELEASE_MASK \
+ )
+
+ self._inner_evb.set_events(
+ gtk.gdk.POINTER_MOTION_MASK | \
+ gtk.gdk.POINTER_MOTION_HINT_MASK | \
+ gtk.gdk.BUTTON_MOTION_MASK | \
+ gtk.gdk.BUTTON_PRESS_MASK | \
+ gtk.gdk.BUTTON_RELEASE_MASK
+ )
+
+ # Callback functions to link the event systems
+ mainwindow.connect('unrealize', self._quit)
+ mainwindow.connect('key_press_event', self._keydown)
+ mainwindow.connect('key_release_event', self._keyup)
+ self._inner_evb.connect('button_press_event', self._mousedown)
+ self._inner_evb.connect('button_release_event', self._mouseup)
+ self._inner_evb.connect('motion-notify-event', self._mousemove)
+
+ # You might need to do this
+ mainwindow.set_flags(gtk.CAN_FOCUS)
+ self._inner_evb.set_flags(gtk.CAN_FOCUS)
+
+ # Internal data
+ self.__stopped = False
+ self.__keystate = [0] * 323
+ self.__button_state = [0,0,0]
+ self.__mouse_pos = (0,0)
+ self.__repeat = (None, None)
+ self.__held = set()
+ self.__held_time_left = {}
+ self.__held_last_time = {}
+ self.__tick_id = None
+
+ #print "translator initialized"
+ self._inner_evb.connect( 'expose-event', self.do_expose_event )
+# screen = gtk.gdk.screen_get_default()
+# screen.connect( 'size-changed', self.do_resize_event )
+ self._inner_evb.connect( 'configure-event', self.do_resize_event )
+ def do_expose_event(self, event, widget):
+ """Handle exposure event (trigger redraw by gst)"""
+ log.info( 'Expose event: %s', event )
+ from olpcgames import eventwrap
+ eventwrap.post( eventwrap.Event( eventwrap.pygame.VIDEOEXPOSE ))
+ return True
+ def do_resize_event( self, activity, event ):
+ """Our screen (actually, the default screen) has resized"""
+ log.info( 'Resize event: %s %s', activity, event )
+ log.info( 'Event values: %s', (event.width,event.height) )
+# from olpcgames import eventwrap
+# # shouldn't the activity's window have this information too?
+# eventwrap.post(
+# eventwrap.Event(
+# eventwrap.pygame.VIDEORESIZE,
+# dict(size=(event.width,event.height), width=event.width, height=event.height)
+# )
+# )
+ return False # continue processing
+ def hook_pygame(self):
+ """Hook the various Pygame features so that we implement the event APIs"""
+ # Pygame should be initialized. Hijack their key and mouse methods
+ pygame.key.get_pressed = self._get_pressed
+ pygame.key.set_repeat = self._set_repeat
+ pygame.mouse.get_pressed = self._get_mouse_pressed
+ pygame.mouse.get_pos = self._get_mouse_pos
+ import eventwrap
+ eventwrap.install()
+
+ def _quit(self, data=None):
+ self.__stopped = True
+ eventwrap.post(eventwrap.Event(pygame.QUIT))
+
+ def _keydown(self, widget, event):
+ key = event.keyval
+ log.debug( 'key down: %s', key )
+ if key in self.__held:
+ return True
+ else:
+ if self.__repeat[0] is not None:
+ self.__held_last_time[key] = pygame.time.get_ticks()
+ self.__held_time_left[key] = self.__repeat[0]
+ self.__held.add(key)
+
+ return self._keyevent(widget, event, pygame.KEYDOWN)
+
+ def _keyup(self, widget, event):
+ key = event.keyval
+ if self.__repeat[0] is not None:
+ if key in self.__held:
+ # This is possibly false if set_repeat() is called with a key held
+ del self.__held_time_left[key]
+ del self.__held_last_time[key]
+ self.__held.discard(key)
+
+ return self._keyevent(widget, event, pygame.KEYUP)
+
+ def _keymods(self):
+ """Extract the keymods as they stand currently."""
+ mod = 0
+ for key_val, mod_val in self.mod_map.iteritems():
+ mod |= self.__keystate[key_val] and mod_val
+ return mod
+
+
+ def _keyevent(self, widget, event, type):
+ key = gtk.gdk.keyval_name(event.keyval)
+ if key is None:
+ # No idea what this key is.
+ return False
+
+ keycode = None
+ if key in self.key_trans:
+ keycode = self.key_trans[key]
+ elif hasattr(pygame, 'K_'+key.upper()):
+ keycode = getattr(pygame, 'K_'+key.upper())
+ elif hasattr(pygame, 'K_'+key.lower()):
+ keycode = getattr(pygame, 'K_'+key.lower())
+ elif key == 'XF86Start':
+ # view source request, specially handled...
+ self._mainwindow.view_source()
+ else:
+ print 'Key %s unrecognized'%key
+
+ if keycode is not None:
+ if type == pygame.KEYDOWN:
+ mod = self._keymods()
+ self.__keystate[keycode] = type == pygame.KEYDOWN
+ if type == pygame.KEYUP:
+ mod = self._keymods()
+ ukey = unichr(gtk.gdk.keyval_to_unicode(event.keyval))
+ if ukey == '\000':
+ ukey = ''
+ evt = eventwrap.Event(type, key=keycode, unicode=ukey, mod=mod)
+ assert evt.key, evt
+ self._post(evt)
+ return True
+
+ def _get_pressed(self):
+ """Retrieve map/array of which keys are currently depressed (held down)"""
+ return self.__keystate
+
+ def _get_mouse_pressed(self):
+ """Return three-element array of which mouse-buttons are currently depressed (held down)"""
+ return self.__button_state
+
+ def _mousedown(self, widget, event):
+ self.__button_state[event.button-1] = 1
+ return self._mouseevent(widget, event, pygame.MOUSEBUTTONDOWN)
+
+ def _mouseup(self, widget, event):
+ self.__button_state[event.button-1] = 0
+ return self._mouseevent(widget, event, pygame.MOUSEBUTTONUP)
+
+ def _mouseevent(self, widget, event, type):
+
+ evt = eventwrap.Event(type,
+ button=event.button,
+ pos=(event.x, event.y))
+ self._post(evt)
+ return True
+
+ def _mousemove(self, widget, event):
+ # From http://www.learningpython.com/2006/07/25/writing-a-custom-widget-using-pygtk/
+ # if this is a hint, then let's get all the necessary
+ # information, if not it's all we need.
+ if event.is_hint:
+ x, y, state = event.window.get_pointer()
+ else:
+ x = event.x
+ y = event.y
+ state = event.state
+
+ rel = (x - self.__mouse_pos[0],
+ y - self.__mouse_pos[1])
+ self.__mouse_pos = (x, y)
+
+ self.__button_state = [
+ state & gtk.gdk.BUTTON1_MASK and 1 or 0,
+ state & gtk.gdk.BUTTON2_MASK and 1 or 0,
+ state & gtk.gdk.BUTTON3_MASK and 1 or 0,
+ ]
+
+ evt = eventwrap.Event(pygame.MOUSEMOTION,
+ pos=self.__mouse_pos,
+ rel=rel,
+ buttons=self.__button_state)
+ self._post(evt)
+ return True
+
+ def _tick(self):
+ """Generate synthetic events for held-down keys"""
+ cur_time = pygame.time.get_ticks()
+ for key in self.__held:
+ delta = cur_time - self.__held_last_time[key]
+ self.__held_last_time[key] = cur_time
+
+ self.__held_time_left[key] -= delta
+ if self.__held_time_left[key] <= 0:
+ self.__held_time_left[key] = self.__repeat[1]
+ self._keyevent(None, _MockEvent(key), pygame.KEYDOWN)
+
+ return True
+
+ def _set_repeat(self, delay=None, interval=None):
+ """Set the key-repetition frequency for held-down keys"""
+ if delay is not None and self.__repeat[0] is None:
+ self.__tick_id = gobject.timeout_add(10, self._tick)
+ elif delay is None and self.__repeat[0] is not None:
+ gobject.source_remove(self.__tick_id)
+ self.__repeat = (delay, interval)
+
+ def _get_mouse_pos(self):
+ """Retrieve the current mouse position as a two-tuple of integers"""
+ return self.__mouse_pos
+
+ def _post(self, evt):
+ try:
+ eventwrap.post(evt)
+ except pygame.error, e:
+ if str(e) == 'Event queue full':
+ print "Event queue full!"
+ pass
+ else:
+ raise e
diff --git a/olpcgames/mesh.py b/olpcgames/mesh.py
new file mode 100755
index 0000000..1ad4c43
--- /dev/null
+++ b/olpcgames/mesh.py
@@ -0,0 +1,583 @@
+'''Utilities for wrapping the telepathy network for Pygame
+
+The 'mesh' module allows your Pygame game to be Shared
+across the OLPC networking infrastructure (D-bus and Tubes).
+It offers a simplified view of the Telepathy system.
+
+All Sugar activities have a 'Share' menu (toolbar) which is
+intended to allow other people to join the activity instance
+and collaborate with you. When you select Share, the activity's
+icon appears on the Neighborhood view of other laptops.
+
+If you do nothing else with networking, this is all that will
+happen: if anyone selects your shared activity icon, they will
+just spawn a new instance of the activity, and they will get to
+play your game alone.
+
+The mesh module automatically sets up a connection from each
+participant to every other participant. It provides (string based)
+communications channels that let you either broadcast messages
+to other users or communicate point-to-point to one other user.
+
+You can use the "handles" which uniquely idenify users to send
+messages to an individual user (send_to( handle, message )) or
+broadcast( message ) to send a message to all participants.
+
+More advanced (structured) networking can be handled by using
+the get_object( handle, path ) function, which looks up an object
+(by DBUS path) shared by the user "handle" and returns a
+DBUS/Telepathy proxy for that object. The object you get back is
+actually an olpcgames.dbusproxy.DBUSProxy instance, which
+enforces asynchronous operations and runs your
+reply_handler/error_handler in the Pygame event loop.
+
+NOTE:
+ You *cannot* make synchronous calls on these objects!
+ You must use the named arguments:
+
+ reply_handler, error_handler
+
+ for every call which you perform on a shared object (normally
+ these are ExportedGObject instances).
+
+If you want to run your callbacks in the GTK event loop (for instance
+because they need to handle GTK-side objects), you can use the
+dbus_get_object function. This is *not* recommended for normal
+usage, as any call to Pygame operations within the GTK event loop
+can cause a segfault/core of your entire Activity.
+
+Note:
+
+ mesh sets up N**2 connections for each shared activity, obviously
+ that will not scale to very large shared activities.
+
+Note:
+
+ The intention is that mesh will be refactored, possibly as a
+ new module called "olpcgames.network", which would break out
+ the various components so that there is no longer an assumed
+ networking layout. We will attempt to retain the mesh module's
+ API as we do so.
+
+Events produced:
+
+ olpcgames.CONNECT -- The tube connection was started. (i.e., the
+ user clicked Share or started the activity from the Neighborhood
+ screen).
+
+ Event properties:
+
+ id -- a unique identifier for this connection. (shouldn't be needed
+ for anything)
+
+ olpcgames.PARTICIPANT_ADD -- A participant joined the activity.
+ This will trigger for the local user as well as any arriving remote
+ users. Note that this *only* occurs after the activity is shared,
+ that is, the local user does not appear until after they have
+ shared a locally-started activity.
+
+ Event properties:
+
+ handle -- the arriving user's handle (a uniquely identifying string
+ assigned to the user by the Telepathy system, not human
+ readable), see lookup_buddy to retrieve human-readable
+ descriptions of the user.
+
+ olpcgames.PARTICIPANT_REMOVE -- A participant quit the activity.
+
+ Event properties:
+
+ handle -- the departing user's handle.
+
+ olpcgames.MESSAGE_UNI -- A message was sent to you.
+
+ Event properties:
+
+ content -- the content of the message (a string)
+ handle -- the handle of the sending user.
+
+ olpcgames.MESSAGE_MULTI -- A message was sent to everyone.
+
+ Event properties:
+
+ content -- the content of the message (a string)
+ handle -- the handle of the sending user.
+
+Note:
+
+ Eventually we will stop using top-level Pygame event types for the
+ various networking message types (currently four of them). We will
+ likely use UserEvent with a sub-type specifier for the various events
+ that OLPCGames produces.
+
+See Also:
+
+ http://blog.vrplumber.com/2016 -- Discussion of how Productive uses
+ the mesh module and raw Telepathy (ExportedGObject instances)
+'''
+import logging
+log = logging.getLogger( 'olpcgames.mesh' )
+##log.setLevel( logging.DEBUG )
+import olpcgames
+from olpcgames.util import get_traceback
+try:
+ from sugar.presence.tubeconn import TubeConnection
+except ImportError, err:
+ TubeConnection = object
+try:
+ from dbus.gobject_service import ExportedGObject
+except ImportError, err:
+ ExportedGObject = object
+from dbus.service import method, signal
+
+try:
+ import telepathy
+except ImportError, err:
+ telepathy = None
+
+try:
+ import sugar.presence.presenceservice
+except Exception, err:
+ pass
+import pygame.event as PEvent
+
+class OfflineError( Exception ):
+ """Raised when we cannot complete an operation due to being offline"""
+
+DBUS_IFACE="org.laptop.games.pygame"
+DBUS_PATH="/org/laptop/games/pygame"
+DBUS_SERVICE = None
+
+
+### NEW PYGAME EVENTS ###
+
+CONNECT = olpcgames.CONNECT
+PARTICIPANT_ADD = olpcgames.PARTICIPANT_ADD
+PARTICIPANT_REMOVE = olpcgames.PARTICIPANT_REMOVE
+MESSAGE_UNI = olpcgames.MESSAGE_UNI
+MESSAGE_MULTI = olpcgames.MESSAGE_MULTI
+
+
+# Private objects for useful purposes!
+pygametubes = []
+text_chan, tubes_chan = (None, None)
+conn = None
+initiating = False
+joining = False
+
+connect_callback = None
+
+def is_initiating():
+ '''A version of is_initiator that's a bit less goofy, and can be used
+ before the Tube comes up.'''
+ global initiating
+ return initiating
+
+def is_joining():
+ '''Returns True if the activity was started up by means of the
+ Neighbourhood mesh view.'''
+ global joining
+ return joining
+
+def set_connect_callback(cb):
+ '''Just the same as the Pygame event loop can listen for CONNECT,
+ this is just an ugly callback that the glib side can use to be aware
+ of when the Tube is ready.'''
+ global connect_callback
+ connect_callback = cb
+
+def activity_shared(activity):
+ '''Called when the user clicks Share.'''
+
+ global initiating
+ initiating = True
+
+ _setup(activity)
+
+
+ log.debug('This is my activity: making a tube...')
+ channel = tubes_chan[telepathy.CHANNEL_TYPE_TUBES]
+ if hasattr( channel, 'OfferDBusTube' ):
+ id = channel.OfferDBusTube(
+ DBUS_SERVICE, {})
+ else:
+ id = channel.OfferTube(
+ telepathy.TUBE_TYPE_DBUS, DBUS_SERVICE, {})
+
+ global connect_callback
+ if connect_callback is not None:
+ connect_callback()
+
+def activity_joined(activity):
+ '''Called at the startup of our Activity, when the user started it via Neighborhood intending to join an existing activity.'''
+
+ # Find out who's already in the shared activity:
+ log.debug('Joined an existing shared activity')
+
+ for buddy in activity._shared_activity.get_joined_buddies():
+ log.debug('Buddy %s is already in the activity' % buddy.props.nick)
+
+
+ global initiating
+ global joining
+ initiating = False
+ joining = True
+
+
+ _setup(activity)
+
+ tubes_chan[telepathy.CHANNEL_TYPE_TUBES].ListTubes(
+ reply_handler=_list_tubes_reply_cb,
+ error_handler=_list_tubes_error_cb)
+
+ global connect_callback
+ if connect_callback is not None:
+ connect_callback()
+
+def _getConn( activity ):
+ log.debug( '_getConn' )
+ global conn
+ if conn:
+ return conn
+ else:
+ if hasattr( activity._shared_activity, 'telepathy_conn' ):
+ log.debug( '''new-style api for retrieving telepathy connection present''' )
+ conn = activity._shared_activity.telepathy_conn
+ else:
+ pservice = _get_presence_service()
+ log.debug( '_get_presence_service -> %s', pservice )
+ name, path = pservice.get_preferred_connection()
+ log.debug( '_get_presence_service -> %s, %s', name, path)
+ conn = telepathy.client.Connection(name, path)
+ log.debug( 'Telepathy Client Connection: %s', conn )
+ return conn
+
+
+
+def _setup(activity):
+ '''Determines text and tube channels for the current Activity. If no tube
+channel present, creates one. Updates text_chan and tubes_chan.
+
+setup(sugar.activity.Activity, telepathy.client.Connection)'''
+ global text_chan, tubes_chan, DBUS_SERVICE
+ log.info( 'Setup for %s', activity )
+ if not DBUS_SERVICE:
+ DBUS_SERVICE = activity.get_bundle_id()
+ if not activity.get_shared():
+ log.error('Failed to share or join activity')
+ raise "Failure"
+
+ if hasattr( activity._shared_activity, 'telepathy_tubes_chan' ):
+ log.debug( '''Improved channel setup API available''' )
+ _getConn( activity )
+ conn = activity._shared_activity.telepathy_conn
+ tubes_chan = activity._shared_activity.telepathy_tubes_chan
+ text_chan = activity._shared_activity.telepathy_text_chan
+ else:
+ log.debug( '''Old-style setup API''' )
+ bus_name, conn_path, channel_paths = activity._shared_activity.get_channels()
+ _getConn( activity )
+
+ # Work out what our room is called and whether we have Tubes already
+ room = None
+ tubes_chan = None
+ text_chan = None
+ for channel_path in channel_paths:
+ log.debug( 'Testing channel path: %s', channel_path)
+ channel = telepathy.client.Channel(bus_name, channel_path)
+ htype, handle = channel.GetHandle()
+ log.debug( ' Handle Type: %s Handle: %s', htype, handle)
+ if htype == telepathy.HANDLE_TYPE_ROOM:
+ log.debug('Found our room: it has handle#%d "%s"',
+ handle, conn.InspectHandles(htype, [handle])[0])
+ room = handle
+ ctype = channel.GetChannelType()
+ if ctype == telepathy.CHANNEL_TYPE_TUBES:
+ log.debug('Found our Tubes channel at %s', channel_path)
+ tubes_chan = channel
+ elif ctype == telepathy.CHANNEL_TYPE_TEXT:
+ log.debug('Found our Text channel at %s', channel_path)
+ text_chan = channel
+
+ if room is None:
+ log.error("Presence service didn't create a room")
+ raise "Failure"
+ if text_chan is None:
+ log.error("Presence service didn't create a text channel")
+ raise "Failure"
+
+ # Make sure we have a Tubes channel - PS doesn't yet provide one
+ if tubes_chan is None:
+ log.debug("Didn't find our Tubes channel, requesting one...")
+ tubes_chan = conn.request_channel(telepathy.CHANNEL_TYPE_TUBES,
+ telepathy.HANDLE_TYPE_ROOM, room, True)
+
+ tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal('NewTube',
+ new_tube_cb)
+
+ log.info( 'Setup for %s complete', activity )
+ return (text_chan, tubes_chan)
+
+def new_tube_cb(id, initiator, type, service, params, state):
+ log.debug("New_tube_cb called: %s %s %s" % (id, initiator, type))
+ if (type == telepathy.TUBE_TYPE_DBUS and service == DBUS_SERVICE):
+ if state == telepathy.TUBE_STATE_LOCAL_PENDING:
+ channel = tubes_chan[telepathy.CHANNEL_TYPE_TUBES]
+ if hasattr( channel, 'AcceptDBusTube' ):
+ channel.AcceptDBusTube( id )
+ else:
+ channel.AcceptTube(id)
+
+ tube_conn = TubeConnection(conn,
+ tubes_chan[telepathy.CHANNEL_TYPE_TUBES],
+ id, group_iface=text_chan[telepathy.CHANNEL_INTERFACE_GROUP])
+
+ global pygametubes, initiating
+ pygametubes.append(PygameTube(tube_conn, initiating, len(pygametubes)))
+
+
+def _list_tubes_reply_cb(tubes):
+ for tube_info in tubes:
+ new_tube_cb(*tube_info)
+
+def _list_tubes_error_cb(e):
+ log.error('ListTubes() failed: %s', e)
+
+def lookup_buddy( dbus_handle, callback, errback=None ):
+ """Do a lookup on the buddy information, callback with the information
+
+ Calls callback( buddy ) with the result of the lookup, or errback( error ) with
+ a dbus description of the error in the lookup process.
+
+ returns None
+ """
+ log.debug('Trying to find owner of handle %s...', dbus_handle)
+ cs_handle = instance().tube.bus_name_to_handle[dbus_handle]
+ log.debug('Trying to find my handle in %s...', cs_handle)
+ group = text_chan[telepathy.CHANNEL_INTERFACE_GROUP]
+ log.debug( 'Calling GetSelfHandle' )
+ if not errback:
+ def errback( error ):
+ log.error( """Failure retrieving handle for buddy lookup: %s""", error )
+ def with_my_csh( my_csh ):
+ log.debug('My handle in that group is %s', my_csh)
+ def _withHandle( handle ):
+ """process the results of the handle values"""
+ # XXX: we're assuming that we have Buddy objects for all contacts -
+ # this might break when the server becomes scalable.
+ pservice = _get_presence_service()
+ name, path = pservice.get_preferred_connection()
+ callback( pservice.get_buddy_by_telepathy_handle(name, path, handle) )
+ if my_csh == cs_handle:
+ conn.GetSelfHandle(reply_handler = _withHandle, error_handler=errback)
+ log.debug('CS handle %s belongs to me, looking up with GetSelfHandle', cs_handle)
+ elif group.GetGroupFlags() & telepathy.CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES:
+ handle = group.GetHandleOwners([cs_handle])[0]
+ log.debug('CS handle %s belongs to %s', cs_handle, handle)
+ _withHandle( handle )
+ else:
+ handle = cs_handle
+ log.debug('non-CS handle %s belongs to itself', handle)
+ _withHandle( handle )
+ group.GetSelfHandle( reply_handler = with_my_csh, error_handler = errback)
+
+
+
+def get_buddy(dbus_handle):
+ """DEPRECATED: Get a Buddy from a handle
+
+ THIS API WAS NOT THREAD SAFE! It has been removed to avoid
+ extremely hard-to-debug failures in activities. Use lookup_buddy
+ instead!
+
+ Code that read:
+
+ get_buddy( handle )
+ doSomething( handle, buddy )
+ doSomethingElse( buddy )
+
+ Translates to:
+
+ def withBuddy( buddy ):
+ doSomething( handle, buddy )
+ doSomethingElse( buddy )
+ lookup_buddy( handle, callback=withBuddy )
+ """
+ raise RuntimeError(
+ """get_buddy is not thread safe and will crash your activity (hard). Use lookup_buddy."""
+ )
+
+def _get_presence_service( ):
+ """Attempt to retrieve the presence service (check for offline condition)
+
+ The presence service, when offline, has no preferred connection type,
+ so we check that before returning the object...
+ """
+ log.debug( """About to import sugar.presence.presenceservice""" )
+ try:
+ log.debug( 'About to retrieve presence service instance' )
+ pservice = sugar.presence.presenceservice.get_instance()
+ try:
+ log.debug( ' Retrieved presence service instance: %s', pservice )
+ name, path = pservice.get_preferred_connection()
+ log.debug( ' Name = %s Path = %s', name, path )
+ except (TypeError,ValueError), err:
+ log.warn('Working in offline mode, cannot retrieve buddy information for %s: %s', handle, err )
+ raise OfflineError( """Unable to retrieve buddy information, currently offline""" )
+ else:
+ return pservice
+ except Exception, err:
+ log.error( """Failure in _get_presence_service: %s""", get_traceback( err ))
+
+def instance(idx=0):
+ return pygametubes[idx]
+
+
+class PygameTube(ExportedGObject):
+ '''The object whose instance is shared across D-bus
+
+ Call instance() to get the instance of this object for your activity service.
+ Its 'tube' property contains the underlying D-bus Connection.
+ '''
+ def __init__(self, tube, is_initiator, tube_id):
+ super(PygameTube, self).__init__(tube, DBUS_PATH)
+ log.info( 'PygameTube init' )
+ self.tube = tube
+ self.is_initiator = is_initiator
+ self.entered = False
+ self.ordered_bus_names = []
+ PEvent.post(PEvent.Event(CONNECT, id=tube_id))
+
+ if not self.is_initiator:
+ self.tube.add_signal_receiver(self.new_participant_cb, 'NewParticipants', DBUS_IFACE, path=DBUS_PATH)
+ self.tube.watch_participants(self.participant_change_cb)
+ self.tube.add_signal_receiver(self.broadcast_cb, 'Broadcast', DBUS_IFACE, path=DBUS_PATH, sender_keyword='sender')
+
+
+ def participant_change_cb(self, added, removed):
+ log.debug( 'participant_change_cb: %s %s', added, removed )
+ for handle, bus_name in added:
+ dbus_handle = self.tube.participants[handle]
+ self.ordered_bus_names.append(dbus_handle)
+ PEvent.post(PEvent.Event(PARTICIPANT_ADD, handle=dbus_handle))
+
+ for handle in removed:
+ dbus_handle = self.tube.participants[handle]
+ self.ordered_bus_names.remove(dbus_handle)
+ PEvent.post(PEvent.Event(PARTICIPANT_REMOVE, handle=dbus_handle))
+
+ if self.is_initiator:
+ if not self.entered:
+ # Initiator will broadcast a new ordered_bus_names each time
+ # a participant joins.
+ self.ordered_bus_names = [self.tube.get_unique_name()]
+ self.NewParticipants(self.ordered_bus_names)
+
+ self.entered = True
+
+ @signal(dbus_interface=DBUS_IFACE, signature='as')
+ def NewParticipants(self, ordered_bus_names):
+ '''This is the NewParticipants signal, sent when the authoritative list of ordered_bus_names changes.'''
+ log.debug("sending NewParticipants: %s" % ordered_bus_names)
+ pass
+
+ @signal(dbus_interface=DBUS_IFACE, signature='s')
+ def Broadcast(self, content):
+ '''This is the Broadcast signal; it sends a message to all other activity participants.'''
+ pass
+
+ @method(dbus_interface=DBUS_IFACE, in_signature='s', out_signature='', sender_keyword='sender')
+ def Tell(self, content, sender=None):
+ '''This is the targeted-message interface; called when a message is received that was sent directly to me.'''
+ PEvent.post(PEvent.Event(MESSAGE_UNI, handle=sender, content=content))
+
+ def broadcast_cb(self, content, sender=None):
+ '''This is the Broadcast callback, fired when someone sends a Broadcast signal along the bus.'''
+ PEvent.post(PEvent.Event(MESSAGE_MULTI, handle=sender, content=content))
+
+ def new_participant_cb(self, new_bus_names):
+ '''This is the NewParticipants callback, fired when someone joins or leaves.'''
+ log.debug("new participant. new bus names %s, old %s" % (new_bus_names, self.ordered_bus_names))
+ if self.ordered_bus_names != new_bus_names:
+ log.warn("ordered bus names out of sync with server, resyncing")
+ self.ordered_bus_names = new_bus_names
+
+def send_to(handle, content=""):
+ '''Sends the given message to the given buddy identified by handle.'''
+ log.debug( 'send_to: %s %s', handle, content )
+ remote_proxy = dbus_get_object(handle, DBUS_PATH)
+ remote_proxy.Tell(content, reply_handler=dbus_msg, error_handler=dbus_err)
+
+def dbus_msg():
+ log.debug("async reply to send_to")
+def dbus_err(e):
+ log.error("async error: %s" % e)
+
+def broadcast(content=""):
+ '''Sends the given message to all participants.'''
+ log.debug( 'Broadcast: %s', content )
+ instance().Broadcast(content)
+
+def my_handle():
+ '''Returns the handle of this user
+
+ Note, you can get a DBusException from this if you have
+ not yet got a unique ID assigned by the bus. You may need
+ to delay calling until you are sure you are connected.
+ '''
+ log.debug( 'my handle' )
+ return instance().tube.get_unique_name()
+
+def is_initiator():
+ '''Returns the handle of this user.'''
+ log.debug( 'is initiator' )
+ return instance().is_initiator
+
+def get_participants():
+ '''Returns the list of active participants, in order of arrival.
+ List is maintained by the activity creator; if that person leaves it may not stay in sync.'''
+ log.debug( 'get_participants' )
+ try:
+ return instance().ordered_bus_names[:]
+ except IndexError, err:
+ return [] # no participants yet, as we don't yet have a connection
+
+def dbus_get_object(handle, path, warning=True):
+ '''Get a D-bus object from another participant
+
+ Note: this *must* be called *only* from the GTK mainloop, calling
+ it from Pygame will cause crashes! If you are *sure* you only ever
+ want to call methods on this proxy from GTK, you can use
+ warning=False to silence the warning log message.
+ '''
+ if warning:
+ log.warn( 'Use of dbus_get_object is only safe from the GTK mainloop, use dbus_get_object_proxy instead: %s %s', handle, path )
+ return instance().tube.get_object(handle, path)
+
+def get_object(handle, path):
+ '''Get a D-BUS proxy object from another participant for use in Pygame
+
+ This is how you can communicate with other participants using
+ arbitrary D-bus objects without having to manage the participants
+ yourself. You can use the returned proxy's methods from Pygame,
+ with your callbacks occuring in the Pygame thread, rather than
+ in the DBUS/GTK event loop.
+
+ Simply define a D-bus class with an interface and path that you
+ choose; when you want a reference to the corresponding remote
+ object on a participant, call this method.
+
+ returns an olpcgames.dbusproxy.DBUSProxy( ) object wrapping
+ the DBUSProxy object.
+
+ The dbus_get_object_proxy name is deprecated
+ '''
+ log.debug( 'DBUS get_object( %r %r )', handle, path )
+ from olpcgames import dbusproxy
+ return dbusproxy.DBUSProxy(
+ instance().tube.get_object( handle, path),
+ tube=instance().tube,
+ path=path
+ )
+
+dbus_get_object_proxy = get_object
diff --git a/olpcgames/pangofont.py b/olpcgames/pangofont.py
new file mode 100755
index 0000000..441dfd1
--- /dev/null
+++ b/olpcgames/pangofont.py
@@ -0,0 +1,346 @@
+"""Implement Pygame's font interface using Pango for international support
+
+Depends on:
+
+ pygtk (to get the pango context)
+ pycairo (for the pango rendering context)
+ python-pango (obviously)
+ numpy
+ (pygame)
+
+As soon as you import this module you have loaded *all* of the above.
+You can still use pygame.font until you decide to call install(), which
+will replace pygame.font with this module.
+
+Notes:
+
+ * no ability to load TTF files, PangoFont uses the font files registered
+ with GTK/X to render graphics, it cannot load an arbitrary TTF file.
+ Most non-Sugar Pygame games use bundled TTF files, which means
+ that you will likely need at least some changes to your font handling.
+
+ Note, however, that the Pygame Font class is available to load the TTF
+ files, so if you don't want to take advantage of PangoFont for already
+ written code, but want to use it for "system font" operations, you can
+ mix the two.
+
+ * metrics are missing, Pango can provide the information, but the more
+ involved metrics system means that translating to the simplified model
+ in Pygame has as of yet not been accomplished.
+
+ * better support for "exotic" languages and scripts (which is why we use it)
+
+The main problem with SDL_ttf is that it doesn't handle internationalization
+nearly as well as Pango (in fact, pretty much nothing does). However, it is
+fairly fast and it has a rich interface. You should avoid fonts where possible,
+prerender using Pango for internationalizable text, and use Pango or SDL_ttf
+for text that really needs to be rerendered each frame. (Use SDL_ttf if profiling
+demonstrates that performance is poor with Pango.)
+
+Note:
+ Font -- is the original Pygame Font class, which allows you to load
+ fonts from TTF files/filenames
+ PangoFont -- is the Pango-specific rendering engine which allows
+ for the more involved cross-lingual rendering operations.
+"""
+import pango
+import logging
+import pangocairo
+import pygame.rect, pygame.image
+import gtk
+import struct
+from pygame import surface
+from pygame.font import Font
+from olpcgames import _cairoimage
+
+log = logging.getLogger( 'olpcgames.pangofont' )
+##log.setLevel( logging.DEBUG )
+
+# Install myself on top of pygame.font
+def install():
+ """Replace Pygame's font module with this module"""
+ log.info( 'installing' )
+ from olpcgames import pangofont
+ import pygame
+ pygame.font = pangofont
+ import sys
+ sys.modules["pygame.font"] = pangofont
+
+class PangoFont(object):
+ """Base class for a pygame.font.Font-like object drawn by Pango
+
+ Attributes of note:
+
+ fd -- instances Pango FontDescription object
+ WEIGHT_* -- parameters for use with set_weight
+ STYLE_* -- parameters for use with set_style
+
+ """
+ WEIGHT_BOLD = pango.WEIGHT_BOLD
+ WEIGHT_HEAVY = pango.WEIGHT_HEAVY
+ WEIGHT_LIGHT = pango.WEIGHT_LIGHT
+ WEIGHT_NORMAL = pango.WEIGHT_NORMAL
+ WEIGHT_SEMIBOLD = pango.WEIGHT_SEMIBOLD
+ WEIGHT_ULTRABOLD = pango.WEIGHT_ULTRABOLD
+ WEIGHT_ULTRALIGHT = pango.WEIGHT_ULTRALIGHT
+ STYLE_NORMAL = pango.STYLE_NORMAL
+ STYLE_ITALIC = pango.STYLE_ITALIC
+ STYLE_OBLIQUE = pango.STYLE_OBLIQUE
+ def __init__(self, family=None, size=None, bold=False, italic=False, underline=False, fd=None):
+ """If you know what pango.FontDescription (fd) you want, pass it in as
+ 'fd'. Otherwise, specify any number of family, size, bold, or italic,
+ and we will try to match something up for you."""
+
+ # Always set the FontDescription (FIXME - only set it if the user wants
+ # to change something?)
+ if fd is None:
+ fd = pango.FontDescription()
+ if family is not None:
+ fd.set_family(family)
+ if size is not None:
+ log.debug( 'Pre-conversion size: %s', size )
+ size = int(size*1024)
+ log.debug( 'Font size: %s', size, )
+ fd.set_size(size) # XXX magic number, pango's scaling
+ self.fd = fd
+ self.set_bold( bold )
+ self.set_italic( italic )
+ self.set_underline( underline )
+
+ def render(self, text, antialias=True, color=(255,255,255), background=None ):
+ """Render the font onto a new Surface and return it.
+ We ignore 'antialias' and use system settings.
+
+ text -- (unicode) string with the text to render
+ antialias -- attempt to antialias the text or not
+ color -- three or four-tuple of 0-255 values specifying rendering
+ colour for the text
+ background -- three or four-tuple of 0-255 values specifying rendering
+ colour for the background, or None for trasparent background
+
+ returns a pygame image instance
+ """
+ log.info( 'render: %r, antialias = %s, color=%s, background=%s', text, antialias, color, background )
+
+ layout = self._createLayout( text )
+ # determine pixel size
+ (logical, ink) = layout.get_pixel_extents()
+ ink = pygame.rect.Rect(ink)
+
+ # Create a new Cairo ImageSurface
+ csrf,cctx = _cairoimage.newContext( ink.w, ink.h )
+ cctx = pangocairo.CairoContext(cctx)
+
+ # Mangle the colors on little-endian machines. The reason for this
+ # is that Cairo writes native-endian 32-bit ARGB values whereas
+ # Pygame expects endian-independent values in whatever format. So we
+ # tell our users not to expect transparency here (avoiding the A issue)
+ # and we swizzle all the colors around.
+
+ # render onto it
+ if background is not None:
+ background = _cairoimage.mangle_color( background )
+ cctx.set_source_rgba(*background)
+ cctx.paint()
+
+ log.debug( 'incoming color: %s', color )
+ color = _cairoimage.mangle_color( color )
+ log.debug( ' translated color: %s', color )
+
+ cctx.new_path()
+ cctx.layout_path(layout)
+ cctx.set_source_rgba(*color)
+ cctx.fill()
+
+ # Create and return a new Pygame Image derived from the Cairo Surface
+ return _cairoimage.asImage( csrf )
+
+ def set_bold( self, bold=True):
+ """Set our font description's weight to "bold" or "normal"
+
+ bold -- boolean, whether to set the value to "bold" weight or not
+ """
+ if bold:
+ self.set_weight( self.WEIGHT_BOLD )
+ else:
+ self.set_weight( self.WEIGHT_NORMAL )
+ def set_weight( self, weight ):
+ """Explicitly set our pango-style weight value"""
+ self.fd.set_weight( weight )
+ return self.get_weight()
+ def get_weight( self ):
+ """Explicitly get our pango-style weight value"""
+ return self.fd.get_weight()
+ def get_bold( self ):
+ """Return whether our font's weight is bold (or above)"""
+ return self.fd.get_weight() >= pango.WEIGHT_BOLD
+
+ def set_italic( self, italic=True ):
+ """Set our "italic" value (style)"""
+ if italic:
+ self.set_style( self.STYLE_ITALIC )
+ else:
+ self.set_style( self.STYLE_NORMAL )
+ def set_style( self, style ):
+ """Set our font description's pango-style"""
+ self.fd.set_style( style )
+ return self.fd.get_style()
+ def get_style( self ):
+ """Get our font description's pango-style"""
+ return self.fd.get_style()
+ def get_italic( self ):
+ """Return whether we are currently italicised"""
+ return self.fd.get_style() == self.STYLE_ITALIC # what about oblique?
+
+ def set_underline( self, underline=True ):
+ """Set our current underlining properly"""
+ self.underline = underline
+ def get_underline( self ):
+ """Retrieve our current underline setting"""
+ return self.underline
+
+ def _createLayout( self, text ):
+ """Produces a Pango layout describing this text in this font"""
+ # create layout
+ layout = pango.Layout(gtk.gdk.pango_context_get())
+ layout.set_font_description(self.fd)
+ if self.underline:
+ attrs = layout.get_attributes()
+ if not attrs:
+ attrs = pango.AttrList()
+ attrs.insert(pango.AttrUnderline(pango.UNDERLINE_SINGLE, 0, 32767))
+ layout.set_attributes( attrs )
+ layout.set_text(text)
+ return layout
+
+ def size( self, text ):
+ """Determine space required to render given text
+
+ returns tuple of (width,height)
+ """
+ layout = self._createLayout( text )
+ (logical, ink) = layout.get_pixel_extents()
+ ink = pygame.rect.Rect(ink)
+ return (ink.width,ink.height)
+
+## def get_linesize( self ):
+## """Determine inter-line spacing for the font"""
+## font = self.get_context().load_font( self.fd )
+## metrics = font.get_metrics()
+## return pango.PIXELS( metrics.get_ascent() )
+## def get_height( self ):
+## def get_ascent( self ):
+## def get_descent( self ):
+
+
+class SysFont(PangoFont):
+ """Construct a PangoFont from a font description (name), size in pixels,
+ bold, and italic designation. Similar to SysFont from Pygame."""
+ def __init__(self, name, size, bold=False, italic=False):
+ fd = pango.FontDescription(name)
+ fd.set_absolute_size(size*pango.SCALE)
+ if bold:
+ fd.set_weight(pango.WEIGHT_BOLD)
+ if italic:
+ fd.set_style(pango.STYLE_OBLIQUE)
+ super(SysFont, self).__init__(fd=fd)
+
+# originally defined a new class, no reason for that...
+NotImplemented = NotImplementedError
+
+def match_font(name,bold=False,italic=False):
+ """Stub, does not work, use fontByDesc instead"""
+ raise NotImplementedError("PangoFont doesn't support match_font directly, use SysFont or .fontByDesc")
+
+def fontByDesc(desc="",bold=False,italic=False):
+ """Constructs a FontDescription from the given string representation.
+
+The format of the fontByDesc string representation is passed directly
+to the pango.FontDescription constructor and documented at:
+
+ http://www.pygtk.org/docs/pygtk/class-pangofontdescription.html#constructor-pangofontdescription
+
+Bold and italic are provided as a convenience.
+
+The format of the string representation is:
+
+ "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]"
+
+where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace separated list of words where each WORD describes one of style, variant, weight, or stretch, and SIZE is an decimal number (size in points). For example the following are all valid string representations:
+
+ "sans bold 12"
+ "serif,monospace bold italic condensed 16"
+ "normal 10"
+
+The commonly available font families are: Normal, Sans, Serif and Monospace. The available styles are:
+Normal the font is upright.
+Oblique the font is slanted, but in a roman style.
+Italic the font is slanted in an italic style.
+
+The available weights are:
+Ultra-Light the ultralight weight (= 200)
+Light the light weight (=300)
+Normal the default weight (= 400)
+Bold the bold weight (= 700)
+Ultra-Bold the ultra-bold weight (= 800)
+Heavy the heavy weight (= 900)
+
+The available variants are:
+Normal
+Small-Caps
+
+The available stretch styles are:
+Ultra-Condensed the smallest width
+Extra-Condensed
+Condensed
+Semi-Condensed
+Normal the normal width
+Semi-Expanded
+Expanded
+Extra-Expanded
+Ultra-Expanded the widest width
+ """
+ fd = pango.FontDescription(name)
+ if bold:
+ fd.set_weight(pango.WEIGHT_BOLD)
+ if italic:
+ fd.set_style(pango.STYLE_OBLIQUE)
+ return PangoFont(fd=fd)
+
+def get_init():
+ """Return boolean indicating whether we are initialised
+
+ Always returns True
+ """
+ return True
+
+def init():
+ """Initialise the module (null operation)"""
+ pass
+
+def quit():
+ """De-initialise the module (null operation)"""
+ pass
+
+def get_default_font():
+ """Return default-font specification to be passed to e.g. fontByDesc"""
+ return "sans"
+
+def get_fonts():
+ """Return the set of all fonts available (currently just 3 generic types)"""
+ return ["sans","serif","monospace"]
+
+
+def stdcolor(color):
+ """Produce a 4-element 0.0-1.0 color value from input"""
+ def fixlen(color):
+ if len(color) == 3:
+ return tuple(color) + (255,)
+ elif len(color) == 4:
+ return color
+ else:
+ raise TypeError("What sort of color is this: %s" % (color,))
+ return [_fixColorBase(x) for x in fixlen(color)]
+def _fixColorBase( v ):
+ """Return a properly clamped colour in floating-point space"""
+ return max((0,min((v,255.0))))/255.0
diff --git a/olpcgames/pausescreen.py b/olpcgames/pausescreen.py
new file mode 100755
index 0000000..113a0ea
--- /dev/null
+++ b/olpcgames/pausescreen.py
@@ -0,0 +1,116 @@
+"""Display a "paused" version of the currently-displayed screen
+
+This code is largely cribbed from the Pippy activity's display code,
+but we try to be a little more generally usable than they are, as
+we have more involved activities using the code.
+
+We use svgsprite to render a graphic which is stored in the
+olpcgames data directory over a dimmed version of the current
+screen contents.
+
+_LAST_EVENT_TIME -- tracks the last time that we saw an event
+ come across the wire.
+"""
+import logging
+log = logging.getLogger( 'olpcgames.pausescreen' )
+import pygame
+from pygame import sprite
+
+_LAST_EVENT_TIME = 0
+
+def _set_last_event_time( time=None ):
+ """Set time as the last event time
+
+ time -- if None, pygame.time.get_ticks() is used
+
+ returns time set
+ """
+ global _LAST_EVENT_TIME
+ if time is None:
+ time = pygame.time.get_ticks()
+ _LAST_EVENT_TIME = time
+ return time
+
+def last_event_time( ):
+ """Return the duration since last event for pausing operations
+
+ returns time in seconds
+ """
+ global _LAST_EVENT_TIME
+ return (pygame.time.get_ticks() - _LAST_EVENT_TIME)/1000.
+
+
+def get_events( sleep_timeout = 10, pause=None, **args ):
+ """Retrieve the set of pending events or sleep
+
+ sleep_timeout -- dormant period before we invoke pause_screen
+ pause -- callable to produce visual notification of pausing, normally
+ by taking the current screen and modifying it in some way. Defaults
+ to pauseScreen in this module. If you return nothing from this
+ function then no restoration or display-flipping will occur
+ *args -- if present, passed to 'pause' to configuration operation (e.g.
+ to specify a different overlaySVG file)
+
+ returns set of pending events (potentially empty)
+ """
+ if not pause:
+ pause = pauseScreen
+ events = pygame.event.get( )
+ if not events:
+ log.info( 'No events in queue' )
+ old_screen = None
+ if last_event_time() > sleep_timeout:
+ # we've been waiting long enough, go to sleep visually
+ log.warn( 'Pausing activity after %s with function %s', sleep_timeout, pause )
+ old_screen = pause( )
+ if old_screen:
+ pygame.display.flip()
+ # now we wait until there *are* some events (efficiently)
+ # and retrieve any extra events that are waiting...
+ events = [ pygame.event.wait() ] + pygame.event.get()
+ log.warn( 'Activity restarted')
+ if old_screen:
+ restoreScreen( old_screen )
+ if events:
+ _set_last_event_time()
+ return events
+
+def pauseScreen( overlaySVG=None ):
+ """Display a "Paused" screen and suspend
+
+ This default implementation will not do anything to shut down your
+ simulation or other code running in other threads. It will merely block
+ this thread (the pygame thread) until an event shows up in the
+ eventwrap queue.
+
+ Returns a surface to pass to restoreScreen to continue...
+ """
+ from olpcgames import svgsprite
+ if not overlaySVG:
+ from olpcgames.data import sleeping_svg
+ overlaySVG = sleeping_svg.data
+ screen = pygame.display.get_surface()
+ old_screen = screen.copy() # save this for later.
+ pause_sprite = svgsprite.SVGSprite(
+ overlaySVG,
+ )
+ pause_sprite.rect.center = screen.get_rect().center
+ group = sprite.RenderUpdates( )
+ group.add( pause_sprite )
+
+ # dim the screen and display the 'paused' message in the center.
+ BLACK = (0,0,0)
+ WHITE = (255,255,255)
+ dimmed = screen.copy()
+ dimmed.set_alpha(128)
+ screen.fill(BLACK)
+ screen.blit(dimmed, (0,0))
+
+ group.draw( screen )
+ return old_screen
+
+def restoreScreen( old_screen ):
+ """Restore the original screen and return"""
+ screen = pygame.display.get_surface()
+ screen.blit(old_screen, (0,0))
+ return old_screen
diff --git a/olpcgames/svg.py b/olpcgames/svg.py
new file mode 100755
index 0000000..c4dd707
--- /dev/null
+++ b/olpcgames/svg.py
@@ -0,0 +1,71 @@
+"""Image-load from svg files to Pygame images
+
+Dependent on RSVG and Cairo libraries
+"""
+from olpcgames import _cairoimage
+
+def load( file, (width, height)=(None,None) ):
+ """pygame.load like interface for loading SVG graphics
+
+ file -- object with read() method (file-like object) or a string
+ filename for a file to be read off the local system
+
+ See render function for details of width and height
+ arguments
+
+ returns Pygame image instance
+ """
+ try:
+ data = file.read()
+ except AttributeError, err:
+ data = open( file, 'r').read()
+ return render( data, (width,height) )
+
+def render( data, (width, height)=(None,None) ):
+ """Render SVG graphic/data to a Pygame image object
+
+ data -- SVG file for loading into the image, must be properly formed
+ and valid SVG to allow the rendering to complete
+
+ (width,height) -- size of the resulting image in pixels, the graphic will
+ be scaled to fit into the image.
+
+ If one dimension is left as None, then the graphic will be scaled to
+ fit the given dimension, with the other dimension provided by the
+ proportions of the graphic.
+
+ If both dimensions are left as None, then they will both be provided
+ by the "natural" dimensions of the SVG at the natural (GTK-defined)
+ resolution of the screen.
+
+ returns Pygame image instance
+ """
+ import rsvg
+ handle = rsvg.Handle( data = data )
+ originalSize = (width,height)
+ scale = 1.0
+ hw,hh = handle.get_dimension_data()[:2]
+ if hw and hh:
+ if not width:
+ if not height:
+ width,height = hw,hh
+ else:
+ scale = float(height)/hh
+ width = hh/float(hw) * height
+ elif not height:
+ scale = float(width)/hw
+ height = hw/float(hh) * width
+ else:
+ # scale only, only rendering as large as it is...
+ if width/height > hw/hh:
+ # want it taller than it is...
+ width = hh/float(hw) * height
+ else:
+ height = hw/float(hh) * width
+ scale = float(height)/hh
+
+ csrf, ctx = _cairoimage.newContext( int(width), int(height) )
+ ctx.scale( scale, scale )
+ handle.render_cairo( ctx )
+ return _cairoimage.asImage( csrf )
+ return None
diff --git a/olpcgames/svgsprite.py b/olpcgames/svgsprite.py
new file mode 100755
index 0000000..e47eed2
--- /dev/null
+++ b/olpcgames/svgsprite.py
@@ -0,0 +1,52 @@
+"""RSVG/Cairo-based rendering of SVG into Pygame Images"""
+from pygame import sprite, Rect
+from olpcgames import svg
+
+class SVGSprite( sprite.Sprite ):
+ """Sprite class which renders SVG source-code as a Pygame image
+
+ Note:
+
+ Currently this sprite class is a bit over-engineered, it gets in the way
+ if you want to, e.g. animate among a number of SVG drawings, as it
+ assumes that setSVG will always set a single SVG file for rendering.
+ """
+ rect = image = None
+ resolution = None
+ def __init__(
+ self, svg=None, size=None, *args
+ ):
+ """Initialise the svg sprite
+
+ svg -- svg source text (i.e. content of an svg file)
+ size -- optional, to constrain size, (width,height), leaving one
+ as None or 0 causes proportional scaling, leaving both
+ as None or 0 causes natural scaling (screen resolution)
+ args -- if present, groups to which to automatically add
+ """
+ self.size = size
+ super( SVGSprite, self ).__init__( *args )
+ if svg:
+ self.setSVG( svg )
+ def setSVG( self, svg ):
+ """Set our SVG source"""
+ self.svg = svg
+ # XXX could delay this until actually asked to display...
+ if self.size:
+ width,height = self.size
+ else:
+ width,height = None,None
+ self.image = svg.render( self.svg, (width,height) ).convert_alpha()
+ rect = self.image.get_rect()
+ if self.rect:
+ rect.move( self.rect ) # should let something higher-level do that...
+ self.rect = rect
+ def copy( self ):
+ """Create a copy of this sprite without reloading the svg image"""
+ result = self.__class__(
+ size = self.size
+ )
+ result.image = self.image
+ result.rect = Rect(self.rect)
+ result.resolution = self.resolution
+ return result
diff --git a/olpcgames/textsprite.py b/olpcgames/textsprite.py
new file mode 100755
index 0000000..7663630
--- /dev/null
+++ b/olpcgames/textsprite.py
@@ -0,0 +1,40 @@
+"""Simple Sprite sub-class that renders via a PangoFont"""
+from pygame import sprite
+from olpcgames import pangofont
+
+class TextSprite( sprite.Sprite ):
+ """Sprite with a simple text renderer"""
+ image = rect = text = color = background = None
+ def __init__( self, text=None, family=None, size=None, bold=False, italic=False, color=None, background=None ):
+ super( TextSprite, self ).__init__( )
+ self.font = pangofont.PangoFont( family=family, size=size, bold=bold, italic=italic )
+ self.set_color( color )
+ self.set_background( background )
+ self.set_text( text )
+ def set_text( self, text ):
+ """Set our text string and render to a graphic"""
+ self.text = text
+ self.render( )
+ def set_color( self, color =None):
+ """Set our rendering colour (default white)"""
+ self.color = color or (255,255,255)
+ self.render()
+ def set_background( self, color=None ):
+ """Set our background color, default transparent"""
+ self.background = color
+ self.render()
+ def render( self ):
+ """Render our image and rect (or None,None)
+
+ After a render you will need to move the rect member to the
+ correct location on the screen.
+ """
+ if self.text:
+ self.image = self.font.render( self.text, color = self.color, background = self.background )
+ currentRect = self.rect
+ self.rect = self.image.get_rect()
+ if currentRect:
+ self.rect.center = currentRect.center
+ else:
+ self.rect = None
+ self.image = None
diff --git a/olpcgames/util.py b/olpcgames/util.py
new file mode 100755
index 0000000..a0c26b0
--- /dev/null
+++ b/olpcgames/util.py
@@ -0,0 +1,85 @@
+"""Abstraction layer for working outside the Sugar environment"""
+import traceback, cStringIO
+import logging
+log = logging.getLogger( 'olpcgames.util' )
+import os
+import os.path
+
+NON_SUGAR_ROOT = '~/.sugar/default/olpcgames'
+
+try:
+ from sugar.activity.activity import get_bundle_path as _get_bundle_path
+ def get_bundle_path( ):
+ """Retrieve bundle path from activity with fix for silly registration bug"""
+ path = _get_bundle_path()
+ if path.endswith( '.activity.activity' ):
+ log.warn( '''Found double .activity suffix in bundle path, truncating: %s''', path )
+ path = path[:-9]
+ return path
+except ImportError:
+ log.warn( '''Do not appear to be running under Sugar, stubbing-in get_bundle_path''' )
+ def get_bundle_path():
+ """Retrieve a substitute data-path for non OLPC systems"""
+ return os.getcwd()
+
+
+def get_activity_root( ):
+ """Return the activity root for data storage operations
+
+ If the activity is present, returns the activity's root,
+ otherwise returns NON_SUGAR_ROOT as the directory.
+ """
+ root = os.environ.get( 'SUGAR_ACTIVITY_ROOT' )
+ if not root:
+ root = NON_SUGAR_ROOT
+ log.debug( 'Activity Root: %s', root )
+ return os.path.expanduser( root )
+
+def data_path(file_name):
+ """Return the full path to a file in the data sub-directory of the bundle"""
+ dirname = os.path.join(get_bundle_path(), 'data' )
+ if not os.path.isdir( dirname ):
+ os.makedirs( dirname )
+ return os.path.join( dirname, file_name )
+def tmp_path(file_name):
+ """Return the full path to a file in the temporary directory"""
+ dirname = os.path.join(get_bundle_path(), 'tmp' )
+ if not os.path.isdir( dirname ):
+ os.makedirs( dirname )
+ return os.path.join(dirname, file_name)
+
+def get_traceback(error):
+ """Get formatted traceback from current exception
+
+ error -- Exception instance raised
+
+ Attempts to produce a 10-level traceback as a string
+ that you can log off. Use like so:
+
+ try:
+ doSomething()
+ except Exception, err:
+ log.error(
+ '''Failure during doSomething with X,Y,Z parameters: %s''',
+ util.get_traceback( err ),
+ )
+ """
+ if error is None:
+ error = []
+ for (f,l,func,statement) in traceback.extract_stack()[:-2]:
+ if statement:
+ statement = ': %s'%( statement, )
+ if func:
+ error.append( '%s.%s (%s)%s'%( f,func,l, statement))
+ else:
+ error.append( '%s (%s)%s'%( f,l, statement))
+ return "\n".join( error )
+ else:
+ exception = str(error)
+ file = cStringIO.StringIO()
+ try:
+ traceback.print_exc( limit=10, file = file )
+ exception = file.getvalue()
+ finally:
+ file.close()
+ return exception
diff --git a/olpcgames/video.py b/olpcgames/video.py
new file mode 100755
index 0000000..032aa13
--- /dev/null
+++ b/olpcgames/video.py
@@ -0,0 +1,178 @@
+"""Video widget for displaying a gstreamer pipe
+
+Note: currently this module is not all that elegant or useful,
+we need a better recipe for using and working with Video
+under OLPCGames.
+"""
+import logging
+log = logging.getLogger( 'olpcgames.video' )
+#log.setLevel( logging.INFO )
+import os
+import signal
+import pygame
+import weakref
+import olpcgames
+from olpcgames import _gtkmain
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gst
+
+class VideoWidget(gtk.DrawingArea):
+ """Widget to render GStreamer video over our Pygame Canvas
+
+ The VideoWidget is a simple GTK window which is
+ held by the PygameCanvas, just as is the Pygame
+ window we normally use. As such this approach
+ *cannot* work without the GTK wrapper.
+
+ It *should* be possible to use raw X11 operations
+ to create a child window of the Pygame/SDL window
+ and use that for the same purpose, but that would
+ require some pretty low-level ctypes hacking.
+
+ Attributes of Note:
+
+ rect -- Pygame rectangle which tells us where to
+ display ourselves, setting the rect changes the
+ position and size of the window.
+ """
+ _imagesink = None
+ _renderedRect = None
+ def __init__(self, rect=None, force_aspect_ratio=True):
+ super(VideoWidget, self).__init__()
+ self.unset_flags(gtk.DOUBLE_BUFFERED)
+ if rect is None:
+ rect = pygame.Rect( (0,0), (160,120))
+ self.rect = rect
+ self.force_aspect_ratio = force_aspect_ratio
+ self.set_size_request(rect.width,rect.height)
+ olpcgames.WIDGET.put( self, rect.left,rect.top)
+ self._renderedRect = rect
+ self.show()
+
+ def set_rect( self, rect ):
+ """Set our rectangle (area of the screen)"""
+ log.debug( 'Set rectangle: %s', rect )
+ self.set_size_request(rect.width,rect.height)
+ olpcgames.WIDGET.move( self, rect.left,rect.top)
+ self.rect = rect
+
+ def do_expose_event(self, event):
+ """Handle exposure event (trigger redraw by gst)"""
+ if self._imagesink:
+ self._imagesink.expose()
+ return False
+ else:
+ return True
+
+ def set_sink(self, sink):
+ """Set our window-sink for output"""
+ assert self.window.xid
+ self._imagesink = sink
+ self._imagesink.set_xwindow_id(self.window.xid)
+ self._imagesink.set_property('force-aspect-ratio', self.force_aspect_ratio)
+
+class PygameWidget( object ):
+ """Render "full-screen" video to the entire Pygame screen
+
+ Not particularly useful unless this happens to be exactly what you need.
+ """
+ def __init__( self ):
+ try:
+ window_id = pygame.display.get_wm_info()['window']
+ except KeyError, err: # pygame-ctypes...
+ window_id = int(os.environ['SDL_WINDOWID'])
+ self.window_id = window_id
+ self._imagesink = None
+ #self._holder = _gtkmain.Holder()
+ def set_sink( self, sink ):
+ """Set up our gst sink"""
+ log.info( 'Setting sink: %s', sink )
+ self._imagesink = sink
+ sink.set_xwindow_id( self.window_id )
+
+#pipe_desc = 'v4l2src ! video/x-raw-yuv,width=160,height=120 ! ffmpegcolorspace ! xvimagesink'
+class Player(object):
+ pipe_desc = 'v4l2src ! ffmpegcolorspace ! video/x-raw-yuv ! xvimagesink'
+ test_pipe_desc = 'videotestsrc ! ffmpegcolorspace ! video/x-raw-yuv ! xvimagesink'
+ _synchronized = False
+ def __init__(self, videowidget, pipe_desc=pipe_desc):
+ self._playing = False
+ self._videowidget = videowidget
+
+ self._pipeline = gst.parse_launch(pipe_desc)
+
+ bus = self._pipeline.get_bus()
+ bus.enable_sync_message_emission()
+ bus.add_signal_watch()
+ bus.connect('sync-message::element', self.on_sync_message)
+ bus.connect('message', self.on_message)
+
+ def play(self):
+ log.info( 'Play' )
+ if self._playing == False:
+ self._pipeline.set_state(gst.STATE_PLAYING)
+ self._playing = True
+
+ def pause(self):
+ log.info( 'Pause' )
+ if self._playing == True:
+ if self._synchronized:
+ log.debug( ' pause already sync\'d' )
+ self._pipeline.set_state(gst.STATE_PAUSED)
+ self._playing = False
+ def stop( self ):
+ """Stop all playback"""
+ self._pipeline.set_state( gst.STATE_NULL )
+
+ def on_sync_message(self, bus, message):
+ log.info( 'Sync: %s', message )
+ if message.structure is None:
+ return
+ if message.structure.get_name() == 'prepare-xwindow-id':
+ self._synchronized = True
+ self._videowidget.set_sink(message.src)
+
+ def on_message(self, bus, message):
+ log.info( 'Message: %s', message )
+ t = message.type
+ if t == gst.MESSAGE_ERROR:
+ err, debug = message.parse_error()
+ log.warn("Video error: (%s) %s" ,err, debug)
+ self._playing = False
+
+if __name__ == "__main__":
+ # Simple testing code...
+ logging.basicConfig()
+ log.setLevel( logging.DEBUG )
+ from pygame import image,display, event
+ import pygame
+ def main():
+ display.init()
+ maxX,maxY = display.list_modes()[0]
+ screen = display.set_mode( (maxX/3, maxY/3 ) )
+
+ display.flip()
+
+ pgw = PygameWidget( )
+ p = Player( pgw, pipe_desc=Player.test_pipe_desc )
+ p.play()
+
+ clock = pygame.time.Clock()
+
+ running = True
+ while running:
+ clock.tick( 60 )
+ for evt in [pygame.event.wait()] + pygame.event.get():
+ if evt.type == pygame.KEYDOWN:
+ if p._playing:
+ p.pause()
+ else:
+ p.play()
+ elif evt.type == pygame.QUIT:
+ p.stop()
+ running = False
+ #display.flip()
+ main()
diff --git a/physics.py b/physics.py
new file mode 100755
index 0000000..e21a066
--- /dev/null
+++ b/physics.py
@@ -0,0 +1,152 @@
+# Physics.activity
+# Go eat an apple, Newton!
+#
+# Brian Jordan
+# Modified from Alex Levenson's testbed
+# Modified from Elements demos
+
+import pygame
+from pygame.locals import *
+from pygame.color import *
+
+import elements
+from elements import Elements
+
+def main():
+ # set up pygame
+ pygame.init()
+ size = (1200,900) # A - Any way of getting a lower resolution? Changing size?
+ #size = (1024, 768)
+ screen = pygame.display.set_mode(size)
+ clock = pygame.time.Clock()
+
+ # set up the world
+ world = elements.Elements((400,400)) # A - here?
+ world.renderer.set_surface(screen)
+
+ # set up enviornment
+ world.add.ground()
+ #world.add.wall((100, 100), (300, 300), 5)
+ #body=world.add.rect((900,300),width=300,height=25)
+ #world.add.joint(body)
+
+ # loop control
+ go = True
+
+ a = 0
+ jb1=jb2=jb1pos=jb2pos=None
+
+ # Main Loop: - processes key and mouse events, world update and draw
+ while go:
+ for event in pygame.event.get():
+ if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
+ # Quit the application -- bye bye!
+ go = False
+
+ elif event.type == KEYDOWN and event.key == K_SPACE:
+ # Pause with SPACE
+ world.run_physics = not world.run_physics
+
+ # Adds Mouse-->Object joints for grabbing/throwing objects
+ elif event.type == MOUSEBUTTONDOWN and event.button == 1:
+ # Add Mouse-->Object Joint if at an Object
+ bodylist = world.get_bodies_at_pos(event.pos, include_static=False)
+ if bodylist and len(bodylist) > 0:
+ world.add.mouseJoint(bodylist[0], event.pos)
+ elif event.type == MOUSEBUTTONUP and event.button == 1:
+ # Delete Mouse-->Object Joint
+ world.add.remove_mouseJoint()
+
+ # Uses Box2D mouse movement
+ elif event.type == MOUSEMOTION and event.buttons[0]:
+ world.mouse_move(event.pos)
+
+ # Adds Object-->Object joints for connecting objects
+ elif event.type == MOUSEBUTTONDOWN and event.button == 3:
+ # Connect bodies
+ jb1pos = event.pos
+ jb1 = world.get_bodies_at_pos(event.pos)
+ jb2 = None
+ jb2pos = None
+ elif event.type == MOUSEBUTTONUP and event.button == 3:
+ jb2 = world.get_bodies_at_pos(event.pos)
+ jb2pos = event.pos
+ if jb1 and jb2 and str(jb1) != str(jb2):
+ world.add.joint(jb1[0],jb2[0],jb1pos,jb2pos)
+ jb1 = jb2 = jb1pos = jb2pos = None
+
+ elif event.type == KEYDOWN:
+ if event.key == K_1:
+ #add a triangle
+ x,y = pygame.mouse.get_pos()
+ world.add.triangle((0,0),sidelength=40)
+ world.add.ball((x,y), radius=20)
+ elif event.key == K_2:
+ #add a circle
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((100,0),radius=20)
+ #world.add.rect((100,0),width=40,height=20,angle=90)
+ #a+=10
+ elif event.key == K_3:
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((200,0),radius=20)
+ elif event.key == K_4:
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((300,0),radius=30)
+ elif event.key == K_5:
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((400,0),radius=40)
+ elif event.key == K_6:
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((500,0),radius=50)
+
+ elif event.key == K_7:
+ x,y = pygame.mouse.get_pos()
+ world.add.ball((x,y),radius=60)
+ #elif event.key == K_8:
+ # x,y = pygame.mouse.get_pos()
+ # world.add.ball((x,y),radius=20)
+
+ elif event.key == K_9:
+ # Add many triangles
+ x, y = pygame.mouse.get_pos()
+ for i in range(5):
+ for j in range(5):
+ world.add.triangle((x-i,y-j), sidelength=20)
+ #a+=10 # Rotate 10 degs
+
+ elif event.key == K_8:
+ #add many boxes
+ x,y = pygame.mouse.get_pos()
+ #for i in range(5):
+ # for j in range(5):
+ i = 0
+ for j in range(20):
+ world.add.rect((x-i,y-(j*500)),width=20,height=10,angle=a)
+ #world.add.ball((x,y-(j*500)),radius=60)
+ #a+=10
+ # Clear Display
+ screen.fill((255,255,255))
+
+ # Update & Draw World
+ world.update()
+ world.draw()
+
+ if jb1pos:
+ pygame.draw.line(screen,THECOLORS["red"],jb1pos,pygame.mouse.get_pos(),3)
+
+# pygame.draw.aaline(screen,THECOLORS["red"],(0,0),(1200,900),20)
+
+
+ # Flip Display
+ pygame.display.flip()
+
+ # Try to stay at 30 FPS
+ clock.tick(30) # originally 50
+ x,y = pygame.mouse.get_pos()
+
+
+ # output framerate in caption
+ pygame.display.set_caption("x: %i | y: %i | elements: %i | fps: %i" % (x, y, world.element_count, int(clock.get_fps())))
+if __name__ == "__main__":
+ main()