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

# type b2RevoluteJointDef

source code

Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken.

Instance Methods | [hide private]
b2RevoluteJointDef |
__init__(self) Revolute joint definition. | source code
__repr__(self) | source code
__getstate__(self, additional_ignore=`[``]`) Returns a dictionary representation of self, with dict(var=value [, ...]) | source code
__setstate__(self, dict) Takes each variable=value pair in the dictionary and sets the attributes based on them | source code
__swig_destroy__(...) delete_b2RevoluteJointDef(b2RevoluteJointDef self) |
Initialize(...) b2RevoluteJointDef_Initialize(b2RevoluteJointDef self, b2Body body1, b2Body body2, b2Vec2 anchor) | source code
Inherited from b2JointDef
ClearUserData(...) b2JointDef_ClearUserData(b2JointDef self) | source code
GetUserData(...) b2JointDef_GetUserData(b2JointDef self) -> PyObject | source code
SetUserData(...) b2JointDef_SetUserData(b2JointDef self, PyObject data) | source code
__del__(self) | source code
typeName(self) Return the name of the joint from:... | source code

Properties | [hide private]
| thisown The membership flag
| localAnchor1 b2RevoluteJointDef_localAnchor1_get(b2RevoluteJointDef self) -> b2Vec2
| localAnchor2 b2RevoluteJointDef_localAnchor2_get(b2RevoluteJointDef self) -> b2Vec2
| referenceAngle b2RevoluteJointDef_referenceAngle_get(b2RevoluteJointDef self) -> float32
| enableLimit b2RevoluteJointDef_enableLimit_get(b2RevoluteJointDef self) -> bool
| lowerAngle b2RevoluteJointDef_lowerAngle_get(b2RevoluteJointDef self) -> float32
| upperAngle b2RevoluteJointDef_upperAngle_get(b2RevoluteJointDef self) -> float32
| enableMotor b2RevoluteJointDef_enableMotor_get(b2RevoluteJointDef self) -> bool
| motorSpeed b2RevoluteJointDef_motorSpeed_get(b2RevoluteJointDef self) -> float32
| maxMotorTorque b2RevoluteJointDef_maxMotorTorque_get(b2RevoluteJointDef self) -> float32
Inherited from b2JointDef
| body1 b2JointDef_body1_get(b2JointDef self) -> b2Body
| body2 b2JointDef_body2_get(b2JointDef self) -> b2Body
| collideConnected b2JointDef_collideConnected_get(b2JointDef self) -> bool
| type b2JointDef_type_get(b2JointDef self) -> b2JointType
| userData GetUserData(self) -> PyObject

Method Details | [hide private]

### __init__(self) (Constructor) | source code
Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken. Returns: b2RevoluteJointDef Overrides: b2JointDef.__init__

### __repr__(self) (Representation operator) | source code
Overrides: b2JointDef.__repr__

### __getstate__(self, additional_ignore=`[``]`) | source code
    Returns a dictionary representation of self, with
     dict(var=value [, ...])

    additional_ignore can be specified to ignore certain
    properties.
Overrides: _generic_getstate

### __setstate__(self, dict) | source code
Takes each variable=value pair in the dictionary and sets the attributes based on them Overrides: _generic_setstate

### __swig_destroy__(...) |
delete_b2RevoluteJointDef(b2RevoluteJointDef self) Overrides: b2JointDef.__swig_destroy__

### Initialize(...) | source code
    b2RevoluteJointDef_Initialize(b2RevoluteJointDef self, b2Body body1, b2Body body2,
        b2Vec2 anchor)

    Initialize the bodies, anchors, and reference angle using the world anchor.

Property Details | [hide private]

### thisown The membership flag

### localAnchor1 b2RevoluteJointDef_localAnchor1_get(b2RevoluteJointDef self) -> b2Vec2

### localAnchor2 b2RevoluteJointDef_localAnchor2_get(b2RevoluteJointDef self) -> b2Vec2

### referenceAngle b2RevoluteJointDef_referenceAngle_get(b2RevoluteJointDef self) -> float32

### enableLimit b2RevoluteJointDef_enableLimit_get(b2RevoluteJointDef self) -> bool

### lowerAngle b2RevoluteJointDef_lowerAngle_get(b2RevoluteJointDef self) -> float32

### upperAngle b2RevoluteJointDef_upperAngle_get(b2RevoluteJointDef self) -> float32

### enableMotor b2RevoluteJointDef_enableMotor_get(b2RevoluteJointDef self) -> bool

### motorSpeed b2RevoluteJointDef_motorSpeed_get(b2RevoluteJointDef self) -> float32

### maxMotorTorque b2RevoluteJointDef_maxMotorTorque_get(b2RevoluteJointDef self) -> float32