Constraint class
Methods
-
destroy()
→ void
-
Destroy a constraint.
-
getBodyA()
→ Body
-
Get the first body the constraint is attached to.
-
getBodyB()
→ Body
-
Get the second body the constraint is attached to.
-
getCollideBodies()
→ bool
-
Get if the two bodies connected by the constraint are allowed to collide or not.
-
getData<T>()
→ T?
-
Get the user data assigned to the constraint.
-
getErrorBias()
→ double
-
Get rate at which joint error is corrected.
-
getImpulse()
→ double
-
Get the last impulse applied by this constraint.
-
getMaxBias()
→ double
-
Get the maximum rate at which joint error is corrected.
-
getMaxForce()
→ double
-
Get the maximum force that this constraint is allowed to use.
-
getSpace()
→ Space
-
Get the cpSpace this constraint is added to.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
removeData()
→ void
-
Remove the user data assigned to the constraint.
-
setCollideBodies(bool collideBodies)
→ void
-
Set if the two bodies connected by the constraint are allowed to collide or not. (defaults to cpFalse)
-
setCollideBody(bool collideBodies)
→ void
-
Set if the two bodies connected by the constraint are allowed to collide or not. (defaults to cpFalse)
-
setData<T>(T data)
→ void
-
Set the user data assigned to the constraint.
-
setErrorBias(double errorBias)
→ void
-
Set rate at which joint error is corrected.
Defaults to pow(1.0 - 0.1, 60.0) meaning that it will
correct 10% of the error every 1/60th of a second.
-
setMaxBias(double maxBias)
→ void
-
Set the maximum rate at which joint error is corrected. (defaults to INFINITY)
-
setMaxForce(double force)
→ void
-
Set the maximum force that this constraint is allowed to use. (defaults to INFINITY)
-
setPostSolveFunc(void postSolveFunc(Constraint constraint, Space space))
→ void
-
Set the post-solve function that is called before the solver runs.
-
setPreSolveFunc(void preSolveFunc(Constraint constraint, Space space))
→ void
-
Set the pre-solve function that is called before the solver runs.
-
toString()
→ String
-
A string representation of this object.
inherited