Class: MSPhysics::Joint
- Defined in:
- RubyExtension/MSPhysics/joint.rb
Overview
An abstract for all joints.
Direct Known Subclasses
BallAndSocket, Corkscrew, CurvyPiston, CurvySlider, Fixed, Hinge, Motor, Piston, Plane, PointToPoint, Servo, Slider, Spring, Universal, UpVector
Constant Summary
- DEFAULT_SOLVER_MODEL =
2- DEFAULT_STIFFNESS =
1.00- DEFAULT_BODIES_COLLIDABLE =
false- DEFAULT_BREAKING_FORCE =
0.0
Class Method Summary collapse
-
.all_joints ⇒ Array<Joint>
Get all joints.
-
.joint_by_address(address) ⇒ Joint?
Get joint by address.
-
.validate(joint, world = nil) ⇒ void
private
Verify that joint is valid.
Instance Method Summary collapse
-
#address ⇒ Fixnum
Get pointer the joint.
-
#bodies_collidable=(state) ⇒ Object
Set parent body collidable/noncollidable with its child body.
-
#bodies_collidable? ⇒ Boolean
Determine whether parent body is collidable with its child body.
-
#breaking_force ⇒ Numeric
Get joint breaking force in Newtons.
-
#breaking_force=(force) ⇒ Object
Set joint breaking force in Newtons.
-
#child ⇒ MSPhysics::Body?
Get joint child body.
-
#connect(child) ⇒ Boolean
Connect joint to its desired child body.
-
#connected? ⇒ Boolean
Determine whether joint is connected to its child body.
-
#destroy ⇒ void
Destroy joint.
-
#disconnect ⇒ Boolean
Disconnect joint from its child body.
-
#dof ⇒ Fixnum
Get joint maximum degrees of freedom.
-
#get_pin_matrix ⇒ Geom::Transformation
Get joint pin transformation in global space.
-
#get_pin_matrix2(mode) ⇒ Geom::Transformation?
Get joint pin transformation in global space.
-
#group ⇒ Sketchup::Group, ...
Get group/component associated with the joint.
-
#initialize(world, parent, pin_tra, group_inst = nil) ⇒ Joint
constructor
A new instance of Joint.
-
#name ⇒ String
Get joint name.
-
#name=(value) ⇒ Object
Set joint name.
-
#parent ⇒ MSPhysics::Body?
Get joint parent body.
-
#set_pin_matrix(matrix) ⇒ nil
Set joint pin transformation in global space.
-
#solver_model ⇒ Fixnum
Get solver model for calculating the constraint forces.
-
#solver_model=(model) ⇒ Object
Set solver model for calculating the constraint forces.
-
#stiffness ⇒ Numeric
Get joint stiffness.
-
#stiffness=(value) ⇒ Object
Set joint stiffness.
-
#type ⇒ Fixnum
Get joint type.
-
#valid? ⇒ Boolean
Determine whether joint is valid.
-
#world ⇒ MSPhysics::World
Get the world the joint is associated to.
Methods inherited from Entity
Constructor Details
#initialize(world, parent, pin_tra, group_inst = nil) ⇒ Joint
Returns a new instance of Joint
Class Method Details
.all_joints ⇒ Array<Joint>
Joints that do not have a MSPhysics::Joint instance are not included in the array.
Get all joints.
.joint_by_address(address) ⇒ Joint?
Get joint by address.
.validate(joint, world = nil) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Verify that joint is valid.
Instance Method Details
#address ⇒ Fixnum
Get pointer the joint.
#bodies_collidable=(state) ⇒ Object
Set parent body collidable/noncollidable with its child body.
#bodies_collidable? ⇒ Boolean
Determine whether parent body is collidable with its child body.
#breaking_force ⇒ Numeric
Get joint breaking force in Newtons.
#breaking_force=(force) ⇒ Object
Set joint breaking force in Newtons.
#child ⇒ MSPhysics::Body?
Get joint child body.
#connect(child) ⇒ Boolean
Connect joint to its desired child body.
#connected? ⇒ Boolean
Determine whether joint is connected to its child body.
#destroy ⇒ void
This method returns an undefined value.
Destroy joint.
#disconnect ⇒ Boolean
Disconnect joint from its child body.
#dof ⇒ Fixnum
Get joint maximum degrees of freedom.
#get_pin_matrix ⇒ Geom::Transformation
Get joint pin transformation in global space.
#get_pin_matrix2(mode) ⇒ Geom::Transformation?
Get joint pin transformation in global space.
#group ⇒ Sketchup::Group, ...
Get group/component associated with the joint.
#name ⇒ String
Get joint name.
#name=(value) ⇒ Object
Set joint name
#parent ⇒ MSPhysics::Body?
Get joint parent body.
#set_pin_matrix(matrix) ⇒ nil
Set joint pin transformation in global space.
#solver_model ⇒ Fixnum
Get solver model for calculating the constraint forces.
#solver_model=(model) ⇒ Object
Set solver model for calculating the constraint forces.
#stiffness ⇒ Numeric
Get joint stiffness.
#stiffness=(value) ⇒ Object
Set joint stiffness
#type ⇒ Fixnum
Get joint type.
#valid? ⇒ Boolean
Determine whether joint is valid.
#world ⇒ MSPhysics::World
Get the world the joint is associated to.