public SMCamera(Point eye, Vector dirt, Vector up, int width, int height, float fov = 65f) { this.Height = height; this.Width = width; this.Position = eye; this.Target = dirt; this.Up = up; this.fieldOfViewY = fov; camera = new Camera(); camera.Setup(eye.ToVec(), dirt, -up, new UV(width, height), fov); }
public override Point UnProject(ref Point v) { var pt = camera.WorldToRaster(v.ToVec()); return new Point(pt.U, pt.V, 0); }
public override void LookAt(Point eye, Point dirt, Vector up) { camera.Setup(eye.ToVec(), dirt.ToVec(), up, new UV(Width, Height), fieldOfViewY); }