public static List<ClipModel> GetClipModels(IRenderable entity, IList<IPortal> portalList, int depth) { List<ClipModel> clipModels = new List<ClipModel>(); if (entity.IsPortalable && !entity.DrawOverPortals) { foreach (Model m in entity.GetModels()) { clipModels.AddRange(_getClipModels(entity, m, portalList, entity.GetWorldTransform().Position, null, Matrix4.Identity, depth, 0)); } } else { foreach (Model m in entity.GetModels()) { clipModels.Add(new ClipModel(entity, m, new LineF[0], Matrix4.Identity)); } } return clipModels; }