Class JConstraintPoint
Extends
JConstraint.
JConstraintPoint a constraint that links a point on one body to a point on another body
Defined in: jconstraintpoint.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
JConstraintPoint(body0, body0Pos, body1, body1Pos, allowedDistance, timescale)
|
| Field Attributes | Field Name and Description |
|---|---|
|
for internal use
|
|
|
for internal use
|
- Fields borrowed from class :
- JConstraint#_constraintEnabled, JConstraint#_satisfied, JConstraintPoint#_allowedDistance, JConstraintPoint#_body0, JConstraintPoint#_body0Pos, JConstraintPoint#_body1, JConstraintPoint#_body1Pos, JConstraintPoint#_maxVelMag, JConstraintPoint#_minVelForProcessing, JConstraintPoint#_vrExtra, JConstraintPoint#_worldPos
| Method Attributes | Method Name and Description |
|---|---|
|
apply(dt)
|
|
|
preApply(dt)
|
- Methods borrowed from class JConstraint:
- disableConstraint, enableConstraint, get_constraintEnabled, get_satisfied, set_satisfied
Class Detail
JConstraintPoint(body0, body0Pos, body1, body1Pos, allowedDistance, timescale)
Author: Muzer(muzerly@gmail.com).
- Parameters:
- {RigidBody} body0
- the first body of the constrained pair
- {array} body0Pos
- the position of the first body expressed as a 3D vector
- {RigidBody} body1
- the second body of the constrained pair
- {array} body1Pos
- the position of the second body expressed as a 3D vector
- {number} allowedDistance
- how much the points are allowed to deviate
- timescale
- the timescale over which deviation is eliminated (suggest a few times dt - be careful if there's a variable timestep!). If timescale < 0 then the value indicates the number of dts
- Requires:
- Vector3DUtil
- JMatrix3D
- JNumber3D
Field Detail
{array}
r0
for internal use
{array}
r1
for internal use
Method Detail
{boolean}
apply(dt)
- Parameters:
- {number} dt
- a UNIX timestamp
{void}
preApply(dt)
- Parameters:
- {number} dt
- a UNIX timestamp