Esempio n. 1
0
        static void Main(string[] args)
        {
            var root = new Group{Name = "Root"};

            root.Children.Add(new Cube   { Name = "A"});
            root.Children.Add(new Sphere { Name = "B"});

            root.Render();

            Console.ReadKey();
        }
Esempio n. 2
0
 public void Visit(Group group)
 {
     Console.WriteLine("The Group is here " + group.Name);
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var root = new Group{Name = "Root"};

            root.Children.Add(new Cube   { Name = "A"});
            root.Children.Add(new Sphere { Name = "B"});
            root.Children.Add(new SomeNewGo{ Name = "GO" });

            // root.Accept(new RenderingVisitor());
            new RenderingVisitor().Traverse(root);

            Console.ReadKey();
        }
Esempio n. 4
0
 public virtual void Visit(Group group)
 {
 }