// 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 "held_ptr.hpp" using namespace boost::python; namespace { osgGA::KeySwitchMatrixManipulator * asKeySwitchMatrixManipulator(osgGA::MatrixManipulator * self) { return dynamic_cast(self); } } namespace PyOSG { void init_KeySwitchMatrixManipulator() { // register_castStateAttribute("asKeySwitchMatrixManipulator", &asKeySwitchMatrixManipulator); class_, bases, boost::noncopyable> keyswitchmatrixmanipulator("KeySwitchMatrixManipulator", no_init); scope keyswitchmatrixmanipulator_scope(keyswitchmatrixmanipulator); keyswitchmatrixmanipulator .def("setHomePosition",&osgGA::KeySwitchMatrixManipulator::setHomePosition) .def("setAutoComputeHomePosition",&osgGA::KeySwitchMatrixManipulator::setAutoComputeHomePosition) .def("computeHomePosition",&osgGA::KeySwitchMatrixManipulator::computeHomePosition) .def("getFusionDistanceMode",&osgGA::KeySwitchMatrixManipulator::getFusionDistanceMode) .def("getFusionDistanceValue",&osgGA::KeySwitchMatrixManipulator::getFusionDistanceValue) .def("getCurrentMatrixManipulator", (osgGA::MatrixManipulator * (osgGA::KeySwitchMatrixManipulator:: *)()) &osgGA::KeySwitchMatrixManipulator::getCurrentMatrixManipulator,return_internal_reference<>()) ; /** KeySwitchMatrixManipulator is an abstract base class defining the interface, and a certain amount of default functionality, for classes which wish to control OSG cameras in response to GUI events. */ } } // namespace PyOSG