Class: MSPhysics::Slider
- Defined in:
- RubyExtension/MSPhysics/joint_slider.rb
Overview
Constant Summary
- DEFAULT_MIN =
-10.0
- DEFAULT_MAX =
10.0- DEFAULT_LIMITS_ENABLED =
false- DEFAULT_FRICTION =
0.0- DEFAULT_CONTROLLER =
1.0
Constants inherited from Joint
Joint::DEFAULT_BODIES_COLLIDABLE, Joint::DEFAULT_BREAKING_FORCE, Joint::DEFAULT_SOLVER_MODEL, Joint::DEFAULT_STIFFNESS
Instance Method Summary collapse
-
#controller ⇒ Numeric
Get slider controller, the magnitude of the linear friction.
-
#controller=(value) ⇒ Object
Set slider controller, the magnitude of the linear friction.
-
#cur_acceleration ⇒ Numeric
Get current acceleration in meters per second per second.
-
#cur_position ⇒ Numeric
Get current position in meters.
-
#cur_velocity ⇒ Numeric
Get current velocity in meters per second.
-
#friction ⇒ Numeric
Get movement friction.
-
#friction=(value) ⇒ Object
Set movement friction.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ Slider
constructor
Create a slider joint.
-
#limits_enabled=(state) ⇒ Object
Enable/disable min and max position limits.
-
#limits_enabled? ⇒ Boolean
Determine whether min and max position limits are enabled.
-
#max ⇒ Numeric
Get maximum position in meters.
-
#max=(value) ⇒ Object
Set maximum position in meters.
-
#min ⇒ Numeric
Get minimum position in meters.
-
#min=(value) ⇒ Object
Set minimum position in meters.
Methods inherited from Joint
#address, all_joints, #bodies_collidable=, #bodies_collidable?, #breaking_force, #breaking_force=, #child, #connect, #connected?, #destroy, #disconnect, #dof, #get_pin_matrix, #get_pin_matrix2, #group, joint_by_address, #name, #name=, #parent, #set_pin_matrix, #solver_model, #solver_model=, #stiffness, #stiffness=, #type, #valid?, validate, #world
Methods inherited from Entity
Constructor Details
#initialize(world, parent, pin_tra, group = nil) ⇒ Slider
Create a slider joint.
Instance Method Details
#controller ⇒ Numeric
Get slider controller, the magnitude of the linear friction.
#controller=(value) ⇒ Object
Set slider controller, the magnitude of the linear friction.
#cur_acceleration ⇒ Numeric
Get current acceleration in meters per second per second.
#cur_position ⇒ Numeric
Get current position in meters.
#cur_velocity ⇒ Numeric
Get current velocity in meters per second.
#friction ⇒ Numeric
Get movement friction.
#friction=(value) ⇒ Object
Set movement friction.
#limits_enabled=(state) ⇒ Object
Enable/disable min and max position limits.
#limits_enabled? ⇒ Boolean
Determine whether min and max position limits are enabled.
#max ⇒ Numeric
Get maximum position in meters.
#max=(value) ⇒ Object
Set maximum position in meters.
#min ⇒ Numeric
Get minimum position in meters.
#min=(value) ⇒ Object
Set minimum position in meters.