本文整理汇总了C#中System.IO.StreamWriter.Export_SKIN方法的典型用法代码示例。如果您正苦于以下问题:C# StreamWriter.Export_SKIN方法的具体用法?C# StreamWriter.Export_SKIN怎么用?C# StreamWriter.Export_SKIN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.StreamWriter
的用法示例。
在下文中一共展示了StreamWriter.Export_SKIN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Export_MLOD
public void Export_MLOD(StreamWriter w, GenericRCOLResource rcolResource, MLOD mlod, MLOD.Mesh mesh)
{
float[] uvScales = rcolResource.GetUVScales(mesh);
if (mesh.GeometryStates.Count > 0)
{
w.WriteLine(";");
w.WriteLine("; Extended format: GeoStates follow IBUF");
w.WriteLine(";");
}
if (mesh.Flags != 0)
{
w.WriteLine(";");
w.WriteLine("; Extended format: MeshFlags follow IBUF" + (mesh.GeometryStates.Count > 0 ? " and GeoStates" : ""));
w.WriteLine("; (They are ignored on import.)");
w.WriteLine(";");
}
VRTF vrtf = GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.VertexFormatIndex) as VRTF;
bool isDefault = vrtf == null;
if (isDefault)
{
vrtf = VRTF.CreateDefaultForMesh(mesh);
w.WriteLine(";;-marker: vrtf is default for mesh");
}
w.Export_VRTF(mpb, vrtf);
w.Export_SKIN(mpb, GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.SkinControllerIndex) as SKIN, mesh);
Export_VBUF_Main(w, GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.VertexBufferIndex) as VBUF, vrtf, uvScales, mesh);
Export_IBUF_Main(w, GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.IndexBufferIndex) as IBUF, mesh);
//For backward compatibility, these come after the IBUFs
Export_MeshGeoStates(w, vrtf, uvScales, mlod, mesh,
GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.VertexBufferIndex) as VBUF,
GenericRCOLResource.ChunkReference.GetBlock(rcolResource, mesh.IndexBufferIndex) as IBUF);
if (mesh.Flags != 0)
{
w.WriteLine(";");
w.WriteLine("; Extended format: MeshFlags");
w.WriteLine(";");
w.WriteLine("flags " + mesh.Flags);
w.Flush();
}
}