class CP::Constraint::RatchetJoint

Overview

Works like a socket wrench.

Defined in:

chipmunk/constraint.cr

Constructors

Instance Method Summary

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

def self.new(a : Body, b : Body, phase : Number, ratchet : Number) #

ratchet is the distance between "clicks", phase is the initial offset to use when deciding where the ratchet angles are.


[View source]

Instance Method Detail

def angle : Float64 #

The angle of the current ratchet tooth.


[View source]
def angle=(angle : Number) #

[View source]
def phase : Float64 #

The phase offset of the ratchet.


[View source]
def phase=(phase : Number) #

[View source]
def ratchet : Float64 #

The angular distance of each ratchet.


[View source]
def ratchet=(ratchet : Number) #

[View source]