mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
OdeJoint extension definitions
This commit is contained in:
parent
2df88fd9de
commit
2fe2b81da5
11
direct/src/extensions/OdeJoint-extensions.py
Executable file
11
direct/src/extensions/OdeJoint-extensions.py
Executable file
@ -0,0 +1,11 @@
|
||||
def attach(self, body1, body2):
|
||||
"""
|
||||
Attach two bodies together.
|
||||
If either body is None, the other will be attached to the environment.
|
||||
"""
|
||||
if body1 and body2:
|
||||
self.attachBodies(body1, body2)
|
||||
elif body1 and not body2:
|
||||
self.attachBody(body1, 0)
|
||||
elif not body1 and body2:
|
||||
self.attachBody(body2, 1)
|
27
direct/src/extensions_native/OdeJoint_extensions.py
Executable file
27
direct/src/extensions_native/OdeJoint_extensions.py
Executable file
@ -0,0 +1,27 @@
|
||||
|
||||
from extension_native_helpers import *
|
||||
from libpanda import *
|
||||
|
||||
####################################################################
|
||||
#Dtool_funcToMethod(func, class)
|
||||
#del func
|
||||
#####################################################################
|
||||
|
||||
"""
|
||||
ODE-extensions module: contains methods to extend functionality
|
||||
of the ODE classes
|
||||
"""
|
||||
|
||||
def attach(self, body1, body2):
|
||||
"""
|
||||
Attach two bodies together.
|
||||
If either body is None, the other will be attached to the environment.
|
||||
"""
|
||||
if body1 and body2:
|
||||
self.attachBodies(body1, body2)
|
||||
elif body1 and not body2:
|
||||
self.attachBody(body1, 0)
|
||||
elif not body1 and body2:
|
||||
self.attachBody(body2, 1)
|
||||
Dtool_funcToMethod(attach, OdeJoint)
|
||||
del attach
|
Loading…
x
Reference in New Issue
Block a user