Esempio n. 1
0
        private SceneNodeBase GetRootNode()
        {
            var group = new GroupNode();

            {
                var node = PyramideNode.Create();
                group.Children.Add(node);
            }
            {
                var triangleModel = new TriangleModel();
                var node          = TriangleNode.Create();
                group.Children.Add(node);
            }

            return(group);
        }
Esempio n. 2
0
        public static PyramideNode Create()
        {
            var pyramideModel = new PyramidModel();
            var vs            = new VertexShader(regularVert);
            var fs            = new FragmentShader(regularFrag);
            var array         = new ShaderArray(vs, fs);
            var map           = new AttributeMap();

            map.Add("inPosition", PyramidModel.strPosition);
            var builder = new RenderMethodBuilder(array, map);
            var node    = new PyramideNode(pyramideModel, builder);

            node.Initialize();
            node.ModelSize = pyramideModel.size;

            return(node);
        }