| 159 | |
| 160 | template <class T> |
| 161 | static Vec3<T> |
| 162 | closestPointToTuple(Line3<T> line, const tuple &t) |
| 163 | { |
| 164 | MATH_EXC_ON; |
| 165 | Vec3<T> v; |
| 166 | if(t.attr("__len__")() == 3) |
| 167 | { |
| 168 | v.x = extract<T>(t[0]); |
| 169 | v.y = extract<T>(t[1]); |
| 170 | v.z = extract<T>(t[2]); |
| 171 | |
| 172 | return line.closestPointTo(v); |
| 173 | } |
| 174 | else |
| 175 | throw std::invalid_argument ( "Line3 expects tuple of length 3"); |
| 176 | } |
| 177 | |
| 178 | template <class T> |
| 179 | static Vec3<T> |
nothing calls this directly
no test coverage detected