// 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. #ifdef __USE_OSX_IMPLEMENTATION__ #include #include "missing.hpp" #include #undef check #endif #include #include #include #include #include "producer_ptr.hpp" #include #include #include using namespace boost::python; namespace PyProd { void init_CameraGroup() { class_, bases, boost::noncopyable> camera_group("CameraGroup", no_init); camera_group .def(init<>()) .def(init()) .def("setStackSize", &Producer::CameraGroup::setStackSize) #if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 2)) .def("getCameraConfig", (Producer::CameraConfig * (Producer::CameraGroup::*)()) &Producer::CameraGroup::getCameraConfig, return_internal_reference<>()) #endif .def("realize", (bool (Producer::CameraGroup::*)(void)) &Producer::CameraGroup::realize, "realize implementation") #if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 2)) .def("realize", (bool (Producer::CameraGroup::*)(Producer::CameraGroup::ThreadingModel)) &Producer::CameraGroup::realize, "realize implementation") #else .def("realize", (bool (Producer::CameraGroup::*)(Producer::CameraGroup::ThreadModel)) &Producer::CameraGroup::realize, "realize implementation") #endif .def("isRealized", &Producer::CameraGroup::isRealized) .def("waitForRealize", &Producer::CameraGroup::waitForRealize) .def("validForRendering", &Producer::CameraGroup::validForRendering) .def("getCamera", (Producer::Camera *(Producer::CameraGroup::*)(int)) &Producer::CameraGroup::getCamera, return_internal_reference<>()) .def("setViewByMatrix", &Producer::CameraGroup::setViewByMatrix) ; scope camera_group_scope(camera_group); # define ENUM_THREADING(VALUE) \ (threading.value(#VALUE, Producer::CameraGroup::VALUE), \ camera_group.def(#VALUE, object(Producer::CameraGroup::VALUE))) #if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 2)) enum_ threading("ThreadingModel"); #else enum_ threading("ThreadModel"); #endif ENUM_THREADING(SingleThreaded); ENUM_THREADING(ThreadPerRenderSurface); ENUM_THREADING(ThreadPerCamera); } }