Class: MSPhysics::CurvySlider
- Defined in:
- RubyExtension/MSPhysics/joint_curvy_slider.rb
Overview
Constant Summary
- DEFAULT_LINEAR_FRICTION =
0.0- DEFAULT_ANGULAR_FRICTION =
0.0- DEFAULT_ALIGNMENT_POWER =
0.0- DEFAULT_CONTROLLER =
1.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 magnitude of the linear and angular friction.
-
#controller=(value) ⇒ Object
Set magnitude of the linear and angular friction.
-
#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) ⇒ CurvySlider
constructor
Create a CurvySlider joint.
-
#length ⇒ Numeric
Get curve length in meters.
-
#linear_friction ⇒ Numeric
Get movement friction.
-
#linear_friction=(value) ⇒ Object
Set movement friction.
-
#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.
-
#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) ⇒ CurvySlider
Create a CurvySlider 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 magnitude of the linear and angular friction.
#controller=(value) ⇒ Object
Set magnitude of the linear and angular friction.
#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.
#linear_friction ⇒ Numeric
Get movement friction.
#linear_friction=(value) ⇒ Object
Set movement friction.
#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.
#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.