コード例 #1
0
        public static void Dump(this TriangularMeshChunk chunk, ThreeDSModel4ModernOpengl model)
        {
            ThreeDSMesh4ModernOpenGL mesh = new ThreeDSMesh4ModernOpenGL();

            foreach (var item in chunk.Children)
            {
                if (item is VerticesListChunk)
                {
                    (item as VerticesListChunk).Dump(model, mesh);
                }
                else if (item is FacesDescriptionChunk)
                {
                    (item as FacesDescriptionChunk).Dump(model, mesh);
                }
                else if (item is MappingCoordinatesListChunk)
                {
                    (item as MappingCoordinatesListChunk).Dump(model, mesh);
                }
                else if (item is LocalCoordinatesSystemChunk)
                {
                    (item as LocalCoordinatesSystemChunk).Dump(model, mesh);
                }
                else if (!(item is UndefinedChunk))
                {
                    throw new NotImplementedException(string.Format(
                                                          "not dumper implemented for {0}", item.GetType()));
                }
            }

            model.Entities.Add(mesh);
        }
コード例 #2
0
        public static void Dump(this TriangularMeshChunk chunk, ThreeDSModel4ModernOpengl model)
        {
            ThreeDSMesh4ModernOpenGL mesh = new ThreeDSMesh4ModernOpenGL();

            foreach (var item in chunk.Children)
            {
                if (item is VerticesListChunk)
                {
                    (item as VerticesListChunk).Dump(model, mesh);
                }
                else if (item is FacesDescriptionChunk)
                {
                    (item as FacesDescriptionChunk).Dump(model, mesh);
                }
                else if (item is MappingCoordinatesListChunk)
                {
                    (item as MappingCoordinatesListChunk).Dump(model, mesh);
                }
                else if (item is LocalCoordinatesSystemChunk)
                {
                    (item as LocalCoordinatesSystemChunk).Dump(model, mesh);
                }
                else if (!(item is UndefinedChunk))
                {
                    throw new NotImplementedException(string.Format(
                        "not dumper implemented for {0}", item.GetType()));
                }
            }

            model.Entities.Add(mesh);
        }
コード例 #3
0
        public static void Dump(this FacesDescriptionChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
        {
            mesh.TriangleIndexes = chunk.triangleIndexes;

            foreach (var item in chunk.Children)
            {
                if (item is FacesMaterialChunk)
                {
                    (item as FacesMaterialChunk).Dump(model, mesh);
                }
                else if (item is SmoothingGroupListChunk)
                {
                    (item as SmoothingGroupListChunk).Dump(model, mesh);
                }
                else if (!(item is UndefinedChunk))
                {
                    throw new NotImplementedException(string.Format(
                        "not dumper implemented for {0}", item.GetType()));
                }
            }
        }
コード例 #4
0
 public static void Dump(this SmoothingGroupListChunk chunk, ThreeDSModel4ModernOpengl model,ThreeDSMesh4ModernOpenGL mesh)
 {
     // nothing to do.
 }
コード例 #5
0
        public static void Dump(this FacesDescriptionChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
        {
            mesh.TriangleIndexes = chunk.triangleIndexes;

            foreach (var item in chunk.Children)
            {
                if (item is FacesMaterialChunk)
                {
                    (item as FacesMaterialChunk).Dump(model, mesh);
                }
                else if (item is SmoothingGroupListChunk)
                {
                    (item as SmoothingGroupListChunk).Dump(model, mesh);
                }
                else if (!(item is UndefinedChunk))
                {
                    throw new NotImplementedException(string.Format(
                                                          "not dumper implemented for {0}", item.GetType()));
                }
            }
        }
コード例 #6
0
 public static void Dump(this MappingCoordinatesListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     mesh.TexCoords = chunk.texCoords;
 }
コード例 #7
0
 public static void Dump(this FacesMaterialChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     mesh.UsesMaterial = chunk.UsesMaterial;
     mesh.UsesIndexes = chunk.usesIndexes;
 }
コード例 #8
0
 public static void Dump(this LocalCoordinatesSystemChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     // nothing to do.
 }
コード例 #9
0
 public static void Dump(this VerticesListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     mesh.Vertexes = chunk.vertexes;
 }
コード例 #10
0
 public static void Dump(this FacesMaterialChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     mesh.UsesMaterial = chunk.UsesMaterial;
     mesh.UsesIndexes  = chunk.usesIndexes;
 }
コード例 #11
0
 public static void Dump(this SmoothingGroupListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh)
 {
     // nothing to do.
 }