Ejemplo n.º 1
0
        private SimpleMesh ToMesh()
        {
            int vcount            = GetVertexCount();
            MdalVertexIterator vi = Mdal.MDAL_M_vertexIterator(this);
            VectorArray3d      v  = vi.GetVertexes(vcount);
            bool          hasColors;
            VectorArray3f c    = GetColors(vcount, out hasColors);
            SimpleMesh    mesh = new SimpleMesh();

            mesh.AppendVertices(v, null, c);
            int fcount           = GetFaceCount();
            MdalFaceIterator fi  = Mdal.MDAL_M_faceIterator(this);
            IndexArray3i     tri = fi.GetTris(fcount, Mdal.MDAL_M_faceVerticesMaximumCount(this));

            mesh.AppendTriangles(tri);
            return(mesh);
        }
Ejemplo n.º 2
0
 public static extern void MDAL_FI_close(MdalFaceIterator pointer);
Ejemplo n.º 3
0
 public static extern int MDAL_FI_next(MdalFaceIterator iterator,
                                       int faceOffsetsBufferLen, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]  int[] faceOffsetsBuffer,
                                       int vertexIndicesBufferLen,
                                       [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] int[] vertexIndicesBuffer);