Class: MSPhysics::Plane

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

Overview

Since:

  • 1.0.0

Constant Summary

DEFAULT_LINEAR_FRICTION =

Since:

  • 1.0.0

0.0
DEFAULT_ANGULAR_FRICTION =

Since:

  • 1.0.0

0.0
DEFAULT_ROTATION_ENABLED =

Since:

  • 1.0.0

false

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

Create a plane 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 rotation friction.

Returns:

  • (Numeric)

    A value greater than or equal to zero.

Since:

  • 1.0.0

#angular_friction=(value) ⇒ Object

Set rotation friction.

Parameters:

  • value (Numeric)

    A value greater than or equal to zero.

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

#rotation_enabled=(state) ⇒ Object

Enable/disable the rotation along the connected body's center of mass and the plane's Z-axis.

Parameters:

  • state (Boolean)

Since:

  • 1.0.0

#rotation_enabled?Boolean

Determine whether the rotation along the connected body's center of mass and the plane's Z-axis is enabled.

Returns:

  • (Boolean)

Since:

  • 1.0.0