static public ModelGeometry Load(string objPath) { if (CachedModels.ContainsKey(objPath)) { return(CachedModels[objPath]); } string l; GeometryBuffer gBuffer = new GeometryBuffer(); using (StreamReader sr = new StreamReader(objPath)) { while ((l = sr.ReadLine()) != null) { ProcessOBJLine(gBuffer, l); } } ModelGeometry MG = gBuffer.GetGeometry(); CachedModels.Add(objPath, MG); //Engine.Log("ModelGeometry.Count = " + MG.Count.ToString()); return(MG); }