nape.constraint
.. | |
---|---|
AngleJoint | AngleJoint constraining the relative angles of two Bodies.
jointMin <= ratio * body2.rotation - body1.rotation <= jointMax |
Constraint | Base type for all Nape joints and constraints |
ConstraintIterator | Haxe Iterator |
ConstraintList | Nape list of Constraint type objects
list.foreach(function (obj) { });This method is inlined so that in haxe no closure will need to be created. In AS3, a closure would need to be created in general, so for performance reasons you 'may' choose to use iteration as follows: for (var i:int = 0; i < list.length; i++) { |
DistanceJoint | DistanceJoint limiting the distance between two local anchor points of Bodies.
jointMin <= distance(body2.localPointToWorld(anchor2), body1.localPointToWorld(anchor1)) <= jointMaxThis joint is not designed to work when jointMin = jointMax = 0 and constraint is
stiff. In this instance you should use a PivotJoint instead. |
LineJoint | LineJoint constraining anchor of one body, to a line segment of the other.
|
MotorJoint | MotorJoint constraining the angular velocities of two bodies
(ratio * body2.angularVel) - body1.angularVel = rateThis constraint operates only on the velocities of objects. |
PivotJoint | PivotJoint constraining two anchors points of bodies to be equal.
body2.localPointToWorld(anchor2) = body1.localPointToWorld(anchor1)You may view this constraint as being equal to the DistanceJoint constraint when both its jointMin and jointMax are exactly 0 (In such a case a DistanceJoint becomes degenerate). Compared to the DistanceJoint this is a 2 dimensional constraint. |
PulleyJoint | PulleyJoint limiting the weighted sum of distances between 2 pairs of 4 local anchor points of Bodies.
jointMin <= distance(body2.localPointToWorld(anchor2), body1.localPointToWorld(anchor1)) + ratio * distance(body4.localPointToWorld(anchor4), body3.localPointToWorld(anchor3)) <= jointMaxThis joint is not designed to work when either of these pairs achieves a distance of 0, it will still work but may not be entirely ideal. !1* * This constraint can be used in a full 4-body set up, or a 3-body set up or a 2-body set up permitting any arrangement as long as body1 != body2 and body3 != body4 |
UserConstraint | UserConstraint providing a low-level API for user-defined Constraints.
|
WeldJoint | WeldJoint constraining two bodies to be exactly locked together.
[ body2.localPointToWorld(anchor2) ] = [ body1.localPointToWorld(anchor1) ] [ body2.rotation ] [ body1.rotation + phase ]This constraint is equivalent to using a PivotJoint and AngleJoint together except that it is solved as a single constraint and thus will be more stable. This constraint is 3 dimensional. Although this constraint is very stable, if you chain bodies together using this constraint, you should except to see a small amount of rotation about the anchor points so you should chose them accordingly. |