Class: BaseJoint

ODE.Joint.Prototypes. BaseJoint

base prototype for a Joint

abstractnew ODE.Joint.Prototypes.BaseJoint(pointer)

D:/work/ODE.js/lib/ode.js, line 569
Name Type Description
pointer Number

heap memory pointer to cast into ODE.Joint.Prototypes.BaseJoint

Members

readonlytypeODE.Joint.Types

get the type of this joint

Methods

attach(b1, b2){ODE.Joint}

D:/work/ODE.js/lib/ode.js, line 662

Attach the joint to some new bodies. If the joint is already attached, it will be detached from the old bodies first. To attach this joint to only one body, set body1 or body2 to zero - a zero body refers to the static environment. Setting both bodies to zero puts the joint into "limbo", i.e. it will have no effect on the simulation. Some joints, like hinge-2 need to be attached to two bodies to work.

Name Type Description
b1 ODE.Body

the first body

b2 ODE.Body

the second body

Returns:
Type Description
ODE.Joint

destroy()

D:/work/ODE.js/lib/ode.js, line 645

clear memory space in LLVM heap

getBody(idx){ODE.Body|null}

D:/work/ODE.js/lib/ode.js, line 672

Return the bodies that this joint connects. If idx is 0 the first body will be returned, corresponding to the first body argument of ODE.Joint.Prototypes.BaseJoint#attach. If idx is 1 the second body will be returned, corresponding to the second body argument of ODE.Joint.Prototypes.BaseJoint#attach.. If one of these returned body IDs is zero, the joint connects the other body to the static environment. If both body IDs are zero, the joint is in ``limbo'' and has no effect on the simulation.

Name Type Description
idx Number
Returns:
Type Description
ODE.Body | null

getPointer(){Number}

D:/work/ODE.js/lib/ode.js, line 638

get offset address in heap memory

Returns:
Type Description
Number