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

type b2RevoluteJoint

source code


A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

Instance Methods [hide private]
 
__init__(self, *args)
__init__(self, b2RevoluteJointDef _def) -> b2RevoluteJoint
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_b2RevoluteJoint(b2RevoluteJoint self)
 
GetJointAngle(...)
b2RevoluteJoint_GetJointAngle(b2RevoluteJoint self) -> float32
source code
 
GetJointSpeed(...)
b2RevoluteJoint_GetJointSpeed(b2RevoluteJoint self) -> float32
source code
 
IsLimitEnabled(...)
b2RevoluteJoint_IsLimitEnabled(b2RevoluteJoint self) -> bool
source code
 
EnableLimit(...)
b2RevoluteJoint_EnableLimit(b2RevoluteJoint self, bool flag)
source code
 
GetLowerLimit(...)
b2RevoluteJoint_GetLowerLimit(b2RevoluteJoint self) -> float32
source code
 
GetUpperLimit(...)
b2RevoluteJoint_GetUpperLimit(b2RevoluteJoint self) -> float32
source code
 
SetLimits(...)
b2RevoluteJoint_SetLimits(b2RevoluteJoint self, float32 lower, float32 upper)
source code
 
IsMotorEnabled(...)
b2RevoluteJoint_IsMotorEnabled(b2RevoluteJoint self) -> bool
source code
 
EnableMotor(...)
b2RevoluteJoint_EnableMotor(b2RevoluteJoint self, bool flag)
source code
 
SetMotorSpeed(...)
b2RevoluteJoint_SetMotorSpeed(b2RevoluteJoint self, float32 speed)
source code
 
GetMotorSpeed(...)
b2RevoluteJoint_GetMotorSpeed(b2RevoluteJoint self) -> float32
source code
 
SetMaxMotorTorque(...)
b2RevoluteJoint_SetMaxMotorTorque(b2RevoluteJoint self, float32 torque)
source code
 
GetMotorTorque(...)
b2RevoluteJoint_GetMotorTorque(b2RevoluteJoint self) -> float32
source code
 
InitVelocityConstraints(...)
b2RevoluteJoint_InitVelocityConstraints(b2RevoluteJoint self, b2TimeStep step)
source code
 
SolveVelocityConstraints(...)
b2RevoluteJoint_SolveVelocityConstraints(b2RevoluteJoint self, b2TimeStep step)
source code
 
SolvePositionConstraints(...)
b2RevoluteJoint_SolvePositionConstraints(b2RevoluteJoint 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
  localAnchor1
b2RevoluteJoint_localAnchor1_get(b2RevoluteJoint self) -> b2Vec2
  localAnchor2
b2RevoluteJoint_localAnchor2_get(b2RevoluteJoint self) -> b2Vec2
  impulse
b2RevoluteJoint_impulse_get(b2RevoluteJoint self) -> b2Vec3
  motorImpulse
b2RevoluteJoint_motorImpulse_get(b2RevoluteJoint self) -> float32
  mass
b2RevoluteJoint_mass_get(b2RevoluteJoint self) -> b2Mat33
  motorMass
b2RevoluteJoint_motorMass_get(b2RevoluteJoint self) -> float32
  enableMotor
b2RevoluteJoint_enableMotor_get(b2RevoluteJoint self) -> bool
  maxMotorTorque
b2RevoluteJoint_maxMotorTorque_get(b2RevoluteJoint self) -> float32
  motorSpeed
b2RevoluteJoint_motorSpeed_get(b2RevoluteJoint self) -> float32
  enableLimit
b2RevoluteJoint_enableLimit_get(b2RevoluteJoint self) -> bool
  referenceAngle
b2RevoluteJoint_referenceAngle_get(b2RevoluteJoint self) -> float32
  lowerAngle
b2RevoluteJoint_lowerAngle_get(b2RevoluteJoint self) -> float32
  upperAngle
b2RevoluteJoint_upperAngle_get(b2RevoluteJoint self) -> float32
  limitState
b2RevoluteJoint_limitState_get(b2RevoluteJoint self) -> b2LimitState
    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, b2RevoluteJointDef _def) -> b2RevoluteJoint

