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

Function setTuple

src/python/PyImath/PyImathLine.cpp:82–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81template <class T>
82static void
83setTuple(Line3<T> &line, const tuple &t0, const tuple &t1)
84{
85 MATH_EXC_ON;
86 Vec3<T> v0, v1;
87 if(t0.attr("__len__")() == 3 && t1.attr("__len__")() == 3)
88 {
89 v0.x = extract<T>(t0[0]);
90 v0.y = extract<T>(t0[1]);
91 v0.z = extract<T>(t0[2]);
92
93 v1.x = extract<T>(t1[0]);
94 v1.y = extract<T>(t1[1]);
95 v1.z = extract<T>(t1[2]);
96
97 line.set(v0, v1);
98 }
99 else
100 throw std::invalid_argument ("Line3 expects tuple of length 3");
101}
102
103template <class T>
104static Vec3<T>

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected