Ejemplo n.º 1
0
        public IJoint DeepCopy()
        {
            AssimpBoneWrapper copy = new AssimpBoneWrapper(Id, Name);

            copy.BaseTransform      = new Matrix4x4(BaseTransform);
            copy.AnimationTransform = new Matrix4x4(AnimationTransform);

            foreach (IJoint child in Children)
            {
                copy.AddChild(child.DeepCopy());
            }

            for (int i = 0; i < 3; i++)
            {
                copy.Constraints[i] = new Vector2D(Constraints[i]);
            }

            return(copy);
        }
Ejemplo n.º 2
0
        private void CreateSkeleton(ref Skeleton skeleton, AssimpNode node, string parent, ref int id)
        {
            IJoint joint = new AssimpBoneWrapper(node);

            joint.Id = id;
            id++;
            if (skeleton.Root == null)
            {
                skeleton.InsertJoint("", joint);
            }
            else
            {
                skeleton.InsertJoint(parent, joint);
            }

            foreach (AssimpNode child in node.Children)
            {
                CreateSkeleton(ref skeleton, child, node.Name, ref id);
            }
        }
Ejemplo n.º 3
0
        public IJoint DeepCopy()
        {
            AssimpBoneWrapper copy = new AssimpBoneWrapper(Id, Name);
            copy.BaseTransform = new Matrix4x4(BaseTransform);
            copy.AnimationTransform = new Matrix4x4(AnimationTransform);

            foreach (IJoint child in Children)
                copy.AddChild(child.DeepCopy());

            for (int i = 0; i < 3; i++)
                copy.Constraints[i] = new Vector2D(Constraints[i]);

            return copy;
        }