Пример #1
0
        public void Init()
        {
            BrushSize = 16;                                             // brush size
            this.prevMousePosition = new MyVector2();                   // prev mouse pos
            this.mouseDownPosition = new MyVector2();                   // mouse down pos
            this.currMousePosition = new MyVector2();                   // curr mouse pos

            // initialize textures, airbrushes, and parameters
            this.LoadTextures();                                                                // load canvas, brush textures


            // 3d entities
            //this.eyePos = new MyVector3(0, 0.1, 1);				// eye (camera) position
            this.eyePos        = new MyVector3(0, 0, -0.5);                     // eye (camera) position
            this.lightPosition = new MyVector3(5, 5, 5);                        // light position


            // util
            Utils.InitialRandomColors(53);                                              // initial random colors

            // opengl
            GLBasicDraw.InitGlMaterialLights();


            // mode
            //this.currentMode = EnumOperationMode.Adjusting;
            this.currentMode = EnumOperationMode.Viewing;

            // opengl projector
            this.glProjector = new OpenGLProjector();
        }
Пример #2
0
 public void SetMode(EnumOperationMode mode)
 {
     //if (this.currentMode == mode)
     //	this.currentMode = EnumOperationMode.Viewing;
     //else
     this.currentMode = mode;
     this.Focus();
     this.Refresh();
 }