]> Shamusworld >> Repos - architektonas/blobdiff - src/geometry.cpp
Added preliminary (i.e., non-functional) trim tool. Also:
[architektonas] / src / geometry.cpp
index cfb051101c94498c1e026bacc7a2a58379d7f0ec..41928aa629b7b253798ad19a1a0b73c3b56c19e5 100644 (file)
@@ -62,15 +62,15 @@ double Geometry::ParameterOfLineAndPoint(Point tail, Point head, Point point)
 }
 
 
-Point Geometry::MirrorPointAroundLine(Point point, Point p1, Point p2)
+Point Geometry::MirrorPointAroundLine(Point point, Point tail, Point head)
 {
        // Get the vector of the intersection of the line and the normal on the
        // line to the point in question.
-       double t = ParameterOfLineAndPoint(p1, p2, point);
-       Vector v = Vector(p1, p2) * t;
+       double t = ParameterOfLineAndPoint(tail, head, point);
+       Vector v = Vector(tail, head) * t;
 
-       // Get the point normal to point to the line passed in (p2 is the tail)
-       Point normalOnLine = p2 + v;
+       // Get the point normal to point to the line passed in
+       Point normalOnLine = tail + v;
 
        // Make our mirrored vector (head - tail)
        Vector mirror = -(point - normalOnLine);