Exemplo n.º 1
0
        public Vixen.Shape MakeShape(string basename)
        {
            Vixen.Shape shape = new Vixen.Shape();

            shape.Name       = basename + '.' + Name;
            shape.Appearance = Material;
            shape.Geometry   = MakeMesh();
            return(shape);
        }
Exemplo n.º 2
0
        public Vixen.Scene MakeScene()
        {
            Vixen.Scene scene = new Vixen.Scene();
            Vixen.Model root  = null;
            Vixen.Shape shape = null;

            scene.Name = _name + ".scene";
            if (_groups.Count == 0)
            {
                return(scene);
            }
            scene.Models = root;
            if (_groups.Count > 1)
            {
                root = new Vixen.Model();
            }
            foreach (Group g in _groups)
            {
                if (g.Name == null)
                {
                    g.Name = _name;
                }
                shape = g.MakeShape(_name);
                if (root != null)
                {
                    root.Append(shape);
                }
            }
            if (root == null)
            {
                root = shape;
            }
            root.Name    = _name + ".root";
            scene.Models = root;
            scene.ShowAll();
            return(scene);
        }