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

Function distanceToTuple

src/python/PyImath/PyImathLine.cpp:128–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127template <class T>
128static T
129distanceToTuple(Line3<T> line, const tuple &t)
130{
131 Vec3<T> v;
132 if(t.attr("__len__")() == 3)
133 {
134 v.x = extract<T>(t[0]);
135 v.y = extract<T>(t[1]);
136 v.z = extract<T>(t[2]);
137
138 return line.distanceTo(v);
139 }
140 else
141 throw std::invalid_argument ( "Line3 expects tuple of length 3");
142}
143
144template <class T>
145static Vec3<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected