class CP::Constraint::GrooveJoint
- CP::Constraint::GrooveJoint
- CP::Constraint
- Reference
- Object
Overview
Similar to a pivot joint, but one of the anchors is on a linear slide instead of being fixed.
Defined in:
chipmunk/constraint.crConstructors
-
.new(a : Body, b : Body, groove_a : Vect, groove_b : Vect, anchor_b : Vect)
The groove goes from groove_a to groove_b on body a, and the pivot is attached to anchor_b on body b.
Instance Method Summary
-
#anchor_b : Vect
The location of the second anchor relative to the second body.
- #anchor_b=(anchor_b : Vect)
-
#groove_a : Vect
The first endpoint of the groove relative to the first body.
- #groove_a=(groove_a : Vect)
-
#groove_b : Vect
The second endpoint of the groove relative to the second body.
- #groove_b=(groove_b : Vect)
Instance methods inherited from class CP::Constraint
bodies : Tuple(Body, Body)
bodies,
body_a : Body
body_a,
body_b : Body
body_b,
collide_bodies=(collide_bodies : Bool)
collide_bodies=,
collide_bodies? : Bool
collide_bodies?,
error_bias : Float64
error_bias,
error_bias=(error_bias : Number)
error_bias=,
impulse : Float64
impulse,
max_bias : Float64
max_bias,
max_bias=(max_bias : Number)
max_bias=,
max_force : Float64
max_force,
max_force=(max_force : Number)
max_force=,
post_solve(space : Space)
post_solve,
pre_solve(space : Space)
pre_solve,
space : Space | Nil
space
Constructor Detail
The groove goes from groove_a to groove_b on body a, and the pivot is attached to anchor_b on body b.
All coordinates are body local.