Class: MSPhysics::Piston
- Defined in:
- RubyExtension/MSPhysics/joint_piston.rb
Overview
Constant Summary
- DEFAULT_MIN =
-10.0
- DEFAULT_MAX =
10.0- DEFAULT_LIMITS_ENABLED =
false- DEFAULT_RATE =
4.0- DEFAULT_POWER =
0.0- DEFAULT_REDUCTION_RATIO =
0.1- DEFAULT_CONTROLLER =
nil- DEFAULT_CONTROLLER_MODE =
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 piston controller.
-
#controller=(value) ⇒ Object
Set piston controller.
-
#controller_mode ⇒ Fixnum
Get controller mode.
-
#controller_mode=(mode) ⇒ Object
Set controller mode.
-
#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.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ Piston
constructor
Create a piston joint.
-
#limits_enabled=(state) ⇒ Object
Enable/disable min & max position limits.
-
#limits_enabled? ⇒ Boolean
Determine whether min & 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.
-
#power ⇒ Numeric
Get movement power in Watts.
-
#power=(value) ⇒ Object
Set movement power in Watts.
-
#rate ⇒ Numeric
Get maximum linear rate in meters per second.
-
#rate=(value) ⇒ Object
Set maximum linear rate in meters per second.
-
#reduction_ratio ⇒ Numeric
Get linear reduction ratio.
-
#reduction_ratio=(value) ⇒ Object
Get linear reduction ratio.
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) ⇒ Piston
Create a piston joint.
Instance Method Details
#controller ⇒ Numeric?
Get piston controller.
#controller=(value) ⇒ Object
Set piston controller.
#controller_mode ⇒ Fixnum
Get controller mode.
#controller_mode=(mode) ⇒ Object
Set controller mode.
#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.
#limits_enabled=(state) ⇒ Object
Enable/disable min & max position limits.
#limits_enabled? ⇒ Boolean
Determine whether min & 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.
#power ⇒ Numeric
A power value of zero represents maximum power.
Get movement power in Watts.
#power=(value) ⇒ Object
A power value of zero represents maximum power.
Set movement power in Watts.
#rate ⇒ Numeric
Get maximum linear rate in meters per second.
#rate=(value) ⇒ Object
Set maximum linear rate in meters per second.
#reduction_ratio ⇒ Numeric
Reduction ratio is a feature that reduces linear rate of the joint when its
current position nears its desired position. Linear reduction ratio starts
acting upon the linear rate of the joint when the difference between the
current position and the desired position of the joint is less than
rate * reduction_ratio meters.
A reduction ratio of zero disables the reduction feature.
A typical reduction ratio value is 0.1.
Get linear reduction ratio.
#reduction_ratio=(value) ⇒ Object
Reduction ratio is a feature that reduces linear rate of the joint when its
current position nears its desired position. Linear reduction ratio starts
acting upon the linear rate of the joint when the difference between the
current position and the desired position of the joint is less than
rate * reduction_ratio meters.
A reduction ratio of zero disables the reduction feature.
A typical reduction ratio value is 0.1.
Get linear reduction ratio.