public void Save(Stream stream) { using (var bw = new BinaryWriter(stream, Encoding.Unicode, true)) { bw.Write(m_V01); bw.Write(m_V02); m_NodeChild.Save(stream); m_NodeSibling.Save(stream); bw.Write(m_V07); bw.Write(m_V08); bw.Write(m_V09); bw.Write(m_ScaleXYZ); m_Translate.Save(stream); m_Rotate.Save(stream); m_Scale.Save(stream); bw.Write(m_V20); bw.Write(m_V21); bw.Write(m_NumModels); if (m_NumModels > 0) { m_BoundingMin.Save(stream); m_BoundingMax.Save(stream); } } }
public void Save(Stream stream) { using (var bw = new BinaryWriter(stream, Encoding.Unicode, true)) { m_MaterialAsset.Save(stream); bw.Write((uint)m_TypeFlags); bw.Write(m_Vertices.Count); bw.Write(m_Vertices.Count / 3); bw.Write(0); for (var i = 0; i < m_Vertices.Count; i++) { m_Vertices[i].Save(stream); } if (m_TypeFlags.HasFlag(Flags.Normals)) { for (int i = 0; i < m_Vertices.Count; i++) { m_Normals[i].Save(stream); } } if (m_TypeFlags.HasFlag(Flags.Colors)) { for (int i = 0; i < m_Vertices.Count; i++) { bw.Write(m_Colors[i].ToArgb()); } } if (m_TypeFlags.HasFlag(Flags.TexCoords)) { for (int i = 0; i < m_Vertices.Count; i++) { m_TexCoords[i].Save(stream); } } if (m_TypeFlags.HasFlag(Flags.TexCoords2)) { for (int i = 0; i < m_Vertices.Count; i++) { mTexCoords2[i].Save(stream); } } for (ushort i = 0; i < m_Vertices.Count; i++) { //bw.Write(m_Indices[i]); bw.Write(i); } } }
public void Save(Stream stream) { using (var bw = new BinaryWriter(stream, Encoding.Unicode, true)) { bw.Write(m_Unknown1); bw.Write(m_Duration); bw.Write(m_Zero1); bw.Write(m_Zero2); m_NodeChild.Save(stream); m_NodeSibling.Save(stream); } }
public void Save(Stream stream) { using (var bw = new BinaryWriter(stream, Encoding.Unicode, true)) { m_Asset.Save(stream); for (int i = 0; i < INT_ARRAY_1_LENGTH; i++) { bw.Write(m_IntArray1[i]); } for (int i = 0; i < INT_ARRAY_2_LENGTH; i++) { bw.Write(m_IntArray2[i]); } } }