public SSMesh_wfOBJ(SSAssetManager.Context ctx, string filename) { this.srcFilename = ctx.fullResourcePath(filename); Console.WriteLine("SSMesh_wfOBJ: loading wff {0}", filename); WavefrontObjLoader wff_data = new WavefrontObjLoader(ctx, filename); Console.WriteLine("wff vertex count = {0}", wff_data.positions.Count); Console.WriteLine("wff face count = {0}", wff_data.numFaces); _loadData(ctx, wff_data); // update radius float maxRadSq = 0f; foreach (var subset in geometrySubsets) { foreach (var vtx in subset.triangleMesh.lastAssignedVertices) { maxRadSq = Math.Max(maxRadSq, vtx.Position.LengthSquared); } } _boundingSphereRadius = (float)Math.Sqrt(maxRadSq); }
public SSMD5Parser(SSAssetManager.Context ctx, string filename) { m_ctx = ctx; m_reader = ctx.OpenText(filename); System.Console.WriteLine("Reading a \"doom\" file: " + ctx.fullResourcePath(filename)); }