void ExportLightmap(string file_name)
        {
            LightmapInfoInternal info = new LightmapInfoInternal();

            ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
            var exporter = new Halo2.ColladaLightmapExporter(arguments, info, tagIndex, tagManager);

            ExportSave(exporter, RelativeFilePath + file_name + ".dae");
        }
        void ExportModel(string file_name)
        {
            ModelInfoInternal model_info = new ModelInfoInternal();

            List <int> added_permutations = new List <int>();

            // create an info object with all of the registered infos combined
            foreach (int index in registeredInfos)
            {
                ModelInfoInternal info = internalInfoList[index] as ModelInfoInternal;

                if (!added_permutations.Contains(info.Permutation))
                {
                    added_permutations.Add(info.Permutation);
                }

                for (int i = 0; i < info.GetShaderCount(); i++)
                {
                    model_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
                }
                for (int i = 0; i < info.GetGeometryCount(); i++)
                {
                    model_info.AddGeometry(info.GetGeometryName(i), info.GetGeometryIndex(i));
                }
            }

            if (added_permutations.Count == 1)
            {
                model_info.Permutation = added_permutations[0];
            }
            else
            {
                model_info.IsMultiplePermutations = true;
            }

            ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
            var exporter = new Halo1.ColladaModelExporter(arguments, model_info, tagIndex, tagManager);

            ExportSave(exporter, RelativeFilePath + file_name + ".dae");
        }
        void ExportBSP(string file_name)
        {
            BSPInfoInternal bsp_info = new BSPInfoInternal();

            BSPObjectType bsp_type = BSPObjectType.None;

            // create an info object with all of the registered infos combined
            foreach (int index in registeredInfos)
            {
                BSPInfoInternal info = internalInfoList[index] as BSPInfoInternal;

                if (info.IncludeRenderMesh())
                {
                    bsp_type |= BSPObjectType.RenderMesh;
                }
                if (info.IncludePortalsMesh())
                {
                    bsp_type |= BSPObjectType.Portals;
                }
                if (info.IncludeFogPlanesMesh())
                {
                    bsp_type |= BSPObjectType.FogPlanes;
                }

                for (int i = 0; i < info.GetShaderCount(); i++)
                {
                    bsp_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
                }
            }

            bsp_info.SetType(bsp_type);

            ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
            var exporter = new Halo1.ColladaBSPExporter(arguments, bsp_info, tagIndex, tagManager);

            ExportSave(exporter, RelativeFilePath + file_name + ".dae");
        }
 /// <summary>
 /// Halo1 BSP exporter class
 /// </summary>
 /// <param name="bsp_info">An object implementing IHalo1BSPInterface to define what meshes are to be included in the collada file</param>
 /// <param name="tag_index">The tag index that contains the tag being exported</param>
 /// <param name="tag_manager">The tag manager of the tag being exported</param>
 public ColladaBSPExporter(ColladaExportArgs arguments, IHalo1BSPInterface bsp_info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
     : base(arguments, bsp_info, tag_index, tag_manager)
 {
     bspInfo = bsp_info;
 }
 /// <summary>
 /// Base class constructor
 /// </summary>
 /// <param name="info">An object implementing IHaloShaderDatumList to provide a list of shader datums</param>
 /// <param name="tag_index">The tag index that contains the tag being exported</param>
 /// <param name="tag_manager">The tag manager of the tag being exported</param>
 public ColladaModelExporterHalo2(ColladaExportArgs arguments, IHaloShaderDatumList info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
     : base(arguments, info, tag_index, tag_manager)
 {
 }
예제 #6
0
		/// <summary>
		/// Halo2 Lightmap exporter class
		/// </summary>
		/// <param name="lightmap_info">An object implementing IHalo2LightmapInterface to define what meshes are to be included in the collada file</param>
		/// <param name="tag_index">The tag index that contains the tag being exported</param>
		/// <param name="tag_manager">The tag manager of the tag being exported</param>
		public ColladaBSPExporter(ColladaExportArgs arguments, IHalo2BSPInterface info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
			: base(arguments, info, tag_index, tag_manager)
		{
			bspInfo = info;
		}
예제 #7
0
		/// <summary>
		/// Halo2 Lightmap exporter class
		/// </summary>
		/// <param name="lightmap_info">An object implementing IHalo2LightmapInterface to define what meshes are to be included in the collada file</param>
		/// <param name="tag_index">The tag index that contains the tag being exported</param>
		/// <param name="tag_manager">The tag manager of the tag being exported</param>
		public ColladaLightmapExporter(ColladaExportArgs arguments, IHalo2LightmapInterface lightmap_info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
			: base(arguments, lightmap_info, tag_index, tag_manager)
		{
			lightmapInfo = lightmap_info;
		}
예제 #8
0
		void ExportBSP(string file_name)
		{
			BSPInfoInternal bsp_info = new BSPInfoInternal();

			BSPObjectType bsp_type = BSPObjectType.None;

			// create an info object with all of the registered infos combined
			foreach (int index in registeredInfos)
			{
				BSPInfoInternal info = internalInfoList[index] as BSPInfoInternal;

				if (info.IncludeRenderMesh()) { bsp_type |= BSPObjectType.RenderMesh; }
				if (info.IncludePortalsMesh()) { bsp_type |= BSPObjectType.Portals; }
				if (info.IncludeFogPlanesMesh()) { bsp_type |= BSPObjectType.FogPlanes; }

				for (int i = 0; i < info.GetShaderCount(); i++)
					bsp_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
			}

			bsp_info.SetType(bsp_type);

			ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
			var exporter = new Halo1.ColladaBSPExporter(arguments, bsp_info, tagIndex, tagManager);

			ExportSave(exporter, RelativeFilePath + file_name + ".dae");
		}
 /// <summary>
 /// Halo1 Render Model exporter class
 /// </summary>
 /// <param name="model_info">An object implementing IHalo1ModelInterface to provide geometry name and index pairs</param>
 /// <param name="tag_index">The tag index containing the tag being exported</param>
 /// <param name="tag_manager">The tag manager of the tag being exported</param>
 public ColladaRenderModelExporter(ColladaExportArgs arguments, IHalo2RenderModelInterface model_info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
     : base(arguments, model_info, tag_index, tag_manager)
 {
     modelInfo = model_info;
 }
예제 #10
0
		void ExportModel(string file_name)
		{
			ModelInfoInternal model_info = new ModelInfoInternal();

			List<int> added_permutations = new List<int>();

			// create an info object with all of the registered infos combined
			foreach (int index in registeredInfos)
			{
				ModelInfoInternal info = internalInfoList[index] as ModelInfoInternal;

				if (!added_permutations.Contains(info.Permutation))
					added_permutations.Add(info.Permutation);

				for (int i = 0; i < info.GetShaderCount(); i++)
					model_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
				for (int i = 0; i < info.GetGeometryCount(); i++)
					model_info.AddGeometry(info.GetGeometryName(i), info.GetGeometryIndex(i));
			}

			if (added_permutations.Count == 1)
				model_info.Permutation = added_permutations[0];
			else
				model_info.IsMultiplePermutations = true;

			ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
			var exporter = new Halo1.ColladaModelExporter(arguments, model_info, tagIndex, tagManager);

			ExportSave(exporter, RelativeFilePath + file_name + ".dae");
		}
예제 #11
0
파일: Base.cs 프로젝트: CodeAsm/open-sauce
		/// <summary>
		/// Base class constructor
		/// </summary>
		/// <param name="info">An object implementing IHaloShaderDatumList to provide a list of shader datums</param>
		/// <param name="tag_index">The tag index that contains the tag being exported</param>
		/// <param name="tag_manager">The tag manager of the tag being exported</param>
		public ColladaModelExporterHalo2(ColladaExportArgs arguments, IHaloShaderDatumList info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
			: base(arguments, info, tag_index, tag_manager)
		{
		}
예제 #12
0
		/// <summary>
		/// Halo1 Model exporter class
		/// </summary>
		/// <param name="model_info">An object implementing IHalo1ModelInterface to provide geometry name and index pairs</param>
		/// <param name="tag_index">The tag index containing the tag being exported</param>
		/// <param name="tag_manager">The tag manager of the tag being exported</param>
		public ColladaModelExporter(ColladaExportArgs arguments, IHalo1ModelInterface model_info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
			: base(arguments, model_info, tag_index, tag_manager)
		{
			modelInfo = model_info;
		}
 /// <summary>
 /// Halo2 Lightmap exporter class
 /// </summary>
 /// <param name="lightmap_info">An object implementing IHalo2LightmapInterface to define what meshes are to be included in the collada file</param>
 /// <param name="tag_index">The tag index that contains the tag being exported</param>
 /// <param name="tag_manager">The tag manager of the tag being exported</param>
 public ColladaLightmapExporter(ColladaExportArgs arguments, IHalo2LightmapInterface lightmap_info, Managers.TagIndexBase tag_index, Managers.TagManager tag_manager)
     : base(arguments, lightmap_info, tag_index, tag_manager)
 {
     lightmapInfo = lightmap_info;
 }
예제 #14
0
		void ExportLightmap(string file_name)
		{
			LightmapInfoInternal info = new LightmapInfoInternal();

			ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
			var exporter = new Halo2.ColladaLightmapExporter(arguments, info, tagIndex, tagManager);

			ExportSave(exporter, RelativeFilePath + file_name + ".dae");
		}