Exemple #1
0
        private void ResetAll(string filename)
        {
            //FSAA = false;
            deviceLost       = false;
            DisplayWireFrame = 0;

            middle_button_pressed = false;
            right_button_pressed  = false;

            onpaint_enabled = true;

            abi = new ABI(filename);
            am  = new AnimatedModel(abi);

            Vector3 n0 = new Vector3(-1, 0, -1);

            sm = new ShadowModel(abi, am, n0, 0x505050);

            //设置标题栏
            FileInfo fi = new FileInfo(filename);

            //filename = fi.Name.ToLower();
            Text = "3D .Abi Viewer - " + filename;

            //背景色相关
            DrawBackground = false;
            BackColor      = Color.DarkGray;

            //动画相关
            model      = 0;
            animation  = 0;
            delta_time = 1f;
        }
Exemple #2
0
        bool FSAA = false;                //全屏抗锯齿否
        //////////////////////////////////////////////////////////////////////////////////////////////////////
        public Game(string filename)
        {
            InitializeComponent();

            this.Shown            += new EventHandler(Game_Shown);
            this.ResizeEnd        += new EventHandler(Game_ResizeEnd);
            this.Resize           += new EventHandler(Game_Resize);
            this.MouseWheel       += new MouseEventHandler(this.Game_MouseWheel);
            this.MouseDoubleClick += new MouseEventHandler(Game_MouseDoubleClick);

            abi = new ABI(filename);
            am  = new AnimatedModel(abi);

            Vector3 n0 = new Vector3(-1, 0, -1);

            sm = new ShadowModel(abi, am, n0, 0x505050);

            //设置标题栏
            FileInfo fi = new FileInfo(filename);

            filename = fi.Name.ToLower();
            Text     = "3D .Abi Viewer - " + filename;

            //背景色相关
            BackColor = Color.DarkGray;
        }