예제 #1
0
        public projection(CAMERA camera)
        {
            EPSILON = 0.001;
            DTOR = 0.01745329252;
            this.camera = camera;
            screen = new SCREEN();
            origin = new Point3D();
            basisa = new Point3D();
            viewVec = new Point3D();
            basisc = new Point3D();
            p1 = new Point2D();
            p2 = new Point2D();

            e1 = new Point3D();
            e2 = new Point3D();
            n1 = new Point3D();
            n2 = new Point3D();
            if (Trans_Initialise() != true)
            {
                //MessageBox.Show("Error in initializing variable");
            }
        }
예제 #2
0
 public void Trans_Norm2Screen(Point3D norm, Point2D projected)
 {
     //MessageBox.Show("the value of  are");
     projected.h = Convert.ToInt32(screen.center.h - screen.size.h * norm.x / 2);
     projected.v = Convert.ToInt32(screen.center.v - screen.size.v * norm.z / 2);
 }
예제 #3
0
파일: Screen.cs 프로젝트: Chartreusy/Space
 public SCREEN()
 {
     center = new Point2D(720, 420);
     size = new Point2D(1000, 800);
 }