Class: MSPhysics::Hinge
- Defined in:
- RubyExtension/MSPhysics/joint_hinge.rb
Overview
Constant Summary
- DEFAULT_MIN =
-180.0.degrees
- DEFAULT_MAX =
180.0.degrees
- DEFAULT_LIMITS_ENABLED =
false- DEFAULT_MODE =
0- DEFAULT_FRICTION =
0.0- DEFAULT_ACCEL =
40.0- DEFAULT_DAMP =
0.1- DEFAULT_STRENGTH =
0.8- DEFAULT_SPRING_CONSTANT =
40.0- DEFAULT_SPRING_DRAG =
1.0- DEFAULT_START_ANGLE =
0.0.degrees
- 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
-
#accel ⇒ Numeric
Get spring oscillation acceleration factor.
-
#accel=(value) ⇒ Object
Set spring oscillation acceleration factor.
-
#controller ⇒ Numeric
Get hinge controller, the magnitude of the rotational friction or the magnitude and direction of the starting angle, depending on the mode.
-
#controller=(value) ⇒ Object
Set hinge controller, the magnitude of the rotational friction or the magnitude and direction of the starting angle, depending on the mode.
-
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
-
#cur_angle ⇒ Numeric
Get current angle in radians with respect to the starting angle.
-
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
-
#damp ⇒ Numeric
Get spring oscillation damping coefficient.
-
#damp=(value) ⇒ Object
Set spring oscillation damping coefficient.
-
#friction ⇒ Numeric
Get rotational friction.
-
#friction=(value) ⇒ Object
Set rotational friction.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ Hinge
constructor
Create a hinge joint.
-
#limits_enabled=(state) ⇒ Object
Enable/disable min & max angle limits.
-
#limits_enabled? ⇒ Boolean
Determine whether min & max angle limits are enabled.
-
#max ⇒ Numeric
Get maximum angle in radians with respect to the starting angle.
-
#max=(value) ⇒ Object
Set maximum angle in radians with respect to the starting angle.
-
#min ⇒ Numeric
Get minimum angle in radians with respect to the starting angle.
-
#min=(value) ⇒ Object
Set minimum angle in radians with respect to the starting angle.
-
#mode ⇒ Fixnum
Get mode.
-
#mode=(value) ⇒ Object
Set mode.
-
#spring_constant ⇒ Numeric
Get Hooke's spring constant.
-
#spring_constant=(value) ⇒ Object
Set Hooke's spring constant.
-
#spring_drag ⇒ Numeric
Get Hooke's spring drag.
-
#spring_drag=(value) ⇒ Object
Set Hooke's spring drag.
-
#start_angle ⇒ Numeric
Get starting angle in radians.
-
#start_angle=(angle) ⇒ Object
Set starting angle in radians.
-
#strength ⇒ Numeric
Get spring oscillation strength coefficient.
-
#strength=(value) ⇒ Object
Set spring oscillation strength coefficient.
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) ⇒ Hinge
Create a hinge joint.
Instance Method Details
#accel ⇒ Numeric
This option associates with the normal spring mode.
Get spring oscillation acceleration factor.
#accel=(value) ⇒ Object
This option associates with the normal spring mode.
Set spring oscillation acceleration factor.
#controller ⇒ Numeric
Get hinge controller, the magnitude of the rotational friction or the magnitude and direction of the starting angle, depending on the mode.
#controller=(value) ⇒ Object
Set hinge controller, the magnitude of the rotational friction or the magnitude and direction of the starting angle, depending on the mode.
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
#cur_angle ⇒ Numeric
Get current angle in radians with respect to the starting angle.
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
#damp ⇒ Numeric
This option associates with the normal spring mode.
Get spring oscillation damping coefficient.
#damp=(value) ⇒ Object
This option associates with the normal spring mode.
Set spring oscillation damping coefficient.
#friction ⇒ Numeric
This option associates with friction mode.
The actual friction is friction * controller.
Get rotational friction.
#friction=(value) ⇒ Object
This option associates with friction mode.
The actual friction is friction * controller.
Set rotational friction.
#limits_enabled=(state) ⇒ Object
Enable/disable min & max angle limits.
#limits_enabled? ⇒ Boolean
Determine whether min & max angle limits are enabled.
#max ⇒ Numeric
Get maximum angle in radians with respect to the starting angle.
#max=(value) ⇒ Object
Set maximum angle in radians with respect to the starting angle.
#min ⇒ Numeric
Get minimum angle in radians with respect to the starting angle.
#min=(value) ⇒ Object
Set minimum angle in radians with respect to the starting angle.
#mode ⇒ Fixnum
Get mode.
#mode=(value) ⇒ Object
Set mode.
#spring_constant ⇒ Numeric
This option associates with the Hooke's spring mode.
Get Hooke's spring constant.
#spring_constant=(value) ⇒ Object
This option associates with the Hooke's spring mode.
Set Hooke's spring constant.
#spring_drag ⇒ Numeric
This option associates with the Hooke's spring mode.
Get Hooke's spring drag.
#spring_drag=(value) ⇒ Object
This option associates with the Hooke's spring mode.
Set Hooke's spring drag.
#start_angle ⇒ Numeric
This associates with the spring modes only.
The actual starting angle is, start_angle * controller.
Get starting angle in radians.
#start_angle=(angle) ⇒ Object
This associates with the spring modes only.
The actual starting angle is, start_angle * controller.
Set starting angle in radians.
#strength ⇒ Numeric
This option associates with the normal spring mode.
Get spring oscillation strength coefficient.
#strength=(value) ⇒ Object
This option associates with the normal spring mode.
Set spring oscillation strength coefficient.