| 543 | |
| 544 | template <class T> |
| 545 | class_<Color3<T>, bases<Vec3<T> > > |
| 546 | register_Color3() |
| 547 | { |
| 548 | class_<Color3<T>, bases<Vec3<T> > > color3_class(Color3Name<T>::value, Color3Name<T>::value,init<Color3<T> >("copy construction")); |
| 549 | color3_class |
| 550 | .def("__init__",make_constructor(Color3_construct_default<T>),"initialize to (0,0,0)") |
| 551 | .def("__init__",make_constructor(Color3_construct_tuple<T>), "initialize to (r,g,b) with a python tuple") |
| 552 | .def("__init__",make_constructor(Color3_construct_list<T>), "initialize to (r,g,b) with a python list") |
| 553 | .def("__init__",make_constructor(Color3_component_construct1<T,float>)) |
| 554 | .def("__init__",make_constructor(Color3_component_construct1<T,int>)) |
| 555 | .def("__init__",make_constructor(Color3_component_construct2<T,float>)) |
| 556 | .def("__init__",make_constructor(Color3_component_construct2<T,int>)) |
| 557 | .def("__init__",make_constructor(Color3_color_construct<T,float>)) |
| 558 | .def("__init__",make_constructor(Color3_color_construct<T,int>)) |
| 559 | .def("__init__",make_constructor(Color3_color_construct<T,unsigned char>)) |
| 560 | .def("__init__",make_constructor(Color3_vector_construct<T,float>)) |
| 561 | .def("__init__",make_constructor(Color3_vector_construct<T,double>)) |
| 562 | .def("__init__",make_constructor(Color3_vector_construct<T,int>)) |
| 563 | |
| 564 | .def_readwrite("r", &Color3<T>::x) |
| 565 | .def_readwrite("g", &Color3<T>::y) |
| 566 | .def_readwrite("b", &Color3<T>::z) |
| 567 | .def("__str__", &color3_str<T>) |
| 568 | .def("__repr__", &color3_repr<T>) |
| 569 | .def(self == self) // NOSONAR - suppress SonarCloud bug report. |
| 570 | .def(self != self) // NOSONAR - suppress SonarCloud bug report. |
| 571 | .def("__iadd__", &iadd<T>,return_internal_reference<>()) |
| 572 | .def("__add__", &add<T>) |
| 573 | .def("__add__", &addTuple<T>) |
| 574 | .def("__add__", &addT<T>) |
| 575 | .def("__radd__", &addTuple<T>) |
| 576 | .def("__radd__", &addT<T>) |
| 577 | .def("__isub__", &isub<T>,return_internal_reference<>()) |
| 578 | .def("__sub__", &sub<T>) |
| 579 | .def("__sub__", &subtractL<T>) |
| 580 | .def("__sub__", &subtractLT<T>) |
| 581 | .def("__rsub__", &subtractR<T>) |
| 582 | .def("__rsub__", &subtractRT<T>) |
| 583 | .def("__neg__", &neg<T>) |
| 584 | .def("negate",&negate<T>,return_internal_reference<>(),"component-wise multiplication by -1") |
| 585 | .def("__imul__", &imul<T>,return_internal_reference<>()) |
| 586 | .def("__imul__", &imulT<T>,return_internal_reference<>()) |
| 587 | .def("__mul__", &mul<T>) |
| 588 | .def("__mul__", &mulT<T>) |
| 589 | .def("__rmul__", &rmulT<T>) |
| 590 | .def("__mul__", &mulTuple<T>) |
| 591 | .def("__rmul__", &mulTuple<T>) |
| 592 | .def("__idiv__", &idiv<T>,return_internal_reference<>()) |
| 593 | .def("__idiv__", &idivT<T>,return_internal_reference<>()) |
| 594 | .def("__itruediv__", &idiv<T>,return_internal_reference<>()) |
| 595 | .def("__itruediv__", &idivT<T>,return_internal_reference<>()) |
| 596 | .def("__div__", &div<T>) |
| 597 | .def("__div__", &divT<T>) |
| 598 | .def("__div__", &divTupleL<T>) |
| 599 | .def("__truediv__", &div<T>) |
| 600 | .def("__truediv__", &divT<T>) |
| 601 | .def("__truediv__", &divTupleL<T>) |
| 602 | .def("__rdiv__", &divTupleR<T>) |
nothing calls this directly
no outgoing calls
no test coverage detected