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

# type b2PulleyJoint

source code

The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.

Instance Methods | [hide private]
__init__(self, *args) __init__(self, b2PulleyJointDef data) -> b2PulleyJoint | source code
__repr__(self) | source code
__getstate__(self, world=None) Get the state of a joint. | source code
__setstate__(self, data) The factory output cannot be created just yet, so store the necessary information to create it later. | source code
_pickle_finalize(data, world) Finalize a joint. | source code
__swig_destroy__(...) delete_b2PulleyJoint(b2PulleyJoint self) |
GetGroundAnchor1(...) b2PulleyJoint_GetGroundAnchor1(b2PulleyJoint self) -> b2Vec2 | source code
GetGroundAnchor2(...) b2PulleyJoint_GetGroundAnchor2(b2PulleyJoint self) -> b2Vec2 | source code
GetLength1(...) b2PulleyJoint_GetLength1(b2PulleyJoint self) -> float32 | source code
GetLength2(...) b2PulleyJoint_GetLength2(b2PulleyJoint self) -> float32 | source code
GetRatio(...) b2PulleyJoint_GetRatio(b2PulleyJoint self) -> float32 | source code
InitVelocityConstraints(...) b2PulleyJoint_InitVelocityConstraints(b2PulleyJoint self, b2TimeStep step) | source code
SolveVelocityConstraints(...) b2PulleyJoint_SolveVelocityConstraints(b2PulleyJoint self, b2TimeStep step) | source code
SolvePositionConstraints(...) b2PulleyJoint_SolvePositionConstraints(b2PulleyJoint self, float32 baumgarte) -> bool | source code
Inherited from b2Joint
ClearUserData(...) b2Joint_ClearUserData(b2Joint self) | source code
GetAnchor1(...) b2Joint_GetAnchor1(b2Joint self) -> b2Vec2 | source code
GetAnchor2(...) b2Joint_GetAnchor2(b2Joint self) -> b2Vec2 | source code
GetBody1(...) b2Joint_GetBody1(b2Joint self) -> b2Body | source code
GetBody2(...) b2Joint_GetBody2(b2Joint self) -> b2Body | source code
GetCollideConnected(...) b2Joint_GetCollideConnected(b2Joint self) -> bool | source code
GetNext(...) b2Joint_GetNext(b2Joint self) -> b2Joint | source code
GetReactionForce(...) b2Joint_GetReactionForce(b2Joint self, float32 inv_dt) -> b2Vec2 | source code
GetReactionTorque(...) b2Joint_GetReactionTorque(b2Joint self, float32 inv_dt) -> float32 | source code
GetType(...) b2Joint_GetType(b2Joint self) -> b2JointType | source code
GetUserData(...) b2Joint_GetUserData(b2Joint self) -> PyObject | source code
SetUserData(...) b2Joint_SetUserData(b2Joint self, PyObject data) | source code
__eq__(a, b) | source code
__hash__(...) b2Joint___hash__(b2Joint self) -> int32 | source code
__ne__(self, other) | source code
asDistanceJoint(...) b2Joint_asDistanceJoint(b2Joint self) -> b2DistanceJoint | source code
asGearJoint(...) b2Joint_asGearJoint(b2Joint self) -> b2GearJoint | source code
asLineJoint(...) b2Joint_asLineJoint(b2Joint self) -> b2LineJoint | source code
asMouseJoint(...) b2Joint_asMouseJoint(b2Joint self) -> b2MouseJoint | 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
getAsType(self) Return a typecasted version of the joint | source code
typeName(self) Return the name of the joint from:... | source code

Properties | [hide private]
| thisown The membership flag
| ground b2PulleyJoint_ground_get(b2PulleyJoint self) -> b2Body
| groundAnchor1 b2PulleyJoint_groundAnchor1_get(b2PulleyJoint self) -> b2Vec2
| groundAnchor2 b2PulleyJoint_groundAnchor2_get(b2PulleyJoint self) -> b2Vec2
| localAnchor1 b2PulleyJoint_localAnchor1_get(b2PulleyJoint self) -> b2Vec2
| localAnchor2 b2PulleyJoint_localAnchor2_get(b2PulleyJoint self) -> b2Vec2
| u1 b2PulleyJoint_u1_get(b2PulleyJoint self) -> b2Vec2
| u2 b2PulleyJoint_u2_get(b2PulleyJoint self) -> b2Vec2
| constant b2PulleyJoint_constant_get(b2PulleyJoint self) -> float32
| ratio b2PulleyJoint_ratio_get(b2PulleyJoint self) -> float32
| maxLength1 b2PulleyJoint_maxLength1_get(b2PulleyJoint self) -> float32
| maxLength2 b2PulleyJoint_maxLength2_get(b2PulleyJoint self) -> float32
| pulleyMass b2PulleyJoint_pulleyMass_get(b2PulleyJoint self) -> float32
| limitMass1 b2PulleyJoint_limitMass1_get(b2PulleyJoint self) -> float32
| limitMass2 b2PulleyJoint_limitMass2_get(b2PulleyJoint self) -> float32
| impulse b2PulleyJoint_impulse_get(b2PulleyJoint self) -> float32
| limitImpulse1 b2PulleyJoint_limitImpulse1_get(b2PulleyJoint self) -> float32
| limitImpulse2 b2PulleyJoint_limitImpulse2_get(b2PulleyJoint self) -> float32
| state b2PulleyJoint_state_get(b2PulleyJoint self) -> b2LimitState
| limitState1 b2PulleyJoint_limitState1_get(b2PulleyJoint self) -> b2LimitState
| limitState2 b2PulleyJoint_limitState2_get(b2PulleyJoint self) -> b2LimitState
| length1 GetLength1(self) -> float32
| length2 GetLength2(self) -> float32
Inherited from b2Joint
| body1 GetBody1(self) -> b2Body
| body2 GetBody2(self) -> b2Body
| collideConnected GetCollideConnected(self) -> bool
| type GetType(self) -> b2JointType
| userData GetUserData(self) -> PyObject

