@@ -77,7 +77,30 @@ void define_qcc_db(py::module &m)
7777 * qCC_db
7878 **********************************/
7979
80- py::class_<ccColor::Rgba>(m, " Rgba" );
80+ py::class_<ccColor::Rgba>(m, " Rgba" , R"doc(
81+ RGBA color structure
82+ )doc" )
83+ .def (py::init<>(), R"doc( Inits color to (0,0,0, 0))doc" )
84+ .def (py::init<ColorCompType, ColorCompType, ColorCompType, ColorCompType>(),
85+ " r" _a,
86+ " g" _a,
87+ " b" _a,
88+ " a" _a)
89+ .def_readwrite (" r" , &ccColor::Rgba::r)
90+ .def_readwrite (" g" , &ccColor::Rgba::g)
91+ .def_readwrite (" b" , &ccColor::Rgba::b)
92+ .def_readwrite (" a" , &ccColor::Rgba::a)
93+ .def (" __ne__" , &ccColor::Rgba::operator !=);
94+
95+ py::class_<ccColor::Rgb>(m, " Rgb" , R"doc(
96+ RGB color structure
97+ )doc" )
98+ .def (py::init<>(), R"doc( Inits color to (0,0,0))doc" )
99+ .def (py::init<ColorCompType, ColorCompType, ColorCompType>(), " r" _a, " g" _a, " b" _a)
100+ .def_readwrite (" r" , &ccColor::Rgb::r)
101+ .def_readwrite (" g" , &ccColor::Rgb::g)
102+ .def_readwrite (" b" , &ccColor::Rgb::b)
103+ .def (" __ne__" , &ccColor::Rgb::operator !=);
81104
82105 define_ccScalarField (m);
83106 define_ccGLMatrix (m);
0 commit comments