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

Function distanceToTuple

src/python/PyImath/PyImathPlane.cpp:387–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386template <class T>
387static T
388distanceToTuple(Plane3<T> &plane, const tuple &t)
389{
390 MATH_EXC_ON;
391 Vec3<T> point;
392 if(t.attr("__len__")() == 3)
393 {
394 point.x = extract<T>(t[0]);
395 point.y = extract<T>(t[1]);
396 point.z = extract<T>(t[2]);
397
398 return plane.distanceTo(point);
399 }
400 else
401 throw std::domain_error ("Plane3 expects tuple of length 3");
402}
403
404template <class T>
405static Vec3<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected