// 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 "held_ptr.hpp" using namespace boost::python; namespace PyOSGSim { void init_OverlayNode() { class_, bases > overlaynode("OverlayNode", no_init); overlaynode.def(init<>()); overlaynode.def("setOverlaySubgraph", &osgSim::OverlayNode::setOverlaySubgraph); /** Set the overlay subgraph which will be rendered to texture.*/ overlaynode.def("getOverlaySubgraph", (osg::Node* (osgSim::OverlayNode::*)()) &osgSim::OverlayNode::getOverlaySubgraph, return_value_policy()); /** Get the overlay subgraph which will be rendered to texture.*/ overlaynode.def("dirtyOverlayTexture", &osgSim::OverlayNode::dirtyOverlayTexture); /** Inform the OverlayNode that the overlay texture needs to be updated.*/ #if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) overlaynode.def("setContinousUpdate", &osgSim::OverlayNode::setContinousUpdate); /** Set whether the OverlayNode should update the overlay texture on every frame.*/ overlaynode.def("getContinousUpdate", &osgSim::OverlayNode::getContinousUpdate); /** Get whether the OverlayNode should update the overlay texture on every frame.*/ #else overlaynode.def("setContinuousUpdate", &osgSim::OverlayNode::setContinuousUpdate); /** Set whether the OverlayNode should update the overlay texture on every frame.*/ overlaynode.def("getContinuousUpdate", &osgSim::OverlayNode::getContinuousUpdate); /** Get whether the OverlayNode should update the overlay texture on every frame.*/ #endif overlaynode.def("setOverlayClearColor", &osgSim::OverlayNode::setOverlayClearColor); /** Set the clear color to use when rendering the overlay subgraph.*/ overlaynode.def("getOverlayClearColor", &osgSim::OverlayNode::getOverlayClearColor, return_value_policy()); /** Get the clear color to use when rendering the overlay subgraph.*/ overlaynode.def("setTexEnvMode", &osgSim::OverlayNode::setTexEnvMode); /** Set the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/ overlaynode.def("getTexEnvMode", &osgSim::OverlayNode::getTexEnvMode); /** Get the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/ overlaynode.def("setOverlayTextureUnit", &osgSim::OverlayNode::setOverlayTextureUnit); /** Set the texture unit that the texture should be assigned to.*/ overlaynode.def("getOverlayTextureUnit", &osgSim::OverlayNode::getOverlayTextureUnit); /** Get the texture unit that the texture should be assigned to.*/ overlaynode.def("setOverlayTextureSizeHint", &osgSim::OverlayNode::setOverlayTextureSizeHint); /** Set the texture size hint. The size hint is used to request a texture of specified size.*/ overlaynode.def("getOverlayTextureSizeHint", &osgSim::OverlayNode::getOverlayTextureSizeHint); /** Get the texture size hint.*/ overlaynode.def("getCamera", (osg::CameraNode* (osgSim::OverlayNode::*)()) &osgSim::OverlayNode::getCamera, return_value_policy()); /** Get the camera used to implement the render to texture of the overlay subgraph.*/ // overlaynode.def("addOverlay",&osgSim::OverlayNode::addOverlay); } }