MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / closestPointToTuple

Function closestPointToTuple

src/python/PyImath/PyImathLine.cpp:161–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160template <class T>
161static Vec3<T>
162closestPointToTuple(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
178template <class T>
179static Vec3<T>

Callers

nothing calls this directly

Calls 1

closestPointToMethod · 0.80

Tested by

no test coverage detected