Class: MSPhysics::CurvyPiston
- Defined in:
- RubyExtension/MSPhysics/joint_curvy_piston.rb
Overview
Constant Summary
- DEFAULT_ANGULAR_FRICTION =
0.0- DEFAULT_RATE =
4.0- DEFAULT_POWER =
0.0- DEFAULT_ALIGNMENT_POWER =
0.0- DEFAULT_REDUCTION_RATIO =
0.1- DEFAULT_CONTROLLER =
nil- DEFAULT_CONTROLLER_MODE =
0- DEFAULT_LOOP_ENABLED =
false- DEFAULT_ALIGNMENT_ENABLED =
true- DEFAULT_ROTATION_ENABLED =
true
Constants inherited from Joint
Joint::DEFAULT_BODIES_COLLIDABLE, Joint::DEFAULT_BREAKING_FORCE, Joint::DEFAULT_SOLVER_MODEL, Joint::DEFAULT_STIFFNESS
Instance Method Summary collapse
-
#add_point(position) ⇒ Fixnum
Append point to the curve.
-
#alignment_enabled=(state) ⇒ Object
Enable/disable alignment to curve.
-
#alignment_enabled? ⇒ Boolean
Determine whether the connected body is supposed to align with the direction of curve.
-
#alignment_power ⇒ Numeric
Get alignment power.
-
#alignment_power=(value) ⇒ Object
Set alignment power.
-
#angular_friction ⇒ Numeric
Get rotational friction.
-
#angular_friction=(value) ⇒ Object
Set rotational friction.
-
#clear ⇒ Fixnum
Remove all points that make up the curve.
-
#controller ⇒ Numeric?
Get curvy piston controller.
-
#controller=(value) ⇒ Object
Set curvy piston controller.
-
#controller_mode ⇒ Fixnum
Get controller mode.
-
#controller_mode=(mode) ⇒ Object
Set controller mode.
-
#cur_acceleration ⇒ Numeric
Get current acceleration along the curve in meters per second per second.
-
#cur_normal_matrix ⇒ Geom::Transformation?
Get current normal matrix on the curve.
-
#cur_point ⇒ Geom::Point3d?
Get current point on the curve.
-
#cur_position ⇒ Numeric
Get current position along the curve in meters.
-
#cur_vector ⇒ Geom::Vector3d?
Get current vector on the curve.
-
#cur_velocity ⇒ Numeric
Get current velocity along the curve in meters per second.
-
#get_point_position(index) ⇒ Geom::Point3d?
Get point position by index.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ CurvyPiston
constructor
Create a CurvyPiston joint.
-
#length ⇒ Numeric
Get curve length in meters.
-
#loop_enabled=(state) ⇒ Object
Enable/disable curve looping.
-
#loop_enabled? ⇒ Boolean
Determine whether curve looping is enabled.
-
#normal_matrices ⇒ Array<Geom::Transformation>
Get all normal matrices of the curve.
-
#normal_matrix_at_point(point) ⇒ Array<(Geom::Transformation, Numeric)>?
Get normal matrix corresponding to a particular point on or beside the curve.
-
#normal_matrix_at_position(distance) ⇒ Geom::Transformation?
Get normal matrix corresponding to a particular distance on the curve.
-
#points ⇒ Array<Geom::Point3d>
Get all points the curve is associated of.
-
#points_size ⇒ Fixnum
Get the number of points that make up the curve.
-
#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.
-
#remove_point(index) ⇒ Boolean
Remove point from curve at index.
-
#rotation_enabled=(state) ⇒ Object
Enable/disable rotation along the current point on curve.
-
#rotation_enabled? ⇒ Boolean
Determine whether the rotation along the current point on curve is enabled.
-
#set_point_position(index, position) ⇒ Boolean
Set point position by index.
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) ⇒ CurvyPiston
Create a CurvyPiston joint.
Instance Method Details
#add_point(position) ⇒ Fixnum
Append point to the curve.
#alignment_enabled=(state) ⇒ Object
Enable/disable alignment to curve.
#alignment_enabled? ⇒ Boolean
Determine whether the connected body is supposed to align with the direction of curve.
#alignment_power ⇒ Numeric
Has an effect only if alignment is enabled.
Get alignment power.
#alignment_power=(value) ⇒ Object
Has an effect only if alignment is enabled.
Set alignment power.
#angular_friction ⇒ Numeric
Get rotational friction.
#angular_friction=(value) ⇒ Object
Set rotational friction.
#clear ⇒ Fixnum
Remove all points that make up the curve.
#controller ⇒ Numeric?
Get curvy piston controller.
#controller=(value) ⇒ Object
Set curvy piston controller.
#controller_mode ⇒ Fixnum
Get controller mode.
#controller_mode=(mode) ⇒ Object
Set controller mode.
#cur_acceleration ⇒ Numeric
Get current acceleration along the curve in meters per second per second.
#cur_normal_matrix ⇒ Geom::Transformation?
Get current normal matrix on the curve.
#cur_point ⇒ Geom::Point3d?
Get current point on the curve.
#cur_position ⇒ Numeric
Get current position along the curve in meters.
#cur_vector ⇒ Geom::Vector3d?
Get current vector on the curve.
#cur_velocity ⇒ Numeric
Get current velocity along the curve in meters per second.
#get_point_position(index) ⇒ Geom::Point3d?
Get point position by index.
#length ⇒ Numeric
Get curve length in meters.
#loop_enabled=(state) ⇒ Object
Enable/disable curve looping.
#loop_enabled? ⇒ Boolean
Determine whether curve looping is enabled.
#normal_matrices ⇒ Array<Geom::Transformation>
Get all normal matrices of the curve.
#normal_matrix_at_point(point) ⇒ Array<(Geom::Transformation, Numeric)>?
Get normal matrix corresponding to a particular point on or beside the curve.
#normal_matrix_at_position(distance) ⇒ Geom::Transformation?
Get normal matrix corresponding to a particular distance on the curve.
#points ⇒ Array<Geom::Point3d>
Get all points the curve is associated of.
#points_size ⇒ Fixnum
Get the number of points that make up the curve.
#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.
#remove_point(index) ⇒ Boolean
Remove point from curve at index.
#rotation_enabled=(state) ⇒ Object
Enable/disable rotation along the current point on curve.
#rotation_enabled? ⇒ Boolean
Determine whether the rotation along the current point on curve is enabled.
#set_point_position(index, position) ⇒ Boolean
Set point position by index.