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

Function register_Shear

src/python/PyImath/PyImathShear.cpp:468–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466
467template <class T>
468class_<Shear6<T> >
469register_Shear()
470{
471 const char *name = ShearName<T>::value;
472
473 void (IMATH_NAMESPACE::Shear6<T>::*setValue1)(T,T,T,T,T,T) = &IMATH_NAMESPACE::Shear6<T>::setValue;
474 void (IMATH_NAMESPACE::Shear6<T>::*setValue2)(const Shear6<T> &) = &IMATH_NAMESPACE::Shear6<T>::setValue;
475 void (IMATH_NAMESPACE::Shear6<T>::*getValue1)(Shear6<T> &) const = &IMATH_NAMESPACE::Shear6<T>::getValue;
476
477 class_<Shear6<T> > shear_class(name, name, init<Shear6<T> >("copy construction"));
478 shear_class
479 .def(init<>("default construction: (0 0 0 0 0 0)"))
480 .def(init<T,T,T>("Shear(XY,XZ,YZ) construction: (XY XZ YZ 0 0 0)"))
481 .def(init<const Vec3<float> &>("Shear(v) construction: (v.x v.y v.z 0 0 0)"))
482 .def(init<const Vec3<double> &>("Shear(v) construction: (v.x v.y v.z 0 0 0)"))
483 .def(init<const Vec3<int> &>("Shear(v) construction: (v.x v.y v.z 0 0 0)"))
484 .def(init<T,T,T,T,T,T>("Shear(XY, XZ, YZ, YX, ZX, ZY) construction"))
485 .def("__init__", make_constructor(shearConstructor1<T>))
486 .def("__init__", make_constructor(shearTupleConstructor<T>),"Construction from tuple")
487 .def("__init__", make_constructor(shearConversionConstructor<T,float>))
488 .def("__init__", make_constructor(shearConversionConstructor<T,double>))
489 .def("__init__", make_constructor(shearConversionConstructor<T,int>))
490 .def("__iadd__",&iadd<T>,return_internal_reference<>())
491 .def("__add__",&add<T>)
492 .def("__isub__",&isub<T>,return_internal_reference<>())
493 .def("__sub__",&sub<T>)
494 .def("__neg__",&neg<T>)
495 .def("__imul__",&imul<T>,return_internal_reference<>())
496 .def("__imul__",&imulT<T>,return_internal_reference<>())
497 .def("__mul__",&mul<T>)
498 .def("__mul__",&mulT<T>)
499 .def("__rmul__",&mulT<T>)
500 .def("__idiv__",&idiv<T>,return_internal_reference<>())
501 .def("__idiv__",&idivT<T>,return_internal_reference<>())
502 .def("__itruediv__",&idiv<T>,return_internal_reference<>())
503 .def("__itruediv__",&idivT<T>,return_internal_reference<>())
504 .def("__div__",&div<T>)
505 .def("__div__",&divT<T>)
506 .def("__truediv__",&div<T>)
507 .def("__truediv__",&divT<T>)
508 .def(self == self) // NOSONAR - suppress SonarCloud bug report.
509 .def(self != self) // NOSONAR - suppress SonarCloud bug report.
510 .def("__str__",&Shear_str<T>)
511 .def("__repr__",&Shear_repr<T>)
512 .def("setValue", setValue1)
513 .def("setValue", setValue2)
514 .def("getValue", getValue1)
515 .def("negate", &Shear6<T>::negate, return_internal_reference<>())
516 .def("baseTypeLowest", &Shear6<T>::baseTypeLowest)
517 .staticmethod("baseTypeLowest")
518 .def("baseTypeMax", &Shear6<T>::baseTypeMax)
519 .staticmethod("baseTypeMax")
520 .def("baseTypeSmallest", &Shear6<T>::baseTypeSmallest)
521 .staticmethod("baseTypeSmallest")
522 .def("baseTypeEpsilon", &Shear6<T>::baseTypeEpsilon)
523 .staticmethod("baseTypeEpsilon")
524 .def("equalWithAbsError", &Shear6<T>::equalWithAbsError)
525 .def("equalWithRelError", &Shear6<T>::equalWithRelError)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected