static void setTuple(Line3<T> &line, const tuple &t0, const tuple &t1) { MATH_EXC_ON; Vec3<T> v0, v1; if(t0.attr("__len__")() == 3 && t1.attr("__len__")() == 3) { v0.x = extract<T>(t0[0]); v0.y = extract<T>(t0[1]); v0.z = extract<T>(t0[2]); v1.x = extract<T>(t1[0]); v1.y = extract<T>(t1[1]); v1.z = extract<T>(t1[2]); line.set(v0, v1); } else THROW(Iex::LogicExc, "Line3 expects tuple of length 3"); }
static void set1(Line3<T> &line, const Vec3<T> &p0, const Vec3<T> &p1) { MATH_EXC_ON; line.set (p0, p1); }