Beispiel #1
0
        public NewHavokAnimation(NewAnimSkeleton skeleton, HKX.HKADefaultAnimatedReferenceFrame refFrame, HKX.HKAAnimationBinding binding)
        {
            Skeleton = skeleton;
            if (refFrame != null)
            {
                RootMotionFrames = new Vector4[refFrame.ReferenceFrameSamples.Size];
                for (int i = 0; i < refFrame.ReferenceFrameSamples.Size; i++)
                {
                    RootMotionFrames[i] = new Vector4(
                        refFrame.ReferenceFrameSamples[i].Vector.X,
                        refFrame.ReferenceFrameSamples[i].Vector.Y,
                        refFrame.ReferenceFrameSamples[i].Vector.Z,
                        refFrame.ReferenceFrameSamples[i].Vector.W);
                }
            }

            lock (_lock_boneMatrixStuff)
            {
                blendableTransforms = new List <NewBlendableTransform>();
                for (int i = 0; i < skeleton.HkxSkeleton.Count; i++)
                {
                    blendableTransforms.Add(NewBlendableTransform.Identity);
                }
            }

            BlendHint = binding.BlendHint;
        }
        public HavokAnimationData(string Name, HKX.HKASkeleton skeleton, HKX.HKADefaultAnimatedReferenceFrame refFrame, HKX.HKAAnimationBinding binding)
        {
            this.Name = Name;

            hkaSkeleton = skeleton;

            if (refFrame != null)
            {
                RootMotion = new RootMotionData(refFrame);
            }

            BlendHint = binding?.BlendHint ?? HKX.AnimationBlendHint.NORMAL;
        }