Esempio n. 1
0
 public MeshPart set(MeshPart other)
 {
     this.id            = other.id;
     this.mesh          = other.mesh;
     this.offset        = other.offset;
     this.size          = other.size;
     this.primitiveType = other.primitiveType;
     this.center        = other.center;
     this.halfExtents   = other.halfExtents;
     this.radius        = other.radius;
     return(this);
 }
Esempio n. 2
0
        protected NodePart set(NodePart other)
        {
            meshPart = new MeshPart(other.meshPart);
            material = other.material;
            enabled  = other.enabled;
            if (other.invBoneBindTransforms == null)
            {
                invBoneBindTransforms = null;
                bones = null;
            }
            else
            {
                if (invBoneBindTransforms == null)
                {
                    invBoneBindTransforms = new OrderedDictionary <Node, Matrix4>();
                }
                else
                {
                    invBoneBindTransforms.Clear();
                }

                foreach (var kp in other.invBoneBindTransforms)
                {
                    invBoneBindTransforms.Add(kp);
                }

                if (bones == null || bones.Length != invBoneBindTransforms.Count)
                {
                    bones = new Matrix4[invBoneBindTransforms.Count];
                }

                for (int i = 0; i < bones.Length; i++)
                {
                    if (bones[i] == default(Matrix4))
                    {
                        bones[i] = Matrix4.Identity;
                    }
                }
            }

            return(this);
        }
Esempio n. 3
0
 public NodePart(MeshPart meshPart, Material material)
 {
     this.meshPart = meshPart;
     this.material = material;
 }
Esempio n. 4
0
 public bool equals(MeshPart other)
 {
     return(other == this ||
            (other != null && other.mesh == mesh && other.primitiveType == primitiveType && other.offset == offset && other.size == size));
 }
Esempio n. 5
0
 public MeshPart(MeshPart copyFrom)
 {
     set(copyFrom);
 }