Beispiel #1
0
        public override void Init()
        {
            //Cargar mesh
            var loader = new TgcSceneLoader();

            mesh = loader.loadSceneFromFile(MediaDir + "ModelosTgc\\LogoTGC\\LogoTGC-TgcScene.xml").Meshes[0];
            mesh.AutoTransformEnable = true;

            //Cargar Shader de PhongShading
            mesh.Effect    = TgcShaders.Instance.TgcMeshPhongShader;
            mesh.Technique = TgcShaders.Instance.getTgcMeshTechnique(mesh.RenderType);

            //Texto help
            textHelp          = new TgcText2D();
            textHelp.Position = new Point(15, 260);
            textHelp.Size     = new Size(500, 100);
            textHelp.changeFont(new Font("TimesNewRoman", 16, FontStyle.Regular));
            textHelp.Color = Color.Yellow;
            textHelp.Align = TgcText2D.TextAlign.LEFT;
            textHelp.Text  = "��Por donde empezar? Presionar \"H\"";

            //Help form
            var helpRtf = File.ReadAllText(MediaDir + "\\help.rtf");

            helpForm = new EjemploDefaultHelpForm(helpRtf);

            //Camara
            Camara = new TgcRotationalCamera(new Vector3(), 150f, Input);
        }