org.jbox2d.p5
Class JointUtils
java.lang.Object
org.jbox2d.p5.JointUtils
public class JointUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JointUtils
public JointUtils()
createDistanceJoint
public static DistanceJoint createDistanceJoint(World w,
Vec2 pA,
Vec2 pB)
- Creates a distance joint between bodies that touch the given points,
anchored at those points. Returns null if there are not two different
bodies at the points given. Behavior is undetermined if more than one
body touches a point.
- Parameters:
w
- World to add joint to and read bodies frompA
- First point to attach topB
- Second point to attach to
- Returns:
- Joint created, or null if impossible to create the joint
createDistanceJoint
public static DistanceJoint createDistanceJoint(Body a,
Body b)
- Creates and returns a simple distance joint between two bodies, based on
their world body positions (NOT their centers of mass).
- Parameters:
a
- b
-
- Returns:
- a new DistanceJoint
createRevoluteJoint
public static RevoluteJoint createRevoluteJoint(Body a,
Body b,
Vec2 worldCenter)
- Creates a RevoluteJoint between two bodies that rotates around a given
point in World coordinates.
- Parameters:
a
- b
- worldCenter
-
- Returns: