public StreamKeyHolder(int streamLength, EnStreamMode enMode) { var rotationLength = streamLength; var positionLength = (int)enMode * streamLength + (int)enMode ^ 1; streams = new StreamKeyCursorUnit[rotationLength + positionLength]; for (var irot = 0; irot < rotationLength; irot++) { streams[irot].init(irot, EnKeyMode.rot); } for (var ipos = 0; ipos < positionLength; ipos++) { streams[rotationLength + ipos].init(ipos, EnKeyMode.pos); } streamSpanLength = streamLength; }
void build(_Action3 action, Type type, Type EnTypeMotion, EnStreamMode enMode) { act = action; var tfBones = getTfBonesFromRenderSystem(); motions = clips.getMotions(type, EnTypeMotion, tfBones); streamStates = new StreamKeyHolder(motions.streamLength, enMode); postures = new PostureUnit[tfBones.Length + 1]; //mtPostures = new Matrix4x4[ tfBones.Length + 1 ]; if (!streamStates.isReady) { boneLinks.scanLinks(tfBones, notRemveTransforms); } }