/// <summary>
        /// Load content for the screen.
        /// </summary>
        /// <param name="GraphicInfo"></param>
        /// <param name="factory"></param>
        /// <param name="contentManager"></param>
        protected override void LoadContent(GraphicInfo GraphicInfo, GraphicFactory factory, IContentManager contentManager)
        {
            base.LoadContent(GraphicInfo, factory, contentManager);

            {
                for (int i = 0; i < 10; i++)
                {
                    for (int j = 0; j < 10; j++)
                    {
                        float x, y;
                        x = -i * 100;
                        y = -j * 100;

                        TreeModel tm = new TreeModel(factory, "Trees\\Pine", null, null);
                        ForwardTreeShader ts = new ForwardTreeShader();
                        TreeMaterial tmat = new TreeMaterial(ts, new WindStrengthSin());
                        GhostObject go = new GhostObject(new Vector3(x, 0, y), Matrix.Identity, new Vector3(0.05f));
                        IObject ox = new IObject(tmat, tm, go);
                        this.World.AddObject(ox);
                    }
                }
            }


            ///add a camera
            this.World.CameraManager.AddCamera(new CameraFirstPerson(GraphicInfo.Viewport));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 public TreeMaterial(ForwardTreeShader shader)
 {
     wsource = new WindStrengthSin();
     this.animator = new TreeWindAnimator(wsource);
     this.shader = shader;
     CanAppearOfReflectionRefraction = true;
     CanCreateShadow = true;
     IsVisible = true;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 /// <param name="wsource">The wsource.</param>
 public TreeMaterial(ForwardTreeShader shader, WindSource wsource)
 {
     this.wsource  = wsource;
     this.shader   = shader;
     this.animator = new TreeWindAnimator(wsource);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 public TreeMaterial(ForwardTreeShader shader)
 {
     wsource       = new WindStrengthSin();
     this.animator = new TreeWindAnimator(wsource);
     this.shader   = shader;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 /// <param name="wsource">The wsource.</param>
 public TreeMaterial(ForwardTreeShader shader, WindSource wsource)
 {
     this.wsource = wsource;
     this.shader = shader;
     this.animator = new TreeWindAnimator(wsource);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 public TreeMaterial(ForwardTreeShader shader)
 {
     wsource = new WindStrengthSin();
     this.animator = new TreeWindAnimator(wsource);
     this.shader = shader;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TreeMaterial"/> class.
 /// </summary>
 /// <param name="shader">The shader.</param>
 /// <param name="wsource">The wsource.</param>
 public TreeMaterial(ForwardTreeShader shader, WindSource wsource)
 {
     this.wsource = wsource;
     this.shader = shader;
     this.animator = new TreeWindAnimator(wsource);
     CanAppearOfReflectionRefraction = true;
     CanCreateShadow = true;
     IsVisible = true;
 }