Class: MSPhysics::Corkscrew

Inherits:
Joint show all
Defined in:
RubyExtension/MSPhysics/joint_corkscrew.rb

Overview

Since:

  • 1.0.0

Constant Summary

DEFAULT_MIN_POSITION =

Since:

  • 1.0.0

-10.0
DEFAULT_MAX_POSITION =

Since:

  • 1.0.0

10.0
DEFAULT_MIN_ANGLE =

Since:

  • 1.0.0

-180.0.degrees
DEFAULT_MAX_ANGLE =

Since:

  • 1.0.0

180.0.degrees
DEFAULT_LINEAR_LIMITS_ENABLED =

Since:

  • 1.0.0

false
DEFAULT_ANGULAR_LIMITS_ENABLED =

Since:

  • 1.0.0

false
DEFAULT_LINEAR_FRICTION =

Since:

  • 1.0.0

0.0
DEFAULT_ANGULAR_FRICTION =

Since:

  • 1.0.0

0.0

Constants inherited from Joint

Joint::DEFAULT_BODIES_COLLIDABLE, Joint::DEFAULT_BREAKING_FORCE, Joint::DEFAULT_SOLVER_MODEL, Joint::DEFAULT_STIFFNESS

Instance Method Summary collapse

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

#inspect, #to_s

Constructor Details

#initialize(world, parent, pin_tra, group = nil) ⇒ Corkscrew

Create a corkscrew joint.

Parameters:

  • world (MSPhysics::World)
  • parent (MSPhysics::Body, nil)
  • pin_tra (Geom::Transformation, Array<Numeric>)

    Pin transformation in global space. Matrix origin is interpreted as the pin position. Matrix Z-axis is interpreted as the pin direction.

  • group (Sketchup::Group, Sketchup::ComponentInstance, nil) (defaults to: nil)

Since:

  • 1.0.0

Instance Method Details

#angular_frictionNumeric

Get rotational friction.

Returns:

  • (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#angular_friction=(value) ⇒ Object

Set rotational friction.

Parameters:

  • value (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#angular_limits_enabled=(state) ⇒ Object

Enable/disable min & max angle limits.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

#angular_limits_enabled?Boolean

Determine whether min & max angle limits are enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

#cur_accelerationNumeric

Get current linear acceleration in meters per second per second.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#cur_alphaNumeric

Get current angular acceleration in radians per second per second.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#cur_angleNumeric

Get current angle in radians.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#cur_omegaNumeric

Get current omega in radians per second.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#cur_positionNumeric

Get current position in meters.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#cur_velocityNumeric

Get current velocity in meters per second.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#linear_frictionNumeric

Get movement friction.

Returns:

  • (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#linear_friction=(value) ⇒ Object

Set movement friction.

Parameters:

  • value (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#linear_limits_enabled=(state) ⇒ Object

Enable/disable min and max position limits.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

#linear_limits_enabled?Boolean

Determine whether min and max position limits are enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0

#max_angleNumeric

Get maximum angle in radians.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#max_angle=(value) ⇒ Object

Set maximum angle in radians.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0

#max_positionNumeric

Get maximum position in meters.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#max_position=(value) ⇒ Object

Set maximum position in meters.

Since:

  • 1.0.0

#min_angleNumeric

Get minimum angle in radians.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#min_angle=(value) ⇒ Object

Set minimum angle in radians.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0

#min_positionNumeric

Get minimum position in meters.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#min_position=(value) ⇒ Object

Set minimum position in meters.

Parameters:

  • value (Numeric)

Since:

  • 1.0.0