Class: Box2D::DistanceJoint
Constant Summary
Constants inherited
from Joint
Joint::ID_CLASS
Instance Attribute Summary
Attributes inherited from Joint
#body_a, #body_b
Attributes inherited from Handle
#id, #world
Instance Method Summary
collapse
Methods inherited from Joint
#collide_connected=, #collide_connected?, #constraint_force, #constraint_torque, #destroy, #initialize, #invalidate_from_body!, #user_data, #user_data=
Methods inherited from Handle
#destroyed?, #eql?, #hash, #initialize, #valid?
Constructor Details
This class inherits a constructor from Box2D::Joint
Instance Method Details
#current_length ⇒ Object
158
159
160
161
|
# File 'lib/box2d/joint.rb', line 158
def current_length
ensure_valid!
Native.b2DistanceJoint_GetCurrentLength(@id)
end
|
#length ⇒ Object
148
149
150
151
|
# File 'lib/box2d/joint.rb', line 148
def length
ensure_valid!
Native.b2DistanceJoint_GetLength(@id)
end
|
#length=(value) ⇒ Object
153
154
155
156
|
# File 'lib/box2d/joint.rb', line 153
def length=(value)
ensure_valid!
Native.b2DistanceJoint_SetLength(@id, ValueConversion.positive_float(value, label: "length"))
end
|
#motor_speed ⇒ Object
163
164
165
166
|
# File 'lib/box2d/joint.rb', line 163
def motor_speed
ensure_valid!
Native.b2DistanceJoint_GetMotorSpeed(@id)
end
|
#motor_speed=(value) ⇒ Object
168
169
170
171
|
# File 'lib/box2d/joint.rb', line 168
def motor_speed=(value)
ensure_valid!
Native.b2DistanceJoint_SetMotorSpeed(@id, ValueConversion.finite_float(value, label: "motor_speed"))
end
|