Пример #1
0
        public void Tick(float deltaTime)
        {
            foreach (var boneAnim in m_boneAnimations)
            {
                boneAnim.Tick(deltaTime);
            }

            foreach (var matAnim in m_materialAnimations)
            {
                matAnim.Tick(deltaTime);
            }

            foreach (var regAnim in m_registerAnimations)
            {
                regAnim.Tick(deltaTime);
            }

            if (m_currentBoneAnimation != null)
            {
                m_currentBoneAnimation.ApplyAnimationToPose(JNT1Tag.AnimatedJoints);
            }

            if (m_currentMaterialAnimation != null)
            {
                m_currentMaterialAnimation.ApplyAnimationToMaterials(MAT3Tag);
            }

            if (m_currentRegisterAnimation != null)
            {
                m_currentRegisterAnimation.ApplyAnimationToMaterials(MAT3Tag, m_tevColorOverrides);
            }
        }
Пример #2
0
        public void Tick(float deltaTime)
        {
            /*foreach (var boneAnim in m_boneAnimations)
             *  boneAnim.Tick(deltaTime);
             *
             * foreach (var matAnim in m_materialAnimations)
             *  matAnim.Tick(deltaTime);
             *
             * foreach (var regAnim in m_registerAnimations)
             *  regAnim.Tick(deltaTime);*/

            List <SkeletonJoint> active_list = null;

            if (m_currentBoneAnimation != null)
            {
                m_currentBoneAnimation.ApplyAnimationToPose(JNT1Tag.AnimatedJoints);
                m_skinningInvalid = true;

                active_list = JNT1Tag.AnimatedJoints;
            }
            else
            {
                active_list = JNT1Tag.BindJoints;
            }

            foreach (var jnt in active_list)
            {
                jnt.UpdateTransformMatrix();
                Sockets[jnt.Name] = jnt.TransformMatrix;
            }

            if (m_currentMaterialAnimation != null)
            {
                m_currentMaterialAnimation.ApplyAnimationToMaterials(MAT3Tag);
            }

            if (m_currentRegisterAnimation != null)
            {
                m_currentRegisterAnimation.ApplyAnimationToMaterials(MAT3Tag, m_tevColorOverrides);
            }
        }