]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Line.hh
ray-scene intersection
[chaz/yoink] / src / Moof / Line.hh
index 4a54e2d5f008c5bcd62c21340b552ffeb0eb809a..33eecb9b3df6f91dec483b8022011eac8cdda2a4 100644 (file)
@@ -49,7 +49,15 @@ struct Line : public Drawable, public Shape<D>
        Vector  a;
        Vector  b;
 
-       Scalar intersectRay(const Ray<2>& ray, Ray<2>::Intersection& intersection)
+
+       Line() {}
+
+       Line(const Vector& point1, const Vector& point2) :
+               a(point1),
+               b(point2) {}
+
+       Scalar intersectRay(const Ray<2>& ray,
+                       Ray<2>::Intersection& intersection) const
        {
                // solve: Cx + r*Dx = Ax + s(Bx - Ax)
                //        Cy + r*Dy = Ay + s(By - Ay)
This page took 0.016362 seconds and 4 git commands to generate.