updateCache method
void
updateCache()
inherited
Implementation
void updateCache() {
_updateCache.length = 0;
_updateCacheReset.length = 0;
final List<Bone> bones = this.bones;
final int n = bones.length;
for (int i = 0; i < n; i++) {
bones[i].sorted = false;
}
// IK first, lowest hierarchy depth first.
final List<IkConstraint> ikConstraints = this.ikConstraints;
final List<TransformConstraint> transformConstraints =
this.transformConstraints;
final List<PathConstraint> pathConstraints = this.pathConstraints;
final int ikCount = ikConstraints.length,
transformCount = transformConstraints.length,
pathCount = pathConstraints.length;
final int constraintCount = ikCount + transformCount + pathCount;
outer:
for (int i = 0; i < constraintCount; i++) {
for (int ii = 0; ii < ikCount; ii++) {
final IkConstraint constraint = ikConstraints[ii];
if (constraint.data.order == i) {
sortIkConstraint(constraint);
continue outer;
}
}
for (int ii = 0; ii < transformCount; ii++) {
final TransformConstraint constraint = transformConstraints[ii];
if (constraint.data.order == i) {
sortTransformConstraint(constraint);
continue outer;
}
}
for (int ii = 0; ii < pathCount; ii++) {
final PathConstraint constraint = pathConstraints[ii];
if (constraint.data.order == i) {
sortPathConstraint(constraint);
continue outer;
}
}
}
final int nn = bones.length;
for (int i = 0; i < nn; i++) {
sortBone(bones[i]);
}
}