// Copyright (C) 2002-2003 Brett Hartshorn (bhartsho@yahoo.com) // // 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 using namespace boost::python; namespace PyOSG { void init_Polytope() { class_ polytope("Polytope"); polytope .def(init<>()) .def(init()) .def("clear", &osg::Polytope::clear) .def("setToUnitFrustum", &osg::Polytope::setToUnitFrustum) .def("setAndTransformProvidingInverse", &osg::Polytope::setAndTransformProvidingInverse) .def("set", &osg::Polytope::set) .def("add", &osg::Polytope::add) .def("flip", &osg::Polytope::flip) .def("setupMask", &osg::Polytope::setupMask) .def("pushCurrentMask", &osg::Polytope::pushCurrentMask) .def("popCurrentMask", &osg::Polytope::popCurrentMask) .def("contains", (bool (osg::Polytope::*)(const osg::Vec3&) const) &osg::Polytope::contains) .def("contains", (bool (osg::Polytope::*)(const std::vector&)) &osg::Polytope::contains) .def("contains", (bool (osg::Polytope::*)(const osg::BoundingSphere&)) &osg::Polytope::contains) .def("contains", (bool (osg::Polytope::*)(const osg::BoundingBox&)) &osg::Polytope::contains) .def("containsAllOf", (bool (osg::Polytope::*)(const std::vector&)) &osg::Polytope::containsAllOf) .def("containsAllOf", (bool (osg::Polytope::*)(const osg::BoundingSphere&)) &osg::Polytope::containsAllOf) .def("containsAllOf", (bool (osg::Polytope::*)(const osg::BoundingBox&)) &osg::Polytope::containsAllOf) .def("transform", &osg::Polytope::transform) .def("transformProvidingInverse", &osg::Polytope::transformProvidingInverse) ; } } // namespace PyOSG