Class: MSPhysics::UpVector

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

Overview

Since:

  • 1.0.0

Constant Summary

DEFAULT_ACCEL =

Since:

  • 1.0.0

40.0
DEFAULT_DAMP =

Since:

  • 1.0.0

10.0
DEFAULT_STRENGTH =

Since:

  • 1.0.0

0.98
DEFAULT_PIN_DIR =

Since:

  • 1.0.0

Z_AXIS

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) ⇒ UpVector

Create an UpVector 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

#accelNumeric

Note:

Higher acceleration makes rotation faster.

Get angular acceleration.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#accel=(value) ⇒ Object

Note:

Higher acceleration makes rotation faster.

Set angular acceleration.

Parameters:

  • value (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#dampNumeric

Note:

Higher damper makes rotation stronger.

Get angular damper.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#damp=(value) ⇒ Object

Note:

Higher damper makes rotation stronger.

Set angular damper.

Parameters:

  • value (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#get_pin_dirGeom::Vector3d

Get desired pin direction with respect to joint orientation.

Returns:

  • (Geom::Vector3d)

Since:

  • 1.0.0

#set_pin_dir(pin_dir) ⇒ nil

Set desired pin direction with respect to joint orientation.

Parameters:

  • pin_dir (Geom::Vector3d)

Returns:

  • (nil)

Since:

  • 1.0.0

#strengthNumeric

Get strength of the acceleration and damper.

Returns:

  • (Numeric)

    A value between 0.0 and 1.0.

Since:

  • 1.0.0

#strength=(value) ⇒ Object

Set strength of the acceleration and damper.

Parameters:

  • value (Numeric)

    A value between 0.0 and 1.0.

Since:

  • 1.0.0