// Copyright (C) 2002-2003 Gideon May (gideon@computer.org) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. #include #include #include #include #include #include #include #include using namespace boost::python; namespace { tuple getVertexList(osg::ConvexPlanarPolygon * self) { list vlist; osg::ConvexPlanarPolygon::VertexList::iterator viter; for (viter = self->getVertexList().begin() ; viter < self->getVertexList().end(); viter++) { vlist.append(make_tuple((*viter)[0], (*viter)[1], (*viter)[2])); } return tuple(vlist); } } namespace PyOSG { void init_ConvexPlanarPolygon() { class_("ConvexPlanarPolygon", "A class for representing convex clipping volumes made up." "When adding planes, their normals should point inwards (into the volume) */" ) .def(init<>()) .def("add", &osg::ConvexPlanarPolygon::add) .def("getVertexList", &getVertexList) ; } }