/* -*- Base: 10 ; Mode: C++ -*- */ /*------------------------------------------------------------------------ ** FOST project ** -------------------------------------------------------------------------- -------------------------------------------------------------------------- FILE LOG $Revision: 1.3 $ $Date: 2012-06-15 13:04:42 $ -------------------------------------------------------------------------- CREATION V.SAC SUMMARY DESCRIPTION The main function performs the following actions : ------------------------------------------------------------------------*/ /** */ //============================================================================= // Include section //============================================================================= // Standard libraries include files //----------------------------------------------------------------------------- #include // Include oriented definitions //----------------------------------------------------------------------------- // Module Kernel include files //----------------------------------------------------------------------------- #include "DicError.hh" #include "AMDA_exception.hh" #include "ServicesServer.hh" #include "PluginManager.hh" #include "CurveFunctionWriter.hh" #include "Boundaries.hh" #include using namespace AMDA::Parameters; using namespace plot; // Other modules include files //----------------------------------------------------------------------------- /** * @details This procedure return the curve definition of a circle. */ void circle(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList) { //radius double radius = 1.; CurveFunctionWriter::AttributeList::iterator lradiusIt = pAttributeList.find("radius"); if ( lradiusIt != pAttributeList.end()) radius = lradiusIt->second; for (int i = 0; i < precision; ++i) { CurveFunctionWriter::CurvePoint point; double theta = (2. * M_PI) * (double)(((double)i) / precision); point.x = radius * cos(theta); point.y = radius * sin(theta); point.z = radius * cos(theta); // std::cout << "BRE - " << point.x << " - " << point.y << " - " << point.z << std::endl; curvePointList.push_back(point); } } //============================================================================= // Methods of Class AMDAPlugin //============================================================================= /** Retrieve the Plugin version we're going to expect */ extern "C" const char* getPluginVersion() { return "(Version)"; } /** Tells us to register our functionality to an engine kernel */ extern "C" void registerPlugin(AMDA::Plugins::PluginManager & /*pm*/) { ServicesServer::getInstance()->addServiceImpl("bowshock",&bowshock); ServicesServer::getInstance()->addServiceImpl("bowshock_farris",&bowshock_farris); // Elena TBD : id in plotCurves.xml acts as function name - to change Request generation procedure ServicesServer::getInstance()->addServiceImpl("mars_bowshock",&bowshock); ServicesServer::getInstance()->addServiceImpl("mars_bowshock_hall",&bowshock); ServicesServer::getInstance()->addServiceImpl("venus_bowshock",&bowshock); ServicesServer::getInstance()->addServiceImpl("mercury_bowshock",&bowshock); ServicesServer::getInstance()->addServiceImpl("saturn_bowshock_went",&saturn_bowshock_went); ServicesServer::getInstance()->addServiceImpl("jupiter_bowshock_high",&bowshock1); ServicesServer::getInstance()->addServiceImpl("jupiter_bowshock_low",&bowshock1); ServicesServer::getInstance()->addServiceImpl("jupiter_magnetopause_high",&bowshock1); ServicesServer::getInstance()->addServiceImpl("jupiter_magnetopause_low",&bowshock1); ServicesServer::getInstance()->addServiceImpl("venus_magnetopause",&venus_magnetopause); ServicesServer::getInstance()->addServiceImpl("mars_magnetopause",&mars_magnetopause); ServicesServer::getInstance()->addServiceImpl("mercury_magnetopause",&mercury_magnetopause); ServicesServer::getInstance()->addServiceImpl("saturn_magnetopause",&saturn_magnetopause); ServicesServer::getInstance()->addServiceImpl("magnetopause_shue",&magnetopause_shue); ServicesServer::getInstance()->addServiceImpl("circle",&circle); }