Class: MSPhysics::Motor
- Defined in:
- RubyExtension/MSPhysics/joint_motor.rb
Overview
Constant Summary
- DEFAULT_ACCEL =
1.0- DEFAULT_DAMP =
0.5- DEFAULT_FREE_ROTATE_ENABLED =
false- 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 rotational acceleration in radians per second per second.
-
#accel=(value) ⇒ Object
Set rotational acceleration in radians per second per second.
-
#controller ⇒ Numeric
Get motor controller, magnitude and direction of the desired acceleration.
-
#controller=(value) ⇒ Object
Set motor controller, magnitude and direction of the desired acceleration.
-
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
-
#cur_angle ⇒ Numeric
Get current angle in radians.
-
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
-
#damp ⇒ Numeric
Get rotational damper.
-
#damp=(value) ⇒ Object
Set rotational damper.
-
#free_rotate_enabled=(state) ⇒ Object
Enable/disable free rotate.
-
#free_rotate_enabled? ⇒ Boolean
Determine whether free rotate is enabled.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ Motor
constructor
Create a motor joint.
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) ⇒ Motor
Create a motor joint.
Instance Method Details
#accel ⇒ Numeric
The actual acceleration is accel * controller.
The maximum angular rate in radians per second is accel * controller
/ damp.
Get rotational acceleration in radians per second per second.
#accel=(value) ⇒ Object
The actual acceleration is accel * controller.
The maximum angular rate in radians per second is accel * controller
/ damp.
Set rotational acceleration in radians per second per second.
#controller ⇒ Numeric
The actual acceleration is accel * controller.
The maximum angular rate in radians per second is accel * controller
/ damp.
Get motor controller, magnitude and direction of the desired acceleration.
#controller=(value) ⇒ Object
The actual acceleration is accel * controller.
The maximum angular rate in radians per second is accel * controller
/ damp.
Set motor controller, magnitude and direction of the desired acceleration.
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
#cur_angle ⇒ Numeric
Get current angle in radians.
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
#damp ⇒ Numeric
Higher damper makes rotation stronger.
The maximum angular rate in radians per second is accel * controller
/ damp.
Get rotational damper.
#damp=(value) ⇒ Object
Higher damper makes rotation stronger.
The maximum angular rate in radians per second is accel * controller
/ damp.
Set rotational damper.
#free_rotate_enabled=(state) ⇒ Object
Enable/disable free rotate. Free rotate allows the motor to spin freely when accel is zero.
#free_rotate_enabled? ⇒ Boolean
Determine whether free rotate is enabled. Free rotate allows the motor to spin freely when accel is zero.