예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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"));
        }