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"); } }
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); }
public SCREEN() { center = new Point2D(720, 420); size = new Point2D(1000, 800); }