/// <summary> /// Performs a cache lookup, /// adds a new static mesh if not found /// </summary> /// <param name="id">The model id to fetch the static mesh for</param> public static StaticMesh GetMesh(uint id) { StaticMesh mesh = null; Meshes.TryGetValue(id, out mesh); if (mesh == null) { mesh = new StaticMesh(id); Add(id, mesh); } return(mesh); }
/// <summary> /// Returns a pointer to the static mesh /// </summary> public void GetMesh(uint modelId) { StaticMesh = StaticMeshCache.GetMesh(modelId); }
/// <summary> /// Adds a static mesh to the cache /// </summary> public static void Add(uint id, StaticMesh mesh) { Meshes.Add(id, mesh); }