diff --git a/geom/tri.hpp b/geom/tri.hpp index 533edff3..6e1fc845 100644 --- a/geom/tri.hpp +++ b/geom/tri.hpp @@ -43,7 +43,8 @@ namespace util::geom { namespace surface { template - struct sampler> { + class sampler> { + public: sampler (tri _target): base (_target.a), v0 (_target.b - _target.a), @@ -58,6 +59,7 @@ namespace util::geom { return base + dist (gen) * v0 + dist (gen) * v1; } + private: util::point base; util::vector v0, v1; };