Module ode :: Class Joint
[show private | hide private]
[frames | no frames]

Type Joint

object --+
         |
        Joint

Known Subclasses:
AMotor, BallJoint, ContactJoint, FixedJoint, Hinge2Joint, HingeJoint, LMotor, Plane2DJoint, SliderJoint, UniversalJoint

Base class for all joint classes.
Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  attach(body1, body2)
Attach the joint to some new bodies.
Body getBody(index)
Return the bodies that this joint connects.
(force1, torque1, force2, torque2) getFeedback()
Get the forces/torques applied by the joint.
  setFeedback(flag)
Create a feedback buffer.
  _destroyed(...)
Notify the joint object about an external destruction of the ODE joint.
    Inherited from object
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
__builtin__.object.__init__

__delattr__(...)

x.__delattr__('name') <==> del x.name
Overrides:
__builtin__.object.__delattr__

__getattribute__(...)

x.__getattribute__('name') <==> x.name
Overrides:
__builtin__.object.__getattribute__

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
__builtin__.object.__new__

__setattr__(...)

x.__setattr__('name', value) <==> x.name = value
Overrides:
__builtin__.object.__setattr__

attach(body1, body2)

Attach the joint to some new bodies. A body can be attached to the environment by passing None as second body.
Parameters:
body1 - First body
           (type=Body)
body2 - Second body
           (type=Body)

getBody(index)

Return the bodies that this joint connects. If index is 0 the "first" body will be returned, corresponding to the body1 argument of the attach() method. If index is 1 the "second" body will be returned, corresponding to the body2 argument of the attach() method.
Parameters:
index - Bodx index (0 or 1).
           (type=int)
Returns:
Body

getFeedback()

Get the forces/torques applied by the joint. If feedback is activated (i.e. setFeedback(True) was called) then this method returns a tuple (force1, torque1, force2, torque2) with the forces and torques applied to body 1 and body 2. The forces/torques are given as 3-tuples.

If feedback is deactivated then the method always returns None.
Returns:
(force1, torque1, force2, torque2)

setFeedback(flag=True)

Create a feedback buffer. If flag is True then a buffer is allocated and the forces/torques applied by the joint can be read using the getFeedback() method. If flag is False the buffer is released.
Parameters:
flag - Specifies whether a buffer should be created or released
           (type=bool)

_destroyed(...)

Notify the joint object about an external destruction of the ODE joint.

This method has to be called when the underlying ODE object was destroyed by someone else (e.g. by a joint group). The Python wrapper will then refrain from destroying it again.

Generated by Epydoc 2.1 on Sun Feb 4 17:54:12 2007 http://epydoc.sf.net