AngleJoint
AngleJoint constraining the relative angles of two Bodies.
The equation for this constraint is:
jointMin <= ratio * body2.rotation - body1.rotation <= jointMax
Instance Members
@private
First Body in constraint.
This value may be null, but trying to simulate the constraint whilst
this body is null will result in an error.
Second Body in constraint.
This value may be null, but trying to simulate the constraint whilst
this body is null will result in an error.
Lower bound for constraint.
This value must be less than or equal to jointMax.
@default -infinity
Upper bound for constraint.
This value must be greater than or equal to jointMin.
@default infinity
Ratio property of constraint.
@default 1
Determine if constraint is slack.
This constraint is slack if the positional error is within
the bounds of (jointMin, jointMax).
Returns | Description |
---|---|
Bool | True if positional error of constraint is between the limits indicating that the constraint is not doing any work. |
@inheritDoc
For this constraint, the MatMN will be 1x1.
Returns |
---|
nape.geom.MatMN |
@inheritDoc
For this constraint, only the z coordinate will be non-zero.
Name | Type |
---|---|
body |
nape.phys.Body |
Returns |
---|
nape.geom.Vec3 |
@inheritDoc
Name | Type |
---|---|
lambda |
Function |
new(body1: Null<nape.phys.Body>, body2: Null<nape.phys.Body>, jointMin: Float, jointMax: Float, ?ratio: Float = 1.0): Void
Construct a new AngleJoint.
Name | Type | Default | Description |
---|---|---|---|
body1 |
Null<nape.phys.Body> | The first body in AngleJoint. | |
body2 |
Null<nape.phys.Body> | The second body in AngleJoint. | |
jointMin |
Float | The lower bound for constraint. | |
jointMax |
Float | The upper bound for constraint. | |
ratio |
Float | 1.0 |
The ratio of joint (default 1) |
Private Members
Metadata
Name | Parameters |
---|---|
:final |
- |