public Engine() { _scene = new Scene(); _mod = new int[64]; _stack = new KdStackItem[64]; for (int i = 0; i < 64; i++) _stack[i] = new KdStackItem(); }
public void Build(Scene scene) { foreach (Primitive p in scene.Primitives) { Root.Add(p); } int prims = scene.Primitives.Count; AxisAlignedBox sBox = scene.Extends; _list = null; _sortedList = null; Subdivide(Root, sBox, 0, prims); }