Class FBXConstraintSolver
Accessors
constraints
-
Registered behaviors in solve order (a target's constraint before the constraints that read it).
Returns readonly FBXConstraintBehavior[]
cyclic Constraints
-
Behaviors that take part in a dependency cycle (A targets B while B targets A). They are solved after all acyclic constraints, in registration order, so each sees the other's result from the previous solve.
Returns readonly FBXConstraintBehavior[]
Methods
begin Frame
-
Start of a frame, before animations run: every constrained node gets its unconstrained transform back, so that animation either overwrites it or leaves it untouched.
Returns void
invalidate Order
-
Marks the solve order stale, e.g. after re-parenting a constrained node.
Returns void
register
-
Adds a behavior to the solve set.
Parameters
- behavior: FBXConstraintBehavior
Behavior to add
Returns void
- behavior: FBXConstraintBehavior
solve
-
End of the animation phase: takes every constrained node's current transform as its unconstrained value, then solves every registered constraint once, in dependency order.
Returns void
unregister
-
Removes a behavior from the solve set; the solver disposes itself with the last one.
Parameters
- behavior: FBXConstraintBehavior
Behavior to remove
Returns void
- behavior: FBXConstraintBehavior
StaticGet
-
Solver of a scene, if any constraint behavior is attached in it.
Parameters
- scene: Scene
Scene to look up
Returns FBXConstraintSolver | undefined
The solver, or undefined
- scene: Scene
StaticGet Or Create
-
Solver of a scene, created when missing.
Parameters
- scene: Scene
Scene to look up
Returns FBXConstraintSolver
The solver
- scene: Scene
Solves every FBX constraint of a scene once per frame, in dependency order, from the scene's animation phase observers (
beginFramebefore animations,solveafter them). Created on demand by the firstFBXConstraintBehaviorattached in the scene and removed with the last one.