public Mesh(string name, bool bigEndian = true) : base(name, "Mesh", bigEndian) { _version = MeshVersion.GH1; _bones = new List <string>(); _transform = null; _meshes = new List <string>(); }
public void exportMesh(Mesh pMesh, string filename, MeshVersion version) { OgrePINVOKE.MeshSerializer_exportMesh__SWIG_3(swigCPtr, Mesh.getCPtr(pMesh), filename, (int)version); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
public void exportMesh(Mesh pMesh, DataStreamPtr stream, MeshVersion version) { OgrePINVOKE.MeshSerializer_exportMesh__SWIG_7(swigCPtr, Mesh.getCPtr(pMesh), DataStreamPtr.getCPtr(stream), (int)version); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
private static bool IsVersionValid(MeshVersion version) { switch (version) { case MeshVersion.GH1: // PS2 - GH1 case MeshVersion.GH2: return(true); default: return(false); } }
private static bool DetermineEndianess(byte[] head, out MeshVersion version, out bool valid) { bool bigEndian = false; version = (MeshVersion)BitConverter.ToInt32(head, 0); valid = IsVersionValid(version); checkVersion: if (!valid && !bigEndian) { bigEndian = !bigEndian; Array.Reverse(head); version = (MeshVersion)BitConverter.ToInt32(head, 0); valid = IsVersionValid(version); goto checkVersion; } return(bigEndian); }