예제 #1
0
 internal static float AddAndInterpolateObjectMatrix(MyInterpolationQueue <VRageMath.MatrixD> queue, ref VRageMath.MatrixD matrix)
 {
     if (Settings.EnableObjectInterpolation)
     {
         queue.AddSample(ref matrix, MyRender.CurrentUpdateTime);
         return(queue.Interpolate(MyRender.InterpolationTime, out matrix));
     }
     return(0.0f);
 }
        public void SetSkeleton(MySkeletonBoneDescription[] hierarchy, int[] skeletonIndices)
        {
            m_skeletonHierarchy = hierarchy;
            m_skeletonIndices = skeletonIndices;

            m_boneInterpolators = new MyInterpolationQueue<Matrix>[m_skeletonHierarchy.Length];
            m_interpolatedTransforms = new Matrix[m_skeletonHierarchy.Length];
            m_skinTransforms = new Matrix[m_skeletonHierarchy.Length];
            m_absoluteTransforms = new Matrix[m_skeletonHierarchy.Length];

            for (int i = 0; i < m_skeletonHierarchy.Length; i++)
            {
                m_boneInterpolators[i] = new MyInterpolationQueue<Matrix>(5, Matrix.SlerpScale);    
            }
        }
예제 #3
0
        public void SetSkeleton(MySkeletonBoneDescription[] hierarchy, int[] skeletonIndices)
        {
            m_skeletonHierarchy = hierarchy;
            m_skeletonIndices   = skeletonIndices;

            m_boneInterpolators      = new MyInterpolationQueue <Matrix> [m_skeletonHierarchy.Length];
            m_interpolatedTransforms = new Matrix[m_skeletonHierarchy.Length];
            m_skinTransforms         = new Matrix[m_skeletonHierarchy.Length];
            m_absoluteTransforms     = new Matrix[m_skeletonHierarchy.Length];

            for (int i = 0; i < m_skeletonHierarchy.Length; i++)
            {
                m_boneInterpolators[i] = new MyInterpolationQueue <Matrix>(5, Matrix.SlerpScale);
            }
        }
예제 #4
0
 internal static float AddAndInterpolateObjectMatrix(MyInterpolationQueue<VRageMath.MatrixD> queue, ref VRageMath.MatrixD matrix)
 {
     if (Settings.EnableObjectInterpolation)
     {
         queue.AddSample(ref matrix, MyRender.CurrentUpdateTime);
         return queue.Interpolate(MyRender.InterpolationTime, out matrix);
     }
     return 0.0f;
 }