public Level(OptimizedWorldOctree <IRenderable> worldOctree) { this.worldOctree = worldOctree; createItemTypes(); Node = new SceneGraphNode(); Node.AssociatedObject = this; LocalPlayer = new ScatteredPlayer(this, Node.CreateChild()); }
public EntityNode(Level level, SceneGraphNode node, OptimizedWorldOctree <IRenderable> tree) { this.level = level; this.tree = tree; Node = node; visible = false;// Default to invisible node.ObserveChange(onNodeChange); }
public void TestPhysicalLodRendererOptimized() { float size = 1000f; setupObjects(size, () => new RenderablePhysical()); var tree = new OptimizedWorldOctree <RenderablePhysical>(new Vector3(size, 200, size), 5); var lod = new LinebasedLodRenderer(tree); TW.Data.Objects.OfType <RenderablePhysical>().ForEach(delegate(RenderablePhysical p) { tree.AddWorldObject(p); p.Visible = false; }); engine.AddSimulator(new BasicSimulator(lod.UpdateRendererState)); engine.AddSimulator(new PhysicalSimulator()); engine.AddSimulator(new WorldRenderingSimulator()); engine.AddSimulator(new BasicSimulator(lod.RenderLines)); }