public void RemoveObject(MannulDraw obj) { if (DrawObjects.ContainsKey(obj.GetInstanceID())) { Culler.Remove(DrawObjects[obj.GetInstanceID()]); DrawObjects.Remove(obj.GetInstanceID()); } }
public void AddObject(MannulDraw obj) { if (!DrawObjects.ContainsKey(obj.GetInstanceID())) { // object OOModel oobj = new OOModel(obj); oobj.SetObjectId(obj.GetInstanceID()); // culler Culler.Add(oobj); DrawObjects.Add(oobj.GetObjectId(), oobj); } }
public OOModel(MannulDraw drawer) { Drawer = drawer; MeshFilter mf = drawer.gameObject.GetComponent <MeshFilter>(); Model = new OOMesh(mf); Box = new OOBox(Vector3.one * float.MaxValue, Vector3.one * float.MinValue); UpdateTransform(); Head = new OOItem(); Tail = new OOItem(); Tail.CNext = null; Head.CPrev = null; Head.CNext = Tail; Tail.CPrev = Head; CanOcclude = 1; // GeoDebugDrawUtils.DrawAABB(Box.Min, Box.Max); }