Method Details | [hide private]

### __init__(self, *args) (Constructor) | source code
__init__(self, b2PulleyJointDef data) -> b2PulleyJoint The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top. Overrides: b2Joint.__init__

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

### __getstate__(self, world=None) | source code
Get the state of a joint. Overrides: no_pickle

### __setstate__(self, data) | source code
The factory output cannot be created just yet, so store the necessary information to create it later. Overrides: _generic_setstate

### _pickle_finalize(data, world) | source code
Finalize a joint. The bodies and joints need to be retrieved from the world list in order to make the joint.

### GetGroundAnchor1(...) | source code
b2PulleyJoint_GetGroundAnchor1(b2PulleyJoint self) -> b2Vec2 Get the first ground anchor.

### GetGroundAnchor2(...) | source code
b2PulleyJoint_GetGroundAnchor2(b2PulleyJoint self) -> b2Vec2 Get the second ground anchor.

### GetLength1(...) | source code
b2PulleyJoint_GetLength1(b2PulleyJoint self) -> float32 Get the current length of the segment attached to body1.

### GetLength2(...) | source code
b2PulleyJoint_GetLength2(b2PulleyJoint self) -> float32 Get the current length of the segment attached to body2.

### GetRatio(...) | source code
b2PulleyJoint_GetRatio(b2PulleyJoint self) -> float32 Get the pulley ratio.

Property Details | [hide private]

### thisown The membership flag

### ground b2PulleyJoint_ground_get(b2PulleyJoint self) -> b2Body

### groundAnchor1 b2PulleyJoint_groundAnchor1_get(b2PulleyJoint self) -> b2Vec2

### groundAnchor2 b2PulleyJoint_groundAnchor2_get(b2PulleyJoint self) -> b2Vec2

### localAnchor1 b2PulleyJoint_localAnchor1_get(b2PulleyJoint self) -> b2Vec2

### localAnchor2 b2PulleyJoint_localAnchor2_get(b2PulleyJoint self) -> b2Vec2

### u1 b2PulleyJoint_u1_get(b2PulleyJoint self) -> b2Vec2

### u2 b2PulleyJoint_u2_get(b2PulleyJoint self) -> b2Vec2

### constant b2PulleyJoint_constant_get(b2PulleyJoint self) -> float32

### ratio b2PulleyJoint_ratio_get(b2PulleyJoint self) -> float32

### maxLength1 b2PulleyJoint_maxLength1_get(b2PulleyJoint self) -> float32

### maxLength2 b2PulleyJoint_maxLength2_get(b2PulleyJoint self) -> float32

### pulleyMass b2PulleyJoint_pulleyMass_get(b2PulleyJoint self) -> float32

### limitMass1 b2PulleyJoint_limitMass1_get(b2PulleyJoint self) -> float32

### limitMass2 b2PulleyJoint_limitMass2_get(b2PulleyJoint self) -> float32

### impulse b2PulleyJoint_impulse_get(b2PulleyJoint self) -> float32

### limitImpulse1 b2PulleyJoint_limitImpulse1_get(b2PulleyJoint self) -> float32

### limitImpulse2 b2PulleyJoint_limitImpulse2_get(b2PulleyJoint self) -> float32

### state b2PulleyJoint_state_get(b2PulleyJoint self) -> b2LimitState

### limitState1 b2PulleyJoint_limitState1_get(b2PulleyJoint self) -> b2LimitState

### limitState2 b2PulleyJoint_limitState2_get(b2PulleyJoint self) -> b2LimitState

### length1 GetLength1(self) -> float32 Get the current length of the segment attached to body1.

### length2 GetLength2(self) -> float32 Get the current length of the segment attached to body2.