Ejemplo n.º 1
0
        private static AnimationMesh CreateMesh(SerializableMesh meshContent)
        {
            AnimationMesh mesh = new AnimationMesh(meshContent.name);
            AnimationVertex[] vertices = new AnimationVertex[meshContent.vertices.Length];

            for (int i = 0; i < vertices.Length; i++)
            {
                SerializableVertex vertexContent = meshContent.vertices[i];
                vertices[i] = new AnimationVertex
                {
                    position = vertexContent.position,
                    normal = vertexContent.normal,
                    texture = vertexContent.texture,
                    blendweights = vertexContent.blendweights,
                    blendindices = vertexContent.blendindices
                };
            }

            mesh.SetIndices(meshContent.indices);
            mesh.SetVertices(vertices);
            mesh.SetTextureName(meshContent.textureName);

            return mesh;
        }
Ejemplo n.º 2
0
        //-----------------------------------------------------------------------

        public void AddMesh(AnimationMesh mesh)
        {
            meshList.Add(mesh);
            meshIndexByName.Add(mesh.GetName(), meshList.Count - 1);
        }
Ejemplo n.º 3
0
 //-----------------------------------------------------------------------
 public void AddMesh(AnimationMesh mesh)
 {
     meshList.Add(mesh);
     meshIndexByName.Add(mesh.GetName(), meshList.Count - 1);
 }