public GameComponent1(Game game, Vector3 position, Camera2 camera)
     : base(game)
 {
     this.camera = camera;
     modelPosition = position;
     // TODO: Construct any child components here
 }
 public Terrain(Game1 game, Texture2D heightMap, Camera2 cam)
     : base(game)
 {
     this.game = game;
     effect = game.Content.Load<Effect>("TerrainEffect");
     //Texture2D heightMap = game.Content.Load<Texture2D>("Levels\\Level2\\heightmap");
     LoadHeightData(heightMap);
     LoadContent();
     offset = new Vector3(0, 0, 0);
     camera = cam;
 }
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     camera = new Camera2(this, Vector3.Zero, 1.0f);
     base.Initialize();
 }
 /// <summary>
 /// Sets the camera that the terrain is being viewed by.
 /// </summary>
 /// <param name="c">Camera used to view the terrain</param>
 public void setCamera(Camera2 c)
 {
     camera = c;
 }