RevoluteJoint class final

Allows relative rotation of two bodies around a point, like a hinge or a pin, with an optional limit, motor, and spring.

Inheritance

Properties

angle double
The current joint angle relative to the reference angle, in radians.
no setter
bodyA Body
The first attached body.
no setterinherited
bodyB Body
The second attached body.
no setterinherited
collideConnected bool
Whether the connected bodies may collide with each other.
getter/setter pairinherited
constraintForce Vector2
The constraint force applied by the joint, in newtons.
no setterinherited
constraintTorque double
The constraint torque applied by the joint, in newton-meters.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isValid bool
Whether this joint has not been destroyed.
no setterinherited
limitEnabled bool
Whether the angle limit is enabled.
getter/setter pair
localAnchorA Vector2
The joint anchor point on the first body, in its local coordinates.
no setterinherited
localAnchorB Vector2
The joint anchor point on the second body, in its local coordinates.
no setterinherited
lowerLimit double
The lower angle limit, in radians.
no setter
maxMotorTorque double
The maximum motor torque, in newton-meters.
getter/setter pair
motorEnabled bool
Whether the motor is enabled.
getter/setter pair
motorSpeed double
The motor speed, in radians per second.
getter/setter pair
motorTorque double
The current motor torque, in newton-meters.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
springDampingRatio double
The spring damping ratio.
getter/setter pair
springEnabled bool
Whether the spring is enabled.
getter/setter pair
springHertz double
The spring stiffness in hertz.
getter/setter pair
targetAngle double
The target angle for the spring, in radians.
getter/setter pair
type JointType
The type of this joint.
no setterinherited
upperLimit double
The upper angle limit, in radians.
no setter
userData Object?
The user data associated with the joint.
getter/setter pairinherited
world World
The world this joint belongs to.
finalinherited

Methods

destroy() → void
Destroys this joint.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLimits({required double lower, required double upper}) → void
Sets the angle limits, in radians.
toString() String
A string representation of this object.
inherited
wakeBodies() → void
Wakes both connected bodies.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited