20 * Z (coming out of the monitor)
26 Onscreen(double ix, double iy) { x=ix; y=iy; }
33 virtual Point operator()(Point)= 0;
41 TransformList() { size=used=0; a=0; }
42 ~TransformList() { clearcontents(); free(a); }
43 void reset() { clearcontents(); used=0; }
44 Point operator()(Point);
45 void append(Transform*);
49 static TransformList usertransforms;
50 static TransformList povtransform;
51 static double planedistance, eyedistance, cutoffdistance, eyex;
55 Point(double x, double y, double z) { xyz[0]=x; xyz[1]=y; xyz[2]=z; }
56 Point operator+(Point r) { return Point(xyz[0]+r[0], xyz[1]+r[1], xyz[2]+r[2]); }
57 Point operator-(Point r) { return Point(xyz[0]-r[0], xyz[1]-r[1], xyz[2]-r[2]); }
58 Point operator*(double f) { return Point(xyz[0]*f, xyz[1]*f, xyz[2]*f); }
59 double& operator[](int i) { return xyz[i]; }
60 double magnitude() { return sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]+xyz[2]*xyz[2]); }
61 const char *printing();
63 operator Onscreen() const;
64 Point transformed() const { return povtransform(usertransforms(*this)); }
65 double index() const { return transformed()[2]; }
67 static int indexvisible(double index) { return index < cutoffdistance; }
68 static void appendtransform(Transform *t) { usertransforms.append(t); }
69 static void cleartransform() { usertransforms.reset(); }
70 static void setobserver(double theta, double eta=0.0,
71 double planedist=1.0, double eyedist=1.0,
73 static void seteyex(double n) { eyex=n; }