Package pybox2d :: Module Box2D :: Class b2Joint |
[hide private]
[frames] | no frames]

# type b2Joint

source code

Known Subclasses:
  - b2DistanceJoint
  - , b2GearJoint
  - , b2LineJoint
  - , b2MouseJoint
  - , b2PrismaticJoint
  - , b2PulleyJoint
  - , b2RevoluteJoint

The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.

Instance Methods | [hide private]
__init__(self, *args, **kwargs) | source code
__repr__(self) | source code
__getstate__(self) | source code
__setstate__(self, dict) Takes each variable=value pair in the dictionary and sets the attributes based on them | source code
__eq__(a, b) | source code
__ne__(self, other) | source code
typeName(self) Return the name of the joint from:... | source code
getAsType(self) Return a typecasted version of the joint | source code
GetType(...) b2Joint_GetType(b2Joint self) -> b2JointType | source code
GetBody1(...) b2Joint_GetBody1(b2Joint self) -> b2Body | source code
GetBody2(...) b2Joint_GetBody2(b2Joint self) -> b2Body | source code
GetAnchor1(...) b2Joint_GetAnchor1(b2Joint self) -> b2Vec2 | source code
GetAnchor2(...) b2Joint_GetAnchor2(b2Joint self) -> b2Vec2 | source code
GetReactionForce(...) b2Joint_GetReactionForce(b2Joint self, float32 inv_dt) -> b2Vec2 | source code
GetReactionTorque(...) b2Joint_GetReactionTorque(b2Joint self, float32 inv_dt) -> float32 | source code
GetNext(...) b2Joint_GetNext(b2Joint self) -> b2Joint | source code
GetCollideConnected(...) b2Joint_GetCollideConnected(b2Joint self) -> bool | source code
GetUserData(...) b2Joint_GetUserData(b2Joint self) -> PyObject | source code
SetUserData(...) b2Joint_SetUserData(b2Joint self, PyObject data) | source code
ClearUserData(...) b2Joint_ClearUserData(b2Joint self) | source code
__hash__(...) b2Joint___hash__(b2Joint self) -> int32 | source code
asMouseJoint(...) b2Joint_asMouseJoint(b2Joint self) -> b2MouseJoint | source code
asGearJoint(...) b2Joint_asGearJoint(b2Joint self) -> b2GearJoint | source code
asDistanceJoint(...) b2Joint_asDistanceJoint(b2Joint self) -> b2DistanceJoint | source code
asPrismaticJoint(...) b2Joint_asPrismaticJoint(b2Joint self) -> b2PrismaticJoint | source code
asPulleyJoint(...) b2Joint_asPulleyJoint(b2Joint self) -> b2PulleyJoint | source code
asRevoluteJoint(...) b2Joint_asRevoluteJoint(b2Joint self) -> b2RevoluteJoint | source code
asLineJoint(...) b2Joint_asLineJoint(b2Joint self) -> b2LineJoint | source code

Properties | [hide private]
| thisown The membership flag
| userData GetUserData(self) -> PyObject
| type GetType(self) -> b2JointType
| body1 GetBody1(self) -> b2Body
| body2 GetBody2(self) -> b2Body
| collideConnected GetCollideConnected(self) -> bool

Method Details | [hide private]

### __init__(self, *args, **kwargs) (Constructor) | source code
Overrides: object.__init__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
Overrides: object.__repr__ (inherited documentation)

### typeName(self) | source code
    Return the name of the joint from:
     Unknown, Mouse, Gear, Distance, Prismatic, Pulley, Revolute

### GetType(...) | source code
b2Joint_GetType(b2Joint self) -> b2JointType Get the type of the concrete joint.

### GetBody1(...) | source code
b2Joint_GetBody1(b2Joint self) -> b2Body Get the first body attached to this joint.

### GetBody2(...) | source code
b2Joint_GetBody2(b2Joint self) -> b2Body Get the second body attached to this joint.

### GetAnchor1(...) | source code
b2Joint_GetAnchor1(b2Joint self) -> b2Vec2 Get the anchor point on body1 in world coordinates.

### GetAnchor2(...) | source code
b2Joint_GetAnchor2(b2Joint self) -> b2Vec2 Get the anchor point on body2 in world coordinates.

### GetReactionForce(...) | source code
b2Joint_GetReactionForce(b2Joint self, float32 inv_dt) -> b2Vec2 Get the reaction force on body2 at the joint anchor.

### GetReactionTorque(...) | source code
b2Joint_GetReactionTorque(b2Joint self, float32 inv_dt) -> float32 Get the reaction torque on body2.

### GetNext(...) | source code
b2Joint_GetNext(b2Joint self) -> b2Joint Get the next joint the world joint list.

### GetCollideConnected(...) | source code
b2Joint_GetCollideConnected(b2Joint self) -> bool Get whether or not joint bodies can collide.

### GetUserData(...) | source code
b2Joint_GetUserData(b2Joint self) -> PyObject Get the user data pointer.

### SetUserData(...) | source code
b2Joint_SetUserData(b2Joint self, PyObject data) Set the user data pointer.

### __hash__(...) (Hashing function) | source code
b2Joint___hash__(b2Joint self) -> int32 Overrides: object.__hash__

Property Details | [hide private]

### thisown The membership flag

### userData GetUserData(self) -> PyObject Get the user data pointer.

### type GetType(self) -> b2JointType Get the type of the concrete joint.

### body1 GetBody1(self) -> b2Body Get the first body attached to this joint.

### body2 GetBody2(self) -> b2Body Get the second body attached to this joint.

### collideConnected GetCollideConnected(self) -> bool Get whether or not joint bodies can collide.