Home | History | Annotate | Download | only in mosaic

Lines Matching refs:x0

65 inline void FindTriangleCentroid(double x0, double y0, double x1, double y1,
70 centX = (x0 + x1 + x2) / 3.0;
76 if (x0 == x1)
78 mass = fabs((y1 - y0) * (x2 - x0)); // Special case 1a
82 mass = fabs((y1 - y0) * (x1 - x0)); // Special case 1b
85 else if (x0 == x2)
87 if (x0 == x1)
89 mass = fabs((x2 - x0) * (y2 - y0)); // Special case 2a
93 mass = fabs((x1 - x0) * (y2 - y0)); // Special case 2a
98 mass = fabs((x1 - x0) * (y2 - y0)); // Special case 3
102 // Calculate line equation from x0,y0 to x2,y2
103 double dx = x2 - x0;
108 double b1 = y0 - m1 * x0;
124 mass = fabs( (y1 - y0) * (x2 - x0) );
129 inline void FindQuadCentroid(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3,
141 // The quad is split from x0,y0 to x2,y2
143 FindTriangleCentroid(x0, y0, x1, y1, x2, y2, mass1, cent1x, cent1y);
144 FindTriangleCentroid(x0, y0, x3, y3, x2, y2, mass2, cent2x, cent2y);