// Copyright (C) 2002-2005 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 #include "held_ptr.hpp" #include "Math.hpp" using namespace boost::python; namespace PyOSG { tuple getHoleList(osg::ConvexPlanarOccluder& self) { list hlist; osg::ConvexPlanarOccluder::HoleList::iterator hiter; for (hiter = self.getHoleList().begin(); hiter < self.getHoleList().end(); hiter++) { hlist.append(object(*hiter)); } return tuple(hlist); } void init_ConvexPlanarOccluder() { class_, bases, boost::noncopyable>("ConvexPlanarOccluder", "A class for representing convex clipping volumes made up." "When adding planes, their normals should point inwards (into the volume)", no_init ) .def(init<>()) .def("setOccluder", &osg::ConvexPlanarOccluder::setOccluder) .def("getOccluder", (osg::ConvexPlanarPolygon& (osg::ConvexPlanarOccluder::*)()) &osg::ConvexPlanarOccluder::getOccluder, return_internal_reference<>()) .def("addHole", &osg::ConvexPlanarOccluder::addHole) .def("getHoleList", &getHoleList) ; } } // namespace PyOSG