private static void AppendGeometryDataTexCoord(Mesh mesh, string geoName, ulong channel, float[] texcoords) { ulong indMeshSource = (ulong)DAEGeometry.ExpandSources(mesh); mesh.source[indMeshSource] = Source.CreateUVs(geoName, channel, texcoords); //ulong indPolylistInput = (ulong)COLLADAGeometry.ExpandPolylist(polylist); //polylist.input[indPolylistInput] = new InputLocalOffset(indPolylistInput, "TEXCOORD", "#" + geoName + "-UV" + channel); }
private static void AppendGeometryDataVertexColor(Mesh mesh, string geoName, ulong channel, float[] vertexColors) { ulong indMeshSource = (ulong)DAEGeometry.ExpandSources(mesh); mesh.source[indMeshSource] = Source.CreateVertexColors(geoName, channel, vertexColors); //ulong indPolylistInput = (ulong)COLLADAGeometry.ExpandPolylist(polylist); //polylist.input[indPolylistInput] = new InputLocalOffset(indPolylistInput, "COLOR", "#" + geoName + "-VERTEX_COLOR" + channel, channel); }
private static void AppendGeometryDataNormal(Mesh mesh, string geoName, ulong channel, float[] normals) { ulong indMeshSource = (ulong)DAEGeometry.ExpandSources(mesh); mesh.source[indMeshSource] = Source.CreateNormals(geoName, channel, normals); //ulong indPolylistInput = (ulong)COLLADAGeometry.ExpandPolylist(polylist); //polylist.input[indPolylistInput] = new InputLocalOffset(indPolylistInput, "NORMAL", "#" + geoName + "-Normal" + channel); }
private static void AppendGeometryDataVertex(Mesh mesh, string geoName, float[] positions) { ulong indMeshSource = (ulong)DAEGeometry.ExpandSources(mesh); mesh.source[indMeshSource] = Source.CreatePositions(geoName, positions); //ulong indPolylistInput = (ulong)COLLADAGeometry.ExpandPolylist(polylist); //polylist.input[indPolylistInput] = new InputLocalOffset(indPolylistInput, "VERTEX", string.Concat("#", geoName, "-VERTEX")); mesh.vertices = new Vertices(string.Concat(geoName, "-VERTEX"), new Input("POSITION", "#" + geoName + "-POSITION")); }