// 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 "held_ptr.hpp" #include "Math.hpp" using namespace boost::python; namespace PyOSG { void init_Shape2() { // Cone class_, bases, boost::noncopyable> cone("Cone", no_init); cone.def(init<>()); cone.def(init()); cone.def("valid", &osg::Cone::valid); cone.def("set", &osg::Cone::set); cone.def("setCenter", &osg::Cone::setCenter); cone.def("getCenter", &osg::Cone::getCenter, return_value_policy()); cone.def("setRadius", &osg::Cone::setRadius); cone.def("getRadius", &osg::Cone::getRadius); cone.def("setHeight", &osg::Cone::setHeight); cone.def("getHeight", &osg::Cone::getHeight); cone.def("setRotation", &osg::Cone::setRotation); cone.def("getRotation", &osg::Cone::getRotation, return_value_policy()); cone.def("computeRotationMatrix", &osg::Cone::computeRotationMatrix); cone.def("zeroRotation", &osg::Cone::zeroRotation); cone.def("getBaseOffsetFactor", &osg::Cone::getBaseOffsetFactor); cone.def("getBaseOffset", &osg::Cone::getBaseOffset); // Cylinder class_, bases, boost::noncopyable> cylinder("Cylinder", no_init); cylinder.def(init<>()); cylinder.def(init()); cylinder.def("valid", &osg::Cylinder::valid); cylinder.def("set", &osg::Cylinder::set); cylinder.def("setCenter", &osg::Cylinder::setCenter); cylinder.def("getCenter", &osg::Cylinder::getCenter, return_value_policy()); cylinder.def("setRadius", &osg::Cylinder::setRadius); cylinder.def("getRadius", &osg::Cylinder::getRadius); cylinder.def("setRotation", &osg::Cylinder::setRotation); cylinder.def("getRotation", &osg::Cylinder::getRotation, return_value_policy()); cylinder.def("computeRotationMatrix", &osg::Cylinder::computeRotationMatrix); cylinder.def("zeroRotation", &osg::Cylinder::zeroRotation); // Capsule class_, bases, boost::noncopyable> capsule("Capsule", no_init); capsule.def(init<>()); capsule.def(init()); capsule.def("valid", &osg::Capsule::valid); capsule.def("set", &osg::Capsule::set); capsule.def("setCenter", &osg::Capsule::setCenter); capsule.def("getCenter", &osg::Capsule::getCenter, return_value_policy()); capsule.def("setRadius", &osg::Capsule::setRadius); capsule.def("getRadius", &osg::Capsule::getRadius); capsule.def("setHeight", &osg::Capsule::setHeight); capsule.def("getHeight", &osg::Capsule::getHeight); capsule.def("setRotation", &osg::Capsule::setRotation); capsule.def("getRotation", &osg::Capsule::getRotation, return_value_policy()); capsule.def("computeRotationMatrix", &osg::Capsule::computeRotationMatrix); capsule.def("zeroRotation", &osg::Capsule::zeroRotation); } }