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); }
public static void Dump(this MainChunk chunk, out ThreeDSModel4ModernOpengl model) { model = new ThreeDSModel4ModernOpengl(); foreach (var item in chunk.Children) { if(item is VersionChunk) { (item as VersionChunk).Dump(model); } else if(item is _3DEditorChunk) { (item as _3DEditorChunk).Dump(model); } else if (item is KeyframeChunk) { (item as KeyframeChunk).Dump(model); } else if(!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this FramesChunk chunk, ThreeDSModel4ModernOpengl model) { foreach (var item in chunk.Children) { if (item is ObjectNameChunk) { (item as ObjectNameChunk).Dump(model); } else if (item is ObjectPivotPointChunk) { (item as ObjectPivotPointChunk).Dump(model); } else if (item is PositionTrackChunk) { (item as PositionTrackChunk).Dump(model); } else if (item is RotationTrackChunk) { (item as RotationTrackChunk).Dump(model); } else if (item is ScaleTrackChunk) { (item as ScaleTrackChunk).Dump(model); } else if (item is HierarchyPositionChunk) { (item as HierarchyPositionChunk).Dump(model); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this MainChunk chunk, out ThreeDSModel4ModernOpengl model) { model = new ThreeDSModel4ModernOpengl(); foreach (var item in chunk.Children) { if (item is VersionChunk) { (item as VersionChunk).Dump(model); } else if (item is _3DEditorChunk) { (item as _3DEditorChunk).Dump(model); } else if (item is KeyframeChunk) { (item as KeyframeChunk).Dump(model); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this LightChunk chunk, ThreeDSModel4ModernOpengl model) { foreach (var item in chunk.Children) { if(item is SpotlightChunk) { (item as SpotlightChunk).Dump(model); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this LightChunk chunk, ThreeDSModel4ModernOpengl model) { foreach (var item in chunk.Children) { if (item is SpotlightChunk) { (item as SpotlightChunk).Dump(model); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this MaterialBlockChunk chunk, ThreeDSModel4ModernOpengl model) { ThreeDSMaterial4ModernOpenGL material = new ThreeDSMaterial4ModernOpenGL(); foreach (var item in chunk.Children) { if(item is MaterialNameChunk) { (item as MaterialNameChunk).Dump(model, material); } else if(item is AmbientColorChunk) { (item as AmbientColorChunk).Dump(model, material); } else if (item is DiffuseColorChunk) { (item as DiffuseColorChunk).Dump(model, material); } else if(item is SpecularColorChunk) { (item as SpecularColorChunk).Dump(model, material); } else if(item is MatShininessChunk) { (item as MatShininessChunk).Dump(model, material); } else if(item is TextureMapChunk) { (item as TextureMapChunk).Dump(model, material); } else if(item is BumpMapChunk) { (item as BumpMapChunk).Dump(model, material); } else if(item is ReflectionMapChunk) { (item as ReflectionMapChunk).Dump(model, material); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } model.MaterialDict.Add(material.MaterialName, material); }
public static void Dump(this MaterialBlockChunk chunk, ThreeDSModel4ModernOpengl model) { ThreeDSMaterial4ModernOpenGL material = new ThreeDSMaterial4ModernOpenGL(); foreach (var item in chunk.Children) { if (item is MaterialNameChunk) { (item as MaterialNameChunk).Dump(model, material); } else if (item is AmbientColorChunk) { (item as AmbientColorChunk).Dump(model, material); } else if (item is DiffuseColorChunk) { (item as DiffuseColorChunk).Dump(model, material); } else if (item is SpecularColorChunk) { (item as SpecularColorChunk).Dump(model, material); } else if (item is MatShininessChunk) { (item as MatShininessChunk).Dump(model, material); } else if (item is TextureMapChunk) { (item as TextureMapChunk).Dump(model, material); } else if (item is BumpMapChunk) { (item as BumpMapChunk).Dump(model, material); } else if (item is ReflectionMapChunk) { (item as ReflectionMapChunk).Dump(model, material); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } model.MaterialDict.Add(material.MaterialName, material); }
public static void Dump(this ReflectionMapChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { foreach (var item in chunk.Children) { if (item is MappingFilenameChunk) { (item as MappingFilenameChunk).Dump(model, material); } else if (item is MappingParametersChunk) { (item as MappingParametersChunk).Dump(model, material); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
public static void Dump(this ReflectionMapChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { foreach (var item in chunk.Children) { if(item is MappingFilenameChunk) { (item as MappingFilenameChunk).Dump(model, material); } else if(item is MappingParametersChunk) { (item as MappingParametersChunk).Dump(model, material); } else if (!(item is UndefinedChunk)) { throw new NotImplementedException(string.Format( "not dumper implemented for {0}", item.GetType())); } } }
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())); } } }
public static void Dump(this MappingParametersChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { // nothing to do. }
public static void Dump(this HierarchyPositionChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }
public static void Dump(this CameraChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }
public static void Dump(this SpotlightChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }
public static void Dump(this BumpMapChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { // nothing to do. }
public static void Dump(this PositionTrackChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }
public static void Dump(this SpecularColorChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { material.Specular = new float[] { chunk.R, chunk.G, chunk.B, }; }
public static void Dump(this DiffuseColorChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { material.Diffuse = new float[] { chunk.R, chunk.G, chunk.B, }; }
public static void Dump(this MatShininessChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { material.Shininess = chunk.Shininess; }
public static void Dump(this FacesMaterialChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh) { mesh.UsesMaterial = chunk.UsesMaterial; mesh.UsesIndexes = chunk.usesIndexes; }
public static void Dump(this LocalCoordinatesSystemChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh) { // nothing to do. }
public static void Dump(this VerticesListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh) { mesh.Vertexes = chunk.vertexes; }
public static void Dump(this MeshInformationBlockChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }
public static void Dump(this MappingCoordinatesListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh) { mesh.TexCoords = chunk.texCoords; }
public static void Dump(this SmoothingGroupListChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMesh4ModernOpenGL mesh) { // nothing to do. }
public static void Dump(this VersionChunk chunk, ThreeDSModel4ModernOpengl model) { Console.WriteLine("version:" + chunk.Version); }
public static void Dump(this ObjectNameChunk chunk, ThreeDSModel4ModernOpengl model) { Console.WriteLine("Object Name: " + chunk.Name); }
public static void Dump(this SmoothingGroupListChunk chunk, ThreeDSModel4ModernOpengl model,ThreeDSMesh4ModernOpenGL mesh) { // nothing to do. }
public static void Dump(this MappingFilenameChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { material.TextureFilename = chunk.TextureFilename; }
public static void Dump(this MaterialNameChunk chunk, ThreeDSModel4ModernOpengl model, ThreeDSMaterial4ModernOpenGL material) { material.MaterialName = chunk.MaterialName; }
public static void Dump(this ObjectPivotPointChunk chunk, ThreeDSModel4ModernOpengl model) { // nothing to do. }