// 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 #include #include #include #include #include "held_ptr.hpp" #include "Math.hpp" using namespace boost::python; namespace PyOSG { extern void init_Shape2(); extern void init_Shape3(); void init_Shape() { class_, bases, boost::noncopyable> shape("Shape", no_init); // Sphere class_, bases, boost::noncopyable> sphere("Sphere", no_init); sphere.def(init<>()); sphere.def(init()); sphere.def("valid", &osg::Sphere::valid); sphere.def("set", &osg::Sphere::set); sphere.def("setCenter", &osg::Sphere::setCenter); sphere.def("getCenter", &osg::Sphere::getCenter, return_value_policy()); sphere.def("setRadius", &osg::Sphere::setRadius); sphere.def("getRadius", &osg::Sphere::getRadius); // Box class_, bases, boost::noncopyable> box("Box", no_init); box.def(init<>()); box.def(init()); box.def(init()); box.def("valid", &osg::Box::valid); box.def("set", &osg::Box::set); box.def("setCenter", &osg::Box::setCenter); box.def("getCenter", &osg::Box::getCenter, return_value_policy()); box.def("setHalfLengths", &osg::Box::setHalfLengths); box.def("getHalfLengths", &osg::Box::getHalfLengths, return_value_policy()); box.def("setRotation", &osg::Box::setRotation); box.def("getRotation", &osg::Box::getRotation, return_value_policy()); box.def("computeRotationMatrix", &osg::Box::computeRotationMatrix); box.def("zeroRotation", &osg::Box::zeroRotation); init_Shape2(); init_Shape3(); } }