Lines Matching defs:pt
25 Pt2 () { pt[0] = 0; pt[1] = 0; pt[2] = 1.0; } // we default to (0 : 0 : 1)
26 Pt2 (double x, double y, double w) { pt[0] = x; pt[1] = y; pt[2] = w; }
27 Pt2 (Geom::Point const &point) { pt[0] = point[Geom::X]; pt[1] = point[Geom::Y]; pt[2] = 1; }
32 return pt[index];
37 return pt[index];
42 return (fabs(pt[0] - rhs.pt[0]) < epsilon &&
43 fabs(pt[1] - rhs.pt[1]) < epsilon &&
44 fabs(pt[2] - rhs.pt[2]) < epsilon);
57 result->pt[i] += rhs.pt[i];
67 result->pt[i] -= rhs.pt[i];
76 result->pt[i] *= s;
83 inline bool is_finite() { return pt[2] != 0; } // FIXME: Should we allow for some tolerance?
85 inline void print(char const *s) const { printf ("%s(%8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2]); }
88 double pt[3];
94 Pt3 () { pt[0] = 0; pt[1] = 0; pt[2] = 0; pt[3] = 1.0; } // we default to (0 : 0 : 0 : 1)
95 Pt3 (double x, double y, double z, double w) { pt[0] = x; pt[1] = y; pt[2] = z; pt[3] = w; }
101 return (fabs(pt[0] - rhs.pt[0]) < epsilon &&
102 fabs(pt[1] - rhs.pt[1]) < epsilon &&
103 fabs(pt[2] - rhs.pt[2]) < epsilon &&
104 fabs(pt[3] - rhs.pt[3]) < epsilon);
114 result->pt[i] += rhs.pt[i];
124 result->pt[i] -= rhs.pt[i];
133 result->pt[i] *= s;
140 return pt[index];
145 return pt[index];
148 inline bool is_finite() { return pt[3] != 0; } // FIXME: Should we allow for some tolerance?
151 printf ("%s(%8.2f : %8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2], pt[3]);
155 double pt[4];