// Copyright (C) 2002-2003 Gideon May (gideon@computer.org) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice updateears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice updateears 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 #include #include #include #include #include "held_ptr.hpp" using namespace boost::python; namespace PyOSGUtil { void init_SceneView2(class_, bases, boost::noncopyable > & sceneview) { sceneview .def("setComputeNearFarMode", &osgUtil::SceneView::setComputeNearFarMode, "Set the ComputeNearFarMode for the CullVisitor to use.\n"); sceneview .def("getComputeNearFarMode", &osgUtil::SceneView::getComputeNearFarMode, "Get the ComputeNearFarMode.\n"); sceneview .def("setFusionDistance", &osgUtil::SceneView::setFusionDistance, "Set the FusionDistanceMode and Value. Note, is used only when working in stereo.\n"); sceneview .def("getFusionDistanceMode", &osgUtil::SceneView::getFusionDistanceMode, "Get the FusionDistanceMode.\n"); sceneview .def("getFusionDistanceValue", &osgUtil::SceneView::getFusionDistanceValue, "Get the FusionDistanceValue. Note, only used for USE_FUSION_DISTANCE_VALUE & PROPORTIONAL_TO_SCREEN_DISTANCE modes.\n"); sceneview .def("setPrioritizeTextures", &osgUtil::SceneView::setPrioritizeTextures, "set whether the draw method should call renderer->prioritizeTexture.\n"); sceneview .def("getPrioritizeTextures", &osgUtil::SceneView::getPrioritizeTextures, "get whether the draw method should call renderer->prioritizeTexture.\n"); sceneview .def("projectWindowIntoObject", &osgUtil::SceneView::projectWindowIntoObject, "Calculate, via glUnProject, the object coordinates of a window point.\n" "Note, current implementation requires that SceneView::draw() has been previously called\n" "for projectWindowIntoObject to produce valid values. Consistent with OpenGL\n" "windows coordinates are calculated relative to the bottom left of the window.\n" "Returns true on successful projection.\n"); sceneview .def("projectWindowXYIntoObject", &osgUtil::SceneView::projectWindowXYIntoObject, "Calculate, via glUnProject, the object coordinates of a window x,y\n" "when projected onto the near and far planes.\n" "Note, current implementation requires that SceneView::draw() has been previously called\n" "for projectWindowIntoObject to produce valid values. Consistent with OpenGL\n" "windows coordinates are calculated relative to the bottom left of the window.\n" "Returns true on successful projection.\n"); sceneview .def("projectObjectIntoWindow", &osgUtil::SceneView::projectObjectIntoWindow, "Calculate, via glProject, the object coordinates of a window.\n" "Note, current implementation requires that SceneView::draw() has been previously called\n" "for projectWindowIntoObject to produce valid values. Consistent with OpenGL\n" "windows coordinates are calculated relative to the bottom left of the window,\n" "whereas as window API's normally have the top left as the origin,\n" "so you may need to pass in (mouseX,window_height-mouseY,...).\n" "Returns true on successful projection.\n"); sceneview .def("setFrameStamp", &osgUtil::SceneView::setFrameStamp, "Set the frame stamp for the current frame.\n"); sceneview .def("getFrameStamp", &osgUtil::SceneView::getFrameStamp, "Set the frame stamp for the current frame.\n", return_internal_reference<>()); sceneview .def("init", &osgUtil::SceneView::init, "Do init traversal of attached scene graph using Init NodeVisitor.\n" "The init traversal is called once for each SceneView, and should\n" "be used to compile display list, texture objects intialize data\n" "not otherwise intializaed during scene graph loading. Note, is\n" "called automatically by update&cull if it hasn't already been called\n" "elsewhere. Also init() should only ever be called within a valid\n" "graphics context.\n"); sceneview .def("update", &osgUtil::SceneView::update, "Do update traversal of attached scene graph using Update NodeVisitor.\n"); sceneview .def("cull", &osgUtil::SceneView::cull, "Do cull traversal of attached scene graph using Cull NodeVisitor.\n"); sceneview .def("draw", &osgUtil::SceneView::draw, "Do draw traversal of draw bins generated by cull traversal.\n"); sceneview .def("setCullingMode", &osgUtil::SceneView::setCullingMode, "Set the culling mode for the CullVisitor to use.\n") .def("getCullingMode", &osgUtil::SceneView::getCullingMode, "Returns the current CullingMode.\n"); } }