/*************************************************************************** graphics_mod.cpp - description ------------------- begin : Tue Oct 7 12:49:50 2008 copyright : (C) 1999-2008 by Cavalli Andrea email : cavalli@bioc.unizh.ch **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include using namespace Almost; template<> inline string to_string(const TachyonDevice & d ){ return ""; } template<> inline string to_string(const GFXSphere & d ){ return ""; } extern "C" { void init_graphics(){ //declarations here Module mod = Module("graphics","Provides classes and functions to render geometrical objects"); Class >(mod.self(),"tachyon") .def_method("draw",&TachyonDevice::draw) .def_method("add_sphere",&TachyonDevice::add_item) ; Class(mod.self(),"sphere") .def_method("set_color",&GFXSphere::set_color) .def_method("set_ambient",&GFXSphere::set_ambient) .def_method("set_diffuse",&GFXSphere::set_diffuse) .def_method("set_specular",&GFXSphere::set_specular) .def_method("set_opacity",&GFXSphere::set_opacity) .def_method("set_geometry",&GFXSphere::set_geometry) ; } }