예제 #1
0
 public void AddChild(SceneNode n)
 {
     children.Add(n);
 }
예제 #2
0
 public void RemoveChild(SceneNode n)
 {
     children.Remove(n);
 }
예제 #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            camera = new FirstPersonCamera(0.5f, 10);
            camera.Pos = new Vector3(3, 3, 13);

            Texture2D heightMap = Content.Load<Texture2D>("heightmap");

            primitiveBatch = new PrimitiveBatch(GraphicsDevice);

            sceneRoot = new SceneNode();
            terrainNode = new TerrainNode(GraphicsDevice, heightMap);

            sceneRoot.AddChild(terrainNode);
        }