A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

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.

GetJointAngle(...)

source code 

b2RevoluteJoint_GetJointAngle(b2RevoluteJoint self) -> float32

Get the current joint angle in radians.

GetJointSpeed(...)

source code 

b2RevoluteJoint_GetJointSpeed(b2RevoluteJoint self) -> float32

Get the current joint angle speed in radians per second.

IsLimitEnabled(...)

source code 

b2RevoluteJoint_IsLimitEnabled(b2RevoluteJoint self) -> bool

Is the joint limit enabled?

EnableLimit(...)

source code 

b2RevoluteJoint_EnableLimit(b2RevoluteJoint self, bool flag)

Enable/disable the joint limit.

GetLowerLimit(...)

source code 

b2RevoluteJoint_GetLowerLimit(b2RevoluteJoint self) -> float32

Get the lower joint limit in radians.

GetUpperLimit(...)

source code 

b2RevoluteJoint_GetUpperLimit(b2RevoluteJoint self) -> float32

Get the upper joint limit in radians.

SetLimits(...)

source code 

b2RevoluteJoint_SetLimits(b2RevoluteJoint self, float32 lower, float32 upper)

Set the joint limits in radians.

IsMotorEnabled(...)

source code 

b2RevoluteJoint_IsMotorEnabled(b2RevoluteJoint self) -> bool

Is the joint motor enabled?

EnableMotor(...)

source code 

b2RevoluteJoint_EnableMotor(b2RevoluteJoint self, bool flag)

Enable/disable the joint motor.

SetMotorSpeed(...)

source code 

b2RevoluteJoint_SetMotorSpeed(b2RevoluteJoint self, float32 speed)

Set the motor speed in radians per second.

GetMotorSpeed(...)

source code 

b2RevoluteJoint_GetMotorSpeed(b2RevoluteJoint self) -> float32

Get the motor speed in radians per second.

SetMaxMotorTorque(...)

source code 

b2RevoluteJoint_SetMaxMotorTorque(b2RevoluteJoint self, float32 torque)

Set the maximum motor torque, usually in N-m.

GetMotorTorque(...)

source code 

b2RevoluteJoint_GetMotorTorque(b2RevoluteJoint self) -> float32

Get the current motor torque, usually in N-m.


Property Details [hide private]

thisown

The membership flag

localAnchor1

b2RevoluteJoint_localAnchor1_get(b2RevoluteJoint self) -> b2Vec2

localAnchor2

b2RevoluteJoint_localAnchor2_get(b2RevoluteJoint self) -> b2Vec2

impulse

b2RevoluteJoint_impulse_get(b2RevoluteJoint self) -> b2Vec3

motorImpulse

b2RevoluteJoint_motorImpulse_get(b2RevoluteJoint self) -> float32

mass

b2RevoluteJoint_mass_get(b2RevoluteJoint self) -> b2Mat33

motorMass

b2RevoluteJoint_motorMass_get(b2RevoluteJoint self) -> float32

enableMotor

b2RevoluteJoint_enableMotor_get(b2RevoluteJoint self) -> bool

maxMotorTorque

b2RevoluteJoint_maxMotorTorque_get(b2RevoluteJoint self) -> float32

motorSpeed

b2RevoluteJoint_motorSpeed_get(b2RevoluteJoint self) -> float32

enableLimit

b2RevoluteJoint_enableLimit_get(b2RevoluteJoint self) -> bool

referenceAngle

b2RevoluteJoint_referenceAngle_get(b2RevoluteJoint self) -> float32

lowerAngle

b2RevoluteJoint_lowerAngle_get(b2RevoluteJoint self) -> float32

upperAngle

b2RevoluteJoint_upperAngle_get(b2RevoluteJoint self) -> float32

limitState

b2RevoluteJoint_limitState_get(b2RevoluteJoint self) -> b2LimitState