diff --git a/applications/plugins/CMakeLists.txt b/applications/plugins/CMakeLists.txt index cfd74c7f771..56af63924fc 100644 --- a/applications/plugins/CMakeLists.txt +++ b/applications/plugins/CMakeLists.txt @@ -25,7 +25,6 @@ sofa_add_subdirectory(directory SofaPython3 SofaPython3 EXTERNAL GIT_REF master) sofa_add_subdirectory(plugin CGALPlugin CGALPlugin EXTERNAL GIT_REF master) # Depends on image sofa_add_subdirectory(plugin Registration Registration EXTERNAL GIT_REF master) # Depends on image, SofaPython, SofaGui and SofaDistanceGrid sofa_add_subdirectory(plugin BulletCollisionDetection BulletCollisionDetection) # Depends on Compliant and LMConstraint -sofa_add_subdirectory(plugin InvertibleFVM InvertibleFVM EXTERNAL GIT_REF master) sofa_add_subdirectory(plugin MeshSTEPLoader MeshSTEPLoader EXTERNAL GIT_REF master) sofa_add_subdirectory(plugin PluginExample PluginExample EXTERNAL GIT_REF master) sofa_add_subdirectory(plugin ManifoldTopologies ManifoldTopologies EXTERNAL GIT_REF master) @@ -35,7 +34,6 @@ sofa_add_subdirectory(plugin Xitact Xitact) sofa_add_subdirectory(plugin Haption Haption) sofa_add_subdirectory(plugin PersistentContact PersistentContact) sofa_add_subdirectory(plugin Sensable Sensable) -sofa_add_subdirectory(plugin SensableEmulation SensableEmulation) sofa_add_subdirectory(plugin SofaHAPI SofaHAPI) sofa_add_subdirectory(plugin SofaCarving SofaCarving) sofa_add_subdirectory(plugin LeapMotion LeapMotion) @@ -66,10 +64,9 @@ sofa_add_subdirectory(plugin SofaCUDA SofaCUDA) sofa_find_package(Sofa.GL QUIET) if(Sofa.GL_FOUND) - sofa_add_subdirectory(plugin SofaSimpleGUI SofaSimpleGUI) # SofaSimpleGUI plugin can't work without OPENGL sofa_add_subdirectory(plugin VolumetricRendering VolumetricRendering) # VolumetricRendering plugin can't work without OPENGL else() - message("Sofa.GL not found; disabling SofaSimpleGUI and VolumetricRendering plugins") + message("Sofa.GL not found; disabling VolumetricRendering plugin") endif() sofa_add_subdirectory(plugin SofaDistanceGrid SofaDistanceGrid) # Also defines SofaDistanceGrid.CUDA diff --git a/applications/plugins/InvertibleFVM/ExternalProjectConfig.cmake.in b/applications/plugins/InvertibleFVM/ExternalProjectConfig.cmake.in deleted file mode 100644 index 3ae32c83c66..00000000000 --- a/applications/plugins/InvertibleFVM/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(InvertibleFVM - GIT_REPOSITORY https://github.com/sofa-framework/InvertibleFVM - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/InvertibleFVM" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SensableEmulation/CMakeLists.txt b/applications/plugins/SensableEmulation/CMakeLists.txt deleted file mode 100644 index 33002d04038..00000000000 --- a/applications/plugins/SensableEmulation/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -cmake_minimum_required(VERSION 3.22) -project(SensableEmulation) - - -set(HEADER_FILES - OmniDriverEmu.h - config.h -) - -set(SOURCE_FILES - OmniDriverEmu.cpp - initSensableEmulation.cpp -) - -set(README_FILES PluginSensableEmulation.txt) - -find_package(Sofa.Config REQUIRED) -sofa_find_package(Sofa.Component.Haptics REQUIRED) -sofa_find_package(Sofa.Component.Controller REQUIRED) -sofa_find_package(Sofa.GL.Component.Rendering3D REQUIRED) -sofa_find_package(Boost COMPONENTS thread REQUIRED) - -include_directories(${Boost_INCLUDE_DIRS}) - -add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${README_FILES}) -set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_SENSABLEEMULATIONPLUGIN") -target_link_libraries(${PROJECT_NAME} Sofa.Component.Haptics Sofa.Component.Controller Sofa.GL.Component.Rendering3D Boost::thread) - -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..") - -# Seems to be required by boost::asio -if(UNIX) - target_link_libraries(${PROJECT_NAME} pthread) -endif() - -install(TARGETS ${PROJECT_NAME} - COMPONENT SensableEmulation_libraries - EXPORT SensableEmulationTargets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -install(DIRECTORY examples/ DESTINATION share/sofa/plugins/${PROJECT_NAME}) diff --git a/applications/plugins/SensableEmulation/NewOmniDriverEmu.cpp b/applications/plugins/SensableEmulation/NewOmniDriverEmu.cpp deleted file mode 100644 index 95c5d1065b5..00000000000 --- a/applications/plugins/SensableEmulation/NewOmniDriverEmu.cpp +++ /dev/null @@ -1,547 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ - -#include "NewOmniDriverEmu.h" - -#include -#include -#include -// -////force feedback -#include -#include -// -#include -#include - -#include -// -#include -#include - -#include -#include -#include -#include -//sensable namespace -#include -#include - - - -double prevTime; - -namespace sofa -{ - -namespace component -{ - -namespace controller -{ - -using namespace sofa::defaulttype; -using namespace core::behavior; -using namespace sofa::defaulttype; - -NewOmniDriverEmu::NewOmniDriverEmu() - : forceScale(initData(&forceScale, 1.0, "forceScale","Default scaling factor applied to the force feedback")) - , scale(initData(&scale, 1.0, "scale","Default scale applied to the Phantom Coordinates. ")) - , positionBase(initData(&positionBase, Vec3d(0,0,0), "positionBase","Position of the interface base in the scene world coordinates")) - , orientationBase(initData(&orientationBase, Quat(0,0,0,1), "orientationBase","Orientation of the interface base in the scene world coordinates")) - , positionTool(initData(&positionTool, Vec3d(0,0,0), "positionTool","Position of the tool in the omni end effector frame")) - , orientationTool(initData(&orientationTool, Quat(0,0,0,1), "orientationTool","Orientation of the tool in the omni end effector frame")) - , permanent(initData(&permanent, false, "permanent" , "Apply the force feedback permanently")) - , omniVisu(initData(&omniVisu, false, "omniVisu", "Visualize the position of the interface in the virtual scene")) - , simuFreq(initData(&simuFreq, 1000, "simuFreq", "frequency of the \"simulated Omni\"")) - , simulateTranslation(initData(&simulateTranslation, false, "simulateTranslation", "do very naive \"translation simulation\" of omni, with constant orientation <0 0 0 1>")) - , trajPts(initData(&trajPts, "trajPoints","Trajectory positions")) - , trajTim(initData(&trajTim, "trajTiming","Trajectory timing")) - , visu_base(NULL) - , visu_end(NULL) -{ - - this->f_listening.setValue(true); - data.forceFeedback = new NullForceFeedback(); - noDevice = false; - moveOmniBase = false; - executeAsynchro = false; - omniSimThreadCreated = false; -} - -NewOmniDriverEmu::~NewOmniDriverEmu() -{ - if (visu_base) - { - delete visu_base; - } - if (visu_end) - { - delete visu_end; - } - -} - -void NewOmniDriverEmu::cleanup() -{ - sout << "NewOmniDriverEmu::cleanup()" << sendl; -} - -void NewOmniDriverEmu::init() -{ - std::cout << "[NewOmniEmu] init" << endl; -} - -void *hapticSimuExecute( void *ptr ) -{ - - NewOmniDriverEmu *omniDrv = (NewOmniDriverEmu*)ptr; - double timeScale = 1.0 / (double)CTime::getTicksPerSec(); - double startTime, endTime, totalTime, realTimePrev = -1.0, realTimeAct; - double requiredTime = 1.0/double(omniDrv->simuFreq.getValue()) * 1.0/timeScale; // [us] - double timeCorrection = 0.1 * requiredTime; - int timeToSleep; - - // construct the "trajectory" - NewOmniDriverEmu::VecCoord pts = omniDrv->trajPts.getValue(); - unsigned int numPts = pts.size(); - type::vector tmg = omniDrv->trajTim.getValue(); - unsigned int numSegs = tmg.size(); - double stepTime = 1.0/omniDrv->simuFreq.getValue(); - - if (numSegs != (2*numPts - 1)) - { - std::cerr << "Bad trajectory specification " << std::endl; - return(0); - } - NewOmniDriverEmu::VecCoord stepDiff; - type::vector stepNum; - - unsigned int seg = 0; - for (unsigned int np = 0; np < numPts; np++) - { - //for the point - unsigned int n = tmg[seg]*omniDrv->simuFreq.getValue(); - stepNum.push_back(n); - cout << "N pts = " << n << endl; - NewOmniDriverEmu::Coord crd; - cout << " adding " << crd << endl; - stepDiff.push_back(crd); - - //for the line - if (np < numPts-1) - { - seg++; - n = tmg[seg]*omniDrv->simuFreq.getValue(); - cout << "N lin = " << n << endl; - stepNum.push_back(n); - Vec3d dx = (pts[np+1].getCenter() - pts[np].getCenter())/double(n); - type::Quat dor; ///TODO difference for rotations!!! - NewOmniDriverEmu::Coord crd(dx, dor); - cout << "adding " << crd << endl; - stepDiff.push_back(crd); - } - seg++; - } - - std::cout << " stepNum = " << stepNum << std::endl; - std::cout << " stepDiff = " << stepDiff << std::endl; - - //trajectory done - - std::cout << "TimeScale = " << timeScale << std::endl; - - SolidTypes::SpatialVector temp1, temp2; - - long long unsigned asynchroStep=0; - double averageFreq = 0.0, minimalFreq=1e10; - - unsigned int actSeg = 0; - unsigned int actStep = 0; - - sofa::type::Quat actualRot; - sofa::type::Vec3d actualPos = pts[0].getCenter(); - - cout << "numSegs = " << numSegs << endl; - cout << "numSegs = " << numSegs << endl; - - while (true) - { - if (omniDrv->executeAsynchro) - { - startTime = double(omniDrv->thTimer->getTime()); - - //compute the actual position - if (actSeg < numSegs) - { - if (actStep < stepNum[actSeg]) - { - actualPos += stepDiff[actSeg].getCenter(); - //cout << "Adding [" << actStep << "] " << stepDiff[actSeg] << endl; - actStep++; - } - else - { - actStep=0; - actSeg++; - //cout << "Changing " << endl; - } - } - //else - // cout << "Finished" << endl; - - - omniDrv->data.servoDeviceData.pos = actualPos; - omniDrv->data.servoDeviceData.quat = actualRot; - SolidTypes::Transform baseOmni_H_endOmni(actualPos * omniDrv->data.scale, actualRot); - SolidTypes::Transform world_H_virtualTool = omniDrv->data.world_H_baseOmni * baseOmni_H_endOmni * omniDrv->data.endOmni_H_virtualTool; - - omniDrv->data.forceFeedback->computeWrench(world_H_virtualTool,temp1,temp2); - - realTimeAct = double(omniDrv->thTimer->getTime()); - if (asynchroStep > 0) - { - double realFreq = 1.0/( (realTimeAct - realTimePrev)*timeScale ); - averageFreq += realFreq; - //std::cout << "actual frequency = " << realFreq << std::endl; - if (realFreq < minimalFreq) - minimalFreq = realFreq; - - if ( ((asynchroStep+1) % 1000) == 0) - { - std::cout << "Average frequency of the loop = " << averageFreq/double(asynchroStep) << " Hz " << std::endl; - std::cout << "Minimal frequency of the loop = " << minimalFreq << " Hz " << std::endl; - } - } - - realTimePrev = realTimeAct; - asynchroStep++; - - endTime = double(omniDrv->thTimer->getTime()); //[s] - totalTime = (endTime - startTime); // [us] - timeToSleep = int( (requiredTime - totalTime) - timeCorrection); // [us] - if (timeToSleep > 0) - { - std::this_thread::sleep_for(std::chrono::microseconds(timeToSleep)); - } - else - { - std::cout << "Cannot achieve desired frequency, computation too slow: " << totalTime << std::endl; - } - - } - else - { - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - } - } -} - -void NewOmniDriverEmu::bwdInit() -{ - sout<<"NewOmniDriverEmu::bwdInit() is called"<(this->getContext()); // access to current node - ForceFeedback *ff = context->getTreeObject(); - - data.forceFeedback = ff; - - setDataValue(); - - if (!omniSimThreadCreated) - { - sout << "Not initializing phantom, starting emulating thread..." << sendl; - pthread_t hapSimuThread; - - if (thTimer == NULL) - thTimer = new(CTime); - - if ( pthread_create( &hapSimuThread, NULL, hapticSimuExecute, (void*)this) == 0 ) - { - sout << "Thread created for Omni simulation" << sendl; - omniSimThreadCreated=true; - } - } - else - sout << "Emulating thread already running" << sendl; -} - - -void NewOmniDriverEmu::setDataValue() -{ - data.scale = scale.getValue(); - data.forceScale = forceScale.getValue(); - Quat q = orientationBase.getValue(); - q.normalize(); - orientationBase.setValue(q); - data.world_H_baseOmni.set( positionBase.getValue(), q ); - q=orientationTool.getValue(); - q.normalize(); - data.endOmni_H_virtualTool.set(positionTool.getValue(), q); - data.permanent_feedback = permanent.getValue(); -} - -void NewOmniDriverEmu::reset() -{ - std::cout<<"NewOmniDriver::reset() is called" <reinit(); -} - -void NewOmniDriverEmu::reinitVisual() -{ - cout << "NewOmniDriver::reinitVisual() is called " << endl; - if(visu_base!=NULL) - { - cout << "visu_base = " << visu_base << endl; - delete(visu_base); - visu_base = new sofa::component::visualmodel::OglModel(); - visu_base->fileMesh.setValue("mesh/omni_test2.obj"); - visu_base->m_scale.setValue(type::Vector3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_end->setColor(1.0f,1.0f,1.0f,1.0f); - visu_base->init(); - visu_base->initVisual(); - visu_base->updateVisual(); - visu_base->applyRotation(orientationBase.getValue()); - visu_base->applyTranslation( positionBase.getValue()[0],positionBase.getValue()[1], positionBase.getValue()[2]); - - } - - if (visu_end != NULL) - { - //serr<<"create visual model for NewOmniDriver end"<m_scale.setValue(type::Vector3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_end->setColor(1.0f,0.3f,0.0f,1.0f); - visu_end->init(); - visu_end->initVisual(); - visu_end->updateVisual(); - } - - -} - -void NewOmniDriverEmu::reinit() -{ - std::cout<<"NewOmniDriver::reinit() is called" <cleanup(); - this->bwdInit(); - this->reinitVisual(); - std::cout<<"NewOmniDriver::reinit() done" <getRigidX(); - // x_rigid->resize(1); - //(*x_rigid)[0].getOrientation() = q; - //(*x_rigid)[0].getCenter() = positionBase.getValue(); - //double s = - //this->scale=Vector3(this->) - -} - -void NewOmniDriverEmu::draw() -{ - //cout << "NewOmniDriver::draw is called" << endl; - if(omniVisu.getValue()) - { - if (visu_base == NULL) - { - cout << "Creating visu_base" << endl; - // create visual object - //serr<<"create visual model for NewOmniDriver base"<fileMesh.setValue("mesh/omni_test2.obj"); - visu_base->m_scale.setValue(type::Vector3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_base->init(); - visu_base->initVisual(); - visu_base->updateVisual(); - visu_base->applyRotation(orientationBase.getValue()); - visu_base->applyTranslation( positionBase.getValue()[0],positionBase.getValue()[1], positionBase.getValue()[2]); - //getContext()->addObject(visu_base); - } - - - if (visu_end == NULL) - { - //serr<<"create visual model for NewOmniDriver end"<fileMesh.setValue("mesh/stylus.obj"); - visu_end->m_scale.setValue(type::Vector3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_end->setColor(1.0f,0.3f,0.0f,1.0f); - visu_end->init(); - visu_end->initVisual(); - visu_end->updateVisual(); - } - - // compute position of the endOmni in worldframe - SolidTypes::Transform baseOmni_H_endOmni(data.deviceData.pos*data.scale, data.deviceData.quat); - SolidTypes::Transform world_H_endOmni = data.world_H_baseOmni * baseOmni_H_endOmni ; - - - visu_end->xforms.resize(1); - (visu_end->xforms)[0].getOrientation() = world_H_endOmni.getOrientation(); - (visu_end->xforms)[0].getCenter() = world_H_endOmni.getOrigin(); - - // draw the 2 visual models - visu_base->drawVisual(); - visu_end->drawVisual(); - } -} - -void NewOmniDriverEmu::copyDeviceDataCallback(OmniData *pUserData) -{ - OmniData *data = pUserData; // static_cast(pUserData); - memcpy(&data->deviceData, &data->servoDeviceData, sizeof(DeviceData)); - data->servoDeviceData.nupdates = 0; - data->servoDeviceData.ready = true; -} - -void NewOmniDriverEmu::stopCallback(OmniData *pUserData) -{ - OmniData *data = pUserData; // static_cast(pUserData); - data->servoDeviceData.stop = true; -} - -void NewOmniDriverEmu::onKeyPressedEvent(core::objectmodel::KeypressedEvent *kpe) -{ - - - -} - -void NewOmniDriverEmu::onKeyReleasedEvent(core::objectmodel::KeyreleasedEvent *kre) -{ - - //omniVisu.setValue(false); - -} - -void NewOmniDriverEmu::handleEvent(core::objectmodel::Event *event) -{ - - //std::cout<<"NewEvent detected !!"<(event)) - { - //getData(); // copy data->servoDeviceData to gDeviceData - //if (!simulateTranslation.getValue()) { - copyDeviceDataCallback(&data); - if (data.deviceData.ready) - { - cout << "Data ready, event" << endl; - data.deviceData.quat.normalize(); - //sout << "driver is working ! " << data->servoDeviceData.transform[12+0] << endl; - - - /// COMPUTATION OF THE vituralTool 6D POSITION IN THE World COORDINATES - SolidTypes::Transform baseOmni_H_endOmni(data.deviceData.pos*data.scale, data.deviceData.quat); - SolidTypes::Transform world_H_virtualTool = data.world_H_baseOmni * baseOmni_H_endOmni * data.endOmni_H_virtualTool; - - - // store actual position of interface for the forcefeedback (as it will be used as soon as new LCP will be computed) - data.forceFeedback->setReferencePosition(world_H_virtualTool); - - /// TODO : SHOULD INCLUDE VELOCITY !! - sofa::core::objectmodel::HapticDeviceEvent omniEvent(data.deviceData.id, world_H_virtualTool.getOrigin(), world_H_virtualTool.getOrientation() , data.deviceData.m_buttonState); - - this->getContext()->propagateEvent(sofa::core::ExecParams::defaultInstance(), &omniEvent); - - if (moveOmniBase) - { - std::cout<<" new positionBase = "<applyTranslation(positionBase_buf[0] - positionBase.getValue()[0], - positionBase_buf[1] - positionBase.getValue()[1], - positionBase_buf[2] - positionBase.getValue()[2]); - positionBase.setValue(positionBase_buf); - setDataValue(); - //this->reinitVisual(); - } - executeAsynchro=true; - } - else - std::cout<<"data not ready"<(event)) - { - core::objectmodel::KeypressedEvent *kpe = dynamic_cast(event); - if (kpe->getKey()=='Z' ||kpe->getKey()=='z' ) - { - moveOmniBase = !moveOmniBase; - std::cout<<"key z detected "<cleanup(); - positionBase_buf = positionBase.getValue(); - - } - else - { - this->reinit(); - } - } - - if(kpe->getKey()=='K' || kpe->getKey()=='k') - { - positionBase_buf.x()=0.0; - positionBase_buf.y()=0.5; - positionBase_buf.z()=2.6; - } - - if(kpe->getKey()=='L' || kpe->getKey()=='l') - { - positionBase_buf.x()=-0.15; - positionBase_buf.y()=1.5; - positionBase_buf.z()=2.6; - } - - if(kpe->getKey()=='M' || kpe->getKey()=='m') - { - positionBase_buf.x()=0.0; - positionBase_buf.y()=2.5; - positionBase_buf.z()=2.6; - } - - - - } -} - -int NewOmniDriverEmuClass = core::RegisterObject("Solver to test compliance computation for new articulated system objects") - .add< NewOmniDriverEmu >(); - -} // namespace controller - -} // namespace component - -} // namespace sofa diff --git a/applications/plugins/SensableEmulation/NewOmniDriverEmu.h b/applications/plugins/SensableEmulation/NewOmniDriverEmu.h deleted file mode 100644 index c12a68bec9d..00000000000 --- a/applications/plugins/SensableEmulation/NewOmniDriverEmu.h +++ /dev/null @@ -1,162 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#ifndef SOFA_COMPONENT_CONTROLLER_OMNIEMU_H -#define SOFA_COMPONENT_CONTROLLER_OMNIEMU_H - -//Sensable include -#include -#include - -#include -#include -#include - -#include - -namespace sofa -{ -namespace simulation { class Node; } - -namespace component -{ -namespace visualModel { class OglModel; } - -namespace controller -{ - -class ForceFeedback; - - -using namespace sofa::defaulttype; -using namespace helper::system::thread; -using core::objectmodel::Data; - -/** Holds data retrieved from HDAPI. */ -typedef struct -{ - unsigned int id; - int nupdates; - int m_buttonState; /* Has the device button has been pressed. */ - //hduVector3Dd m_devicePosition; /* Current device coordinates. */ - //HDErrorInfo m_error; - Vec3d pos; - Quat quat; - bool ready; - bool stop; -} DeviceData; - -typedef struct -{ - ForceFeedback* forceFeedback; - simulation::Node *context; - - sofa::defaulttype::SolidTypes::Transform endOmni_H_virtualTool; - //Transform baseOmni_H_endOmni; - sofa::defaulttype::SolidTypes::Transform world_H_baseOmni; - double forceScale; - double scale; - bool permanent_feedback; - - // API OMNI // - DeviceData servoDeviceData; // for the haptic loop - DeviceData deviceData; // for the simulation loop - -} OmniData; - -/** -* Omni driver -*/ -class NewOmniDriverEmu : public Controller -{ - -public: - typedef Rigid3dTypes::Coord Coord; - typedef Rigid3dTypes::VecCoord VecCoord; - - SOFA_CLASS(NewOmniDriverEmu, Controller); - Data scale; ///< Default scale applied to the Phantom Coordinates. - Data forceScale; ///< Default scaling factor applied to the force feedback - Data simuFreq; ///< frequency of the "simulated Omni" - Data positionBase; ///< Position of the interface base in the scene world coordinates - Data orientationBase; ///< Orientation of the interface base in the scene world coordinates - Data positionTool; ///< Position of the tool in the omni end effector frame - Data orientationTool; ///< Orientation of the tool in the omni end effector frame - Data permanent; ///< Apply the force feedback permanently - Data omniVisu; ///< Visualize the position of the interface in the virtual scene - Data simulateTranslation; ///< do very naive "translation simulation" of omni, with constant orientation <0 0 0 1> - - OmniData data; - - - NewOmniDriverEmu(); - virtual ~NewOmniDriverEmu(); - - virtual void init(); - virtual void bwdInit(); - virtual void reset(); - void reinit(); - - int initDevice(OmniData& data); - - void cleanup(); - virtual void draw(); - - void onKeyPressedEvent(core::objectmodel::KeypressedEvent *); - void onKeyReleasedEvent(core::objectmodel::KeyreleasedEvent *); - - void setDataValue(); - void reinitVisual(); - - bool afterFirstStep; - SolidTypes::Transform prevPosition; - - //neede for "omni simulation" - CTime *thTimer; - double lastStep; - bool executeAsynchro; - Data trajPts; ///< Trajectory positions - Data > trajTim; ///< Trajectory timing - -private: - void handleEvent(core::objectmodel::Event *); - void copyDeviceDataCallback(OmniData *pUserData); - void stopCallback(OmniData *pUserData); - sofa::component::visualmodel::OglModel *visu_base, *visu_end; - bool noDevice; - - bool moveOmniBase; - Vec3d positionBase_buf; - bool omniSimThreadCreated; - - - - -}; - - -} // namespace controller - -} // namespace component - -} // namespace sofa - -#endif // SOFA_COMPONENT_CONTROLLER_OMNIEMU_H diff --git a/applications/plugins/SensableEmulation/OmniDriverEmu.cpp b/applications/plugins/SensableEmulation/OmniDriverEmu.cpp deleted file mode 100644 index cbfe2cfd3bc..00000000000 --- a/applications/plugins/SensableEmulation/OmniDriverEmu.cpp +++ /dev/null @@ -1,589 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ - -#include "OmniDriverEmu.h" - -#include -#include -#include - -#include - -////force feedback -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include - -#include -using sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndVelocityVisitor; - -#include - -namespace sofa -{ - -namespace component -{ - -namespace controller -{ - -using namespace sofa::type; -using namespace sofa::defaulttype; -using namespace core::behavior; -using type::vector; - -OmniDriverEmu::OmniDriverEmu() - : forceScale(initData(&forceScale, 1.0, "forceScale","Default scaling factor applied to the force feedback")) - , scale(initData(&scale, 1.0, "scale","Default scale applied to the Phantom Coordinates. ")) - , positionBase(initData(&positionBase, Vec3d(0,0,0), "positionBase","Position of the interface base in the scene world coordinates")) - , orientationBase(initData(&orientationBase, Quat(0,0,0,1), "orientationBase","Orientation of the interface base in the scene world coordinates")) - , positionTool(initData(&positionTool, Vec3d(0,0,0), "positionTool","Position of the tool in the omni end effector frame")) - , orientationTool(initData(&orientationTool, Quat(0,0,0,1), "orientationTool","Orientation of the tool in the omni end effector frame")) - , permanent(initData(&permanent, false, "permanent" , "Apply the force feedback permanently")) - , omniVisu(initData(&omniVisu, false, "omniVisu", "Visualize the position of the interface in the virtual scene")) - , simuFreq(initData(&simuFreq, 1000, "simuFreq", "frequency of the \"simulated Omni\"")) - , simulateTranslation(initData(&simulateTranslation, false, "simulateTranslation", "do very naive \"translation simulation\" of omni, with constant orientation <0 0 0 1>")) - , thTimer(nullptr) - , trajPts(initData(&trajPts, "trajPoints","Trajectory positions")) - , trajTim(initData(&trajTim, "trajTiming","Trajectory timing")) - , visu_base(nullptr) - , visu_end(nullptr) - , currentToolIndex(0) - , isToolControlled(true) -{ - this->f_listening.setValue(true); - noDevice = false; - moveOmniBase = false; - executeAsynchro = false; - omniSimThreadCreated = false; - m_terminate = true; -} - - -OmniDriverEmu::~OmniDriverEmu() -{ - if (thTimer != nullptr) - delete thTimer; -} - - -void OmniDriverEmu::setForceFeedbacks(vector ffs) -{ - data.forceFeedbacks.clear(); - for (unsigned int i=0; i *> (this->getContext()->getMechanicalState()); - if (!mState) - msg_warning() << "OmniDriverEmu has no binding MechanicalState."; - else - msg_info() << "[Omni] init" ; - - if(mState->getSize()resize(toolCount.getValue()); -} - - -/** - function that is used to emulate a haptic device by interpolating the position of the tool between several points. -*/ -void hapticSimuExecute(std::atomic& terminate, void *ptr ) -{ - assert(ptr!=nullptr); - - // Initialization - OmniDriverEmu *omniDrv = static_cast(ptr); - - // Init the "trajectory" data - OmniDriverEmu::VecCoord pts = omniDrv->trajPts.getValue(); //sets of points use for interpolation - type::vector tmg = omniDrv->trajTim.getValue(); //sets of "key time" for interpolation - - if (pts.empty()) - { - msg_error(omniDrv) << "Bad trajectory specification : there are no points for interpolation. "; - return; - } - - // Add a first point ( 0 0 0 0 0 0 1 ) if the first "key time" is not 0 - if (sofa::helper::isEqual(tmg[0], 0.0)) - { - pts.insert(pts.begin(), OmniDriverEmu::Coord()); - tmg.insert(tmg.begin(), 0); - } - - size_t numPts = pts.size(); - size_t numSegs = tmg.size(); - - // test if "trajectory" data are correct - if (numSegs != numPts) - { - msg_error(omniDrv) << "Bad trajectory specification : the number of trajectory timing does not match the number of trajectory points. "; - return; - } - - type::vector< unsigned int > stepNum; - // Init the Step list - for (unsigned int i = 0; i < numPts; i++) - { - stepNum.push_back(tmg[i] * omniDrv->simuFreq.getValue()); - } - - // Init data for interpolation. - SolidTypes::SpatialVector temp1, temp2; - long long unsigned asynchroStep=0; - double averageFreq = 0.0, minimalFreq=1e10; - unsigned int actSeg = 0; - unsigned int actStep = 0; - sofa::type::Quat actualRot; - sofa::type::Vec3d actualPos = pts[0].getCenter(); - - double timeScale = 1.0 / (double)helper::system::thread::CTime::getTicksPerSec(); - double startTime, endTime, totalTime, realTimePrev = -1.0, realTimeAct; - double requiredTime = 1.0 / (double)omniDrv->simuFreq.getValue() * 1.0 / timeScale; - double timeCorrection = 0.1 * requiredTime; - int timeToSleep; - - int oneTimeMessage = 0; - // loop that updates the position tool. - while (!terminate) - { - if (omniDrv->executeAsynchro) - { - if (oneTimeMessage == 1) - { - oneTimeMessage = 0; - } - - startTime = double(omniDrv->thTimer->getTime()); - - // compute the new position and orientataion - if (actSeg < numSegs) - { - - if (actSeg > 0 && actStep < stepNum[actSeg]) - { - - //compute the coeff for interpolation - double t = ((double)(actStep-stepNum[actSeg-1]))/((double)(stepNum[actSeg]-stepNum[actSeg-1])); - - //compute the actual position - actualPos = (pts[actSeg-1].getCenter())*(1-t)+(pts[actSeg].getCenter())*t; - - //compute the actual orientation - actualRot.slerp(pts[actSeg-1].getOrientation(),pts[actSeg].getOrientation(),t,true); - - actStep++; - } - else - { - actualPos = pts[actSeg].getCenter(); - actualRot = pts[actSeg].getOrientation(); - actSeg++; - } - } - else - { - msg_info(omniDrv) << "End of the movement!" ; - return; - } - - // Update the position of the tool - omniDrv->data.servoDeviceData.pos = actualPos; - omniDrv->data.servoDeviceData.quat = actualRot; - SolidTypes::Transform baseOmni_H_endOmni(actualPos * omniDrv->data.scale, actualRot); - SolidTypes::Transform world_H_virtualTool = omniDrv->data.world_H_baseOmni * baseOmni_H_endOmni * omniDrv->data.endOmni_H_virtualTool; - - // transmit the position of the tool to the force feedback - omniDrv->data.forceFeedbackIndice= omniDrv->getCurrentToolIndex(); - // store actual position of interface for the forcefeedback (as it will be used as soon as new LCP will be computed) - for (unsigned int i=0; idata.forceFeedbacks.size(); i++) - { - if (omniDrv->data.forceFeedbacks[i]->d_indice.getValue()==omniDrv->data.forceFeedbackIndice) - { - omniDrv->data.forceFeedbacks[i]->computeWrench(world_H_virtualTool,temp1,temp2); - } - } - - realTimeAct = double(omniDrv->thTimer->getTime()); - - if (asynchroStep > 0) - { - double realFreq = 1.0/( (realTimeAct - realTimePrev)*timeScale ); - averageFreq += realFreq; - if (realFreq < minimalFreq) - minimalFreq = realFreq; - - if ( ((asynchroStep+1) % 1000) == 0) - { - msg_info(omniDrv) << "Average frequency of the loop = " << averageFreq/double(asynchroStep) << " Hz " - << "Minimal frequency of the loop = " << minimalFreq << " Hz " ; - } - } - - realTimePrev = realTimeAct; - asynchroStep++; - - endTime = (double)omniDrv->thTimer->getTime(); //[s] - totalTime = (endTime - startTime); // [us] - timeToSleep = int( ((requiredTime - totalTime) - timeCorrection) ); // [us] - - if (timeToSleep > 0) - { - std::this_thread::sleep_for(std::chrono::seconds(int(timeToSleep * timeScale))); - } - else - { - msg_info(omniDrv) << "Cannot achieve desired frequency, computation too slow : " << totalTime * timeScale << " seconds for last iteration."; - } - } - else - { - if (oneTimeMessage == 0) - { - msg_info(omniDrv) << "Running Asynchro without action" ; - oneTimeMessage = 1; - } - - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - } - } -} - -void OmniDriverEmu::bwdInit() -{ - msg_info()<<"OmniDriverEmu::bwdInit() is called"; - sofa::simulation::Node *context = dynamic_cast(this->getContext()); // access to current node - - // depending on toolCount, search either the first force feedback, or the feedback with indice "0" - sofa::simulation::Node *groot = dynamic_cast(context->getRootContext()); // access to current node - - vector ffs; - groot->getTreeObjects(&ffs); - msg_info() << "OmniDriver: "<m_terminate), this); - setOmniSimThreadCreated(true); - msg_info() << "OmniDriver : Thread created for Omni simulation."; -} - - -void OmniDriverEmu::setDataValue() -{ - data.forceFeedbackIndice=0; - data.scale = scale.getValue(); - data.forceScale = forceScale.getValue(); - Quat q = orientationBase.getValue(); - q.normalize(); - orientationBase.setValue(q); - data.world_H_baseOmni.set( positionBase.getValue(), q ); - q=orientationTool.getValue(); - q.normalize(); - data.endOmni_H_virtualTool.set(positionTool.getValue(), q); - data.permanent_feedback = permanent.getValue(); -} - -void OmniDriverEmu::reinit() -{ - msg_info()<<"OmniDriverEmu::reinit() is called"; - this->cleanup(); - this->bwdInit(); - msg_info()<<"OmniDriverEmu::reinit() done"; -} - -void OmniDriverEmu::draw(const core::visual::VisualParams *) -{ - using sofa::gl::component::rendering3d::OglModel; - if(omniVisu.getValue()) - { - static bool isInited=false; - if(!isInited) - { - // compute position of the endOmni in worldframe - defaulttype::SolidTypes::Transform baseOmni_H_endOmni(data.deviceData.pos*data.scale, data.deviceData.quat); - defaulttype::SolidTypes::Transform world_H_endOmni = data.world_H_baseOmni * baseOmni_H_endOmni ; - - visu_base = sofa::core::objectmodel::New(); - visu_base->d_fileMesh.setValue("mesh/omni_test2.obj"); - visu_base->d_scale.setValue(type::Vec3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_base->setColor(1.0f,1.0f,1.0f,1.0f); - visu_base->init(); - visu_base->initVisual(sofa::core::visual::visualparams::defaultInstance()); - visu_base->updateVisual(sofa::core::visual::visualparams::defaultInstance()); - visu_base->applyRotation(orientationBase.getValue()); - visu_base->applyTranslation( positionBase.getValue()[0],positionBase.getValue()[1], positionBase.getValue()[2]); - - visu_end = sofa::core::objectmodel::New(); - visu_end->d_fileMesh.setValue("mesh/stylus.obj"); - visu_end->d_scale.setValue(type::Vec3(scale.getValue(),scale.getValue(),scale.getValue())); - visu_end->setColor(1.0f,0.3f,0.0f,1.0f); - visu_end->init(); - visu_end->initVisual(sofa::core::visual::visualparams::defaultInstance()); - visu_end->updateVisual(sofa::core::visual::visualparams::defaultInstance()); - visu_end->applyRotation(world_H_endOmni.getOrientation()); - visu_end->applyTranslation(world_H_endOmni.getOrigin()[0],world_H_endOmni.getOrigin()[1],world_H_endOmni.getOrigin()[2]); - isInited=true; - } - - // draw the 2 visual models - visu_base->doDrawVisual(sofa::core::visual::VisualParams::defaultInstance()); - visu_end->doDrawVisual(sofa::core::visual::VisualParams::defaultInstance()); - } -} - -void OmniDriverEmu::copyDeviceDataCallback(OmniData *pUserData) -{ - OmniData *data = pUserData; - memcpy(&data->deviceData, &data->servoDeviceData, sizeof(DeviceData)); - data->servoDeviceData.ready = true; - data->servoDeviceData.nupdates = 0; -} - -void OmniDriverEmu::stopCallback(OmniData *pUserData) -{ - OmniData *data = pUserData; - data->servoDeviceData.stop = true; -} - -void OmniDriverEmu::handleEvent(core::objectmodel::Event *event) -{ - if (dynamic_cast(event)) - { - msg_info() << "Test handle event "; - - copyDeviceDataCallback(&data); - - msg_info() << data.deviceData.ready; - - if (data.deviceData.ready) - { - msg_info() << "Data ready, event 2"; - - data.deviceData.quat.normalize(); - - if (isToolControlled) // ignore haptic device if tool is unselected - { - /// COMPUTATION OF THE vituralTool 6D POSITION IN THE World COORDINATES - SolidTypes< double >::Transform baseOmni_H_endOmni(data.deviceData.pos*data.scale, data.deviceData.quat); - SolidTypes< double >::Transform world_H_virtualTool = data.world_H_baseOmni * baseOmni_H_endOmni * data.endOmni_H_virtualTool; - - //---------------------------- - data.forceFeedbackIndice=currentToolIndex; - // store actual position of interface for the forcefeedback (as it will be used as soon as new LCP will be computed) - //data.forceFeedback->setReferencePosition(world_H_virtualTool); - for (unsigned int i=0; id_indice.getValue()==data.forceFeedbackIndice) - data.forceFeedbacks[i]->setReferencePosition(world_H_virtualTool); - - //----------------------------- - //TODO : SHOULD INCLUDE VELOCITY !! - //sofa::core::objectmodel::HapticDeviceEvent omniEvent(data.deviceData.id, world_H_virtualTool.getOrigin(), world_H_virtualTool.getOrientation() , data.deviceData.m_buttonState); - //this->getContext()->propagateEvent(sofa::core::ExecParams::defaultInstance(), &omniEvent); - helper::WriteAccessor > > > x = *this->mState->write(core::VecCoordId::position()); - this->getContext()->getMechanicalState()->vRealloc( sofa::core::MechanicalParams::defaultInstance(), core::VecCoordId::freePosition() ); // freePosition is not allocated by default - helper::WriteAccessor > > > xfree = *this->mState->write(core::VecCoordId::freePosition()); - - /// FIX : check if the mechanical state is empty, if true, resize it - /// otherwise: crash when accessing xfree[] and x[] - if(xfree.size() == 0) - xfree.resize(1); - if(x.size() == 0) - x.resize(1); - - if((size_t)currentToolIndex >= xfree.size() || (size_t)currentToolIndex >= x.size()) - msg_warning()<<"currentToolIndex exceed the size of xfree/x vectors"; - else - { - xfree[currentToolIndex].getCenter() = world_H_virtualTool.getOrigin(); - x[currentToolIndex].getCenter() = world_H_virtualTool.getOrigin(); - - xfree[currentToolIndex].getOrientation() = world_H_virtualTool.getOrientation(); - x[currentToolIndex].getOrientation() = world_H_virtualTool.getOrientation(); - } - - sofa::simulation::Node *node = dynamic_cast (this->getContext()); - if (node != nullptr) - { - MechanicalPropagateOnlyPositionAndVelocityVisitor mechaVisitor(sofa::core::MechanicalParams::defaultInstance()); mechaVisitor.execute(node); - sofa::simulation::UpdateMappingVisitor updateVisitor(sofa::core::ExecParams::defaultInstance()); updateVisitor.execute(node); - } - } - else - { - data.forceFeedbackIndice = -1; - } - - if (moveOmniBase) - { - msg_info()<<" new positionBase = "<applyTranslation(positionBase_buf[0]-positionBase.getValue()[0], - positionBase_buf[1]-positionBase.getValue()[1], - positionBase_buf[2]-positionBase.getValue()[2]); - positionBase.setValue(positionBase_buf); - setDataValue(); - } - - executeAsynchro = true; - } - else - msg_info()<<"data not ready"; - } - - if (dynamic_cast(event)) - { - core::objectmodel::KeypressedEvent *kpe = dynamic_cast(event); - if (kpe->getKey()=='Z' ||kpe->getKey()=='z' ) - { - moveOmniBase = !moveOmniBase; - msg_info()<<"key z detected "; - omniVisu.setValue(moveOmniBase); - - if(moveOmniBase) - { - this->cleanup(); - positionBase_buf = positionBase.getValue(); - } - else - { - this->reinit(); - } - } - - if(kpe->getKey()=='K' || kpe->getKey()=='k') - { - positionBase_buf.x()=0.0; - positionBase_buf.y()=0.5; - positionBase_buf.z()=2.6; - } - - if(kpe->getKey()=='L' || kpe->getKey()=='l') - { - positionBase_buf.x()=-0.15; - positionBase_buf.y()=1.5; - positionBase_buf.z()=2.6; - } - - if(kpe->getKey()=='M' || kpe->getKey()=='m') - { - positionBase_buf.x()=0.0; - positionBase_buf.y()=2.5; - positionBase_buf.z()=2.6; - } - - // emulated haptic buttons B=btn1, N=btn2 - if (kpe->getKey()=='H' || kpe->getKey()=='h') - { - msg_info() << "emulated button 1 pressed"; - Vec3 dummyVector; - Quat dummyQuat; - sofa::core::objectmodel::HapticDeviceEvent event(currentToolIndex,dummyVector,dummyQuat, - sofa::core::objectmodel::HapticDeviceEvent::Button1StateMask); - sofa::simulation::Node *groot = dynamic_cast(getContext()->getRootContext()); // access to current node - groot->propagateEvent(core::ExecParams::defaultInstance(), &event); - } - if (kpe->getKey()=='J' || kpe->getKey()=='j') - { - std::cout << "emulated button 2 pressed" << std::endl; - Vec3 dummyVector; - Quat dummyQuat; - sofa::core::objectmodel::HapticDeviceEvent event(currentToolIndex,dummyVector,dummyQuat, - sofa::core::objectmodel::HapticDeviceEvent::Button2StateMask); - sofa::simulation::Node *groot = dynamic_cast(getContext()->getRootContext()); // access to current node - groot->propagateEvent(core::ExecParams::defaultInstance(), &event); - } - - } - if (dynamic_cast(event)) - { - core::objectmodel::KeyreleasedEvent *kre = dynamic_cast(event); - // emulated haptic buttons B=btn1, N=btn2 - if (kre->getKey()=='H' || kre->getKey()=='h' - || kre->getKey()=='J' || kre->getKey()=='j') - { - msg_info() << "emulated button released" ; - Vec3 dummyVector; - Quat dummyQuat; - sofa::core::objectmodel::HapticDeviceEvent event(currentToolIndex,dummyVector,dummyQuat,0); - sofa::simulation::Node *groot = dynamic_cast(getContext()->getRootContext()); // access to current node - groot->propagateEvent(core::ExecParams::defaultInstance(), &event); - } - } -} - - -static int OmniDriverEmuClass = core::RegisterObject("Solver to test compliance computation for new articulated system objects") - .add< OmniDriverEmu >(); - -} // namespace controller - -} // namespace component - -} // namespace sofa diff --git a/applications/plugins/SensableEmulation/OmniDriverEmu.h b/applications/plugins/SensableEmulation/OmniDriverEmu.h deleted file mode 100644 index 0590808fa47..00000000000 --- a/applications/plugins/SensableEmulation/OmniDriverEmu.h +++ /dev/null @@ -1,173 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#ifndef SOFA_COMPONENT_CONTROLLER_OMNIEMU_H -#define SOFA_COMPONENT_CONTROLLER_OMNIEMU_H - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -namespace sofa::gl::component::rendering3d -{ - class OglModel; - -} // namespace sofa::gl::component::rendering3d - -namespace sofa::component::haptics -{ - class ForceFeedback; -} - -namespace sofa::component::controller -{ - -/** Holds data retrieved from HDAPI. */ -typedef struct -{ - int nupdates; - int m_buttonState; /* Has the device button has been pressed. */ - type::Vec3d pos; - type::Quat quat; - bool ready; - bool stop; -} DeviceData; - -typedef struct -{ - type::vector forceFeedbacks; - int forceFeedbackIndice; - simulation::Node *context; - - sofa::defaulttype::SolidTypes::Transform endOmni_H_virtualTool; - sofa::defaulttype::SolidTypes::Transform world_H_baseOmni; - double forceScale; - double scale; - bool permanent_feedback; - - // API OMNI // - DeviceData servoDeviceData; // for the haptic loop - DeviceData deviceData; // for the simulation loop - -} OmniData; - -/** -* Omni driver emulator you can add to your scene. -* -* Controller's actions: -* key z: reset to base position -* key k, l, m: move base position -* key h: emulate button 1 press/release -* key i: emulate button 2 press/release -*/ -class SOFA_SENSABLEEMUPLUGIN_API OmniDriverEmu : public Controller -{ - -public: - typedef defaulttype::Rigid3dTypes::Coord Coord; - typedef defaulttype::Rigid3dTypes::VecCoord VecCoord; - - using Vec3d = sofa::type::Vec3d; - using Quat = sofa::type::Quat; - - SOFA_CLASS(OmniDriverEmu, Controller); - Data forceScale; ///< Default scaling factor applied to the force feedback - Data scale; ///< Default scale applied to the Phantom Coordinates. - Data positionBase; ///< Position of the interface base in the scene world coordinates - Data orientationBase; ///< Orientation of the interface base in the scene world coordinates - Data positionTool; ///< Position of the tool in the omni end effector frame - Data orientationTool; ///< Orientation of the tool in the omni end effector frame - Data permanent; ///< Apply the force feedback permanently - Data omniVisu; ///< Visualize the position of the interface in the virtual scene - Data simuFreq; ///< frequency of the "simulated Omni" - Data simulateTranslation; ///< do very naive "translation simulation" of omni, with constant orientation <0 0 0 1> - Data toolSelector; - Data toolCount; - - OmniData data; - - OmniDriverEmu(); - ~OmniDriverEmu() override; - - void init() override; - void bwdInit() override; - void reinit() override; - void cleanup() override; - void draw(const core::visual::VisualParams*) override; - - int initDevice(OmniData& data); - void setForceFeedbacks(type::vector ffs); - - void setDataValue(); - - void setOmniSimThreadCreated(bool b) { omniSimThreadCreated = b;} - - bool afterFirstStep; - defaulttype::SolidTypes::Transform prevPosition; - - //need for "omni simulation" - helper::system::thread::CTime *thTimer; - - /// Thread object - std::thread hapSimuThread; - - /// Bool to notify thread to stop work - std::atomic m_terminate; - - double lastStep; - bool executeAsynchro; - Data trajPts; ///< Trajectory positions - Data > trajTim; ///< Trajectory timing - - int getCurrentToolIndex() { return currentToolIndex;} - void handleEvent(core::objectmodel::Event *) override ; - -private: - - void copyDeviceDataCallback(OmniData *pUserData); - void stopCallback(OmniData *pUserData); - gl::component::rendering3d::OglModel::SPtr visu_base, visu_end; - bool noDevice; - - bool moveOmniBase; - Vec3d positionBase_buf; - - core::behavior::MechanicalState *mState; ///< Controlled MechanicalState. - - bool omniSimThreadCreated; - int currentToolIndex; - bool isToolControlled; -}; - - -} // namespace sofa::component::controller - -#endif // SOFA_COMPONENT_CONTROLLER_OMNIEMU_H diff --git a/applications/plugins/SensableEmulation/PluginSensableEmulation.txt b/applications/plugins/SensableEmulation/PluginSensableEmulation.txt deleted file mode 100644 index befe3d9bc7b..00000000000 --- a/applications/plugins/SensableEmulation/PluginSensableEmulation.txt +++ /dev/null @@ -1,10 +0,0 @@ -************************************ -* SensableEmulation.txt * -************************************ -AUTHOR : - - C.Duriez - -LICENCE : - - None - -OTHER COMMENTS : diff --git a/applications/plugins/SensableEmulation/config.h b/applications/plugins/SensableEmulation/config.h deleted file mode 100644 index fbe888819f0..00000000000 --- a/applications/plugins/SensableEmulation/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#ifndef SENSABLEEMULATION_CONFIG_H -#define SENSABLEEMULATION_CONFIG_H - -#include - -#ifdef SOFA_BUILD_SENSABLEEMULATIONPLUGIN -# define SOFA_TARGET SensableEmulation -# define SOFA_SENSABLEEMUPLUGIN_API SOFA_EXPORT_DYNAMIC_LIBRARY -#else -# define SOFA_SENSABLEEMUPLUGIN_API SOFA_IMPORT_DYNAMIC_LIBRARY -#endif - -#endif diff --git a/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn b/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn deleted file mode 100644 index becbb2480b0..00000000000 --- a/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn.view b/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn.view deleted file mode 100644 index 97e71316b4f..00000000000 --- a/applications/plugins/SensableEmulation/examples/SimpleBox-Method2.scn.view +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SensableEmulation/examples/data/mesh/box.obj b/applications/plugins/SensableEmulation/examples/data/mesh/box.obj deleted file mode 100644 index 439b773295b..00000000000 --- a/applications/plugins/SensableEmulation/examples/data/mesh/box.obj +++ /dev/null @@ -1,20 +0,0 @@ -# Blender v2.68 (sub 0) OBJ File: '' -# www.blender.org -mtllib box.mtl -o Cube -v 1.000000 -1.000000 -1.000000 -v 1.000000 -1.000000 1.000000 -v -1.000000 -1.000000 1.000000 -v -1.000000 -1.000000 -1.000000 -v 1.000000 1.000000 -0.999999 -v 0.999999 1.000000 1.000001 -v -1.000000 1.000000 1.000000 -v -1.000000 1.000000 -1.000000 -usemtl Material -s off -f 1 2 3 4 -f 5 8 7 6 -f 1 5 6 2 -f 2 6 7 3 -f 3 7 8 4 -f 5 1 4 8 diff --git a/applications/plugins/SensableEmulation/examples/data/mesh/dental_instrument.obj b/applications/plugins/SensableEmulation/examples/data/mesh/dental_instrument.obj deleted file mode 100644 index 358faf79ad5..00000000000 --- a/applications/plugins/SensableEmulation/examples/data/mesh/dental_instrument.obj +++ /dev/null @@ -1,1194 +0,0 @@ -#### -# -# OBJ File Generated by LightWave3D -# LightWave3D OBJ Export v2.3 -# -#### -o dental_instrument.obj -mtllib dental_instrument.mtl -g default -v 0.020625 0.0233891 2.71688 -v 0.0350288 0.0174173 2.71666 -v 0.0409951 0.003 2.71656 -v 0.0350288 -0.0114173 2.71666 -v 0.020625 -0.0173891 2.71688 -v 0.00622117 -0.0114173 2.71709 -v 0.00025491 0.003 2.71719 -v 0.00622117 0.0174173 2.71709 -v 0.027375 0.0233891 2.85037 -v 0.0416982 0.0174173 2.84884 -v 0.0476311 0.003 2.8482 -v 0.0416982 -0.0114173 2.84884 -v 0.027375 -0.0173891 2.85037 -v 0.0130518 -0.0114173 2.85191 -v 0.00711889 0.003 2.85255 -v 0.0130518 0.0174173 2.85191 -v 0.051625 0.0233891 3.00175 -v 0.065948 0.0174173 3.00024 -v 0.0718807 0.003 2.99962 -v 0.065948 -0.0114173 3.00024 -v 0.051625 -0.0173891 3.00175 -v 0.037302 -0.0114173 3.00326 -v 0.0313693 0.003 3.00388 -v 0.037302 0.0174173 3.00326 -v 0.089375 0.0233891 3.193 -v 0.103764 0.0174173 3.19319 -v 0.109724 0.003 3.19327 -v 0.103764 -0.0114173 3.19319 -v 0.089375 -0.0173891 3.193 -v 0.0749862 -0.0114173 3.19281 -v 0.0690262 0.003 3.19273 -v 0.0749862 0.0174173 3.19281 -v 0.10075 0.0233891 3.285 -v 0.114998 0.0174173 3.28691 -v 0.1209 0.003 3.2877 -v 0.114998 -0.0114173 3.28691 -v 0.10075 -0.0173891 3.285 -v 0.0865018 -0.0114173 3.28309 -v 0.0806 0.003 3.2823 -v 0.0865018 0.0174173 3.28309 -v 0.09775 0.0233891 3.35875 -v 0.111383 0.0174173 3.36321 -v 0.11703 0.003 3.36506 -v 0.111383 -0.0114173 3.36321 -v 0.09775 -0.0173891 3.35875 -v 0.0841168 -0.0114173 3.35429 -v 0.0784698 0.003 3.35244 -v 0.0841168 0.0174173 3.35429 -v 0.077 0.0233891 3.42925 -v 0.0893074 0.0174173 3.43653 -v 0.0944051 0.003 3.43955 -v 0.0893074 -0.0114173 3.43653 -v 0.077 -0.0173891 3.42925 -v 0.0646926 -0.0114173 3.42197 -v 0.0595949 0.003 3.41895 -v 0.0646926 0.0174173 3.42197 -v 0.0335 0.0233891 3.48675 -v 0.0431682 0.0174173 3.49721 -v 0.0471728 0.003 3.50154 -v 0.0431682 -0.0114173 3.49721 -v 0.0335 -0.0173891 3.48675 -v 0.0238318 -0.0114173 3.47629 -v 0.0198272 0.003 3.47196 -v 0.0238318 0.0174173 3.47629 -v -0.029 0.0233891 3.5265 -v -0.0229674 0.0174173 3.53945 -v -0.0204688 0.003 3.54482 -v -0.0229674 -0.0114173 3.53945 -v -0.029 -0.0173891 3.5265 -v -0.0350326 -0.0114173 3.51355 -v -0.0375312 0.003 3.50818 -v -0.0350326 0.0174173 3.51355 -v -0.10025 0.0229813 3.5475 -v -0.0970845 0.0171289 3.5612 -v -0.0957734 0.003 3.56687 -v -0.0970845 -0.0111289 3.5612 -v -0.10025 -0.0169813 3.5475 -v -0.103415 -0.0111289 3.5338 -v -0.104727 0.003 3.52813 -v -0.103415 0.0171289 3.5338 -v -0.1735 0.0192929 3.556 -v -0.173106 0.0145208 3.56747 -v -0.172942 0.003 3.57223 -v -0.173106 -0.00852083 3.56747 -v -0.1735 -0.0132929 3.556 -v -0.173894 -0.00852083 3.54452 -v -0.174058 0.003 3.53977 -v -0.173894 0.0145208 3.54452 -v -0.235875 0.010649 3.557 -v -0.235943 0.00840138 3.56243 -v -0.235972 0.00297517 3.56467 -v -0.235943 -0.00245105 3.56243 -v -0.235875 -0.00469866 3.557 -v -0.235807 -0.00245105 3.55157 -v -0.235778 0.00297517 3.54933 -v -0.235807 0.00840138 3.55157 -v -0.24875 0.00281127 3.557 -v 0.02 0.0233891 -3.551 -v 0.00558274 0.0174173 -3.551 -v -0.000389087 0.003 -3.551 -v 0.00558274 -0.0114173 -3.551 -v 0.02 -0.0173891 -3.551 -v 0.0344173 -0.0114173 -3.551 -v 0.0403891 0.003 -3.551 -v 0.0344173 0.0174173 -3.551 -v -0.209024 0.0141993 3.56164 -v -0.208976 0.0141993 3.55236 -v -0.209 0.0151601 3.557 -v -0.136125 0.0202759 3.56006 -v -0.173287 0.0180056 3.56219 -v -0.209058 0.0076389 3.5682 -v -0.209044 0.0115985 3.5656 -v -0.244748 0.00733716 3.55883 -v -0.235788 0.0101966 3.55999 -v -0.134888 0.0101559 3.57003 -v -0.172986 0.00921554 3.57094 -v -0.209058 -0.0016389 3.5682 -v -0.209063 0.003 3.56916 -v -0.244748 0.00474996 3.56142 -v -0.235842 0.00596929 3.56422 -v -0.134888 -0.00415592 3.57003 -v -0.172986 -0.00321554 3.57094 -v -0.209024 -0.0081993 3.56164 -v -0.209044 -0.00559846 3.5656 -v -0.244748 0.00109111 3.56142 -v -0.235842 -9.01913e-006 3.56422 -v -0.136125 -0.0142759 3.56006 -v -0.173287 -0.0120056 3.56219 -v -0.208976 -0.0081993 3.55236 -v -0.209 -0.00916005 3.557 -v -0.244748 -0.00149609 3.55883 -v -0.235788 -0.00423632 3.55999 -v -0.137875 -0.0142759 3.54594 -v -0.173713 -0.0120056 3.54981 -v -0.208942 -0.0016389 3.5458 -v -0.208956 -0.00559846 3.5484 -v -0.244748 -0.00149609 3.55517 -v -0.235712 -0.00423632 3.55401 -v -0.139112 -0.00415592 3.53596 -v -0.174014 -0.00321554 3.54105 -v -0.208942 0.0076389 3.5458 -v -0.208937 0.003 3.54484 -v -0.244748 0.00109111 3.55258 -v -0.235658 -9.01913e-006 3.54978 -v -0.139112 0.0101559 3.53596 -v -0.174014 0.00921554 3.54105 -v -0.208956 0.0115985 3.5484 -v -0.244748 0.00474996 3.55258 -v -0.235658 0.00596929 3.54978 -v -0.137875 0.0202759 3.54594 -v -0.173713 0.0180056 3.54981 -v -0.244748 0.00733716 3.55517 -v -0.235712 0.0101966 3.55401 -v -0.246248 0.00704938 3.557 -v -0.246248 0.00583425 3.55993 -v -0.246248 0.00290067 3.56115 -v -0.246248 -3.29167e-005 3.55993 -v -0.246248 -0.00124805 3.557 -v -0.246248 -3.29167e-005 3.55407 -v -0.246248 0.00290067 3.55285 -v -0.246248 0.00583425 3.55407 -v -0.137 0.021758 3.553 -v -0.0615432 0.0217782 3.54634 -v -0.0985422 0.0214026 3.55489 -v -0.135378 0.0162639 3.56608 -v -0.0664567 0.0217782 3.53166 -v -0.064 0.0233891 3.539 -v 0.00823424 0.0217782 3.5154 -v -0.0257454 0.0217782 3.53349 -v -0.058069 0.0107782 3.55673 -v -0.0594463 0.0174173 3.55261 -v -0.000234232 0.0217782 3.5026 -v 0.00400001 0.0233891 3.509 -v 0.0640204 0.0217782 3.46479 -v 0.038716 0.0217782 3.49239 -v 0.0142223 0.0107782 3.52444 -v 0.0118484 0.0174173 3.52086 -v 0.0519796 0.0217782 3.45521 -v 0.058 0.0233891 3.46 -v 0.0970668 0.0217782 3.39815 -v 0.0836399 0.0217782 3.43318 -v 0.0725345 0.0107782 3.47156 -v 0.0691592 0.0174173 3.46888 -v 0.0829332 0.0217782 3.39185 -v 0.09 0.0233891 3.395 -v 0.108559 0.0217782 3.32368 -v 0.105105 0.0217782 3.36116 -v 0.107061 0.0107782 3.4026 -v 0.103099 0.0174173 3.40083 -v 0.0934411 0.0217782 3.32032 -v 0.101 0.0233891 3.322 -v 0.105749 0.0217782 3.24854 -v 0.108437 0.0217782 3.28603 -v 0.119249 0.0107782 3.32605 -v 0.115011 0.0174173 3.32511 -v 0.0902514 0.0217782 3.24746 -v 0.098 0.0233891 3.248 -v 0.0792486 0.0217782 3.10159 -v 0.0971378 0.0217782 3.1931 -v 0.116707 0.0107782 3.24931 -v 0.112362 0.0174173 3.249 -v 0.0637514 0.0217782 3.10241 -v 0.0715 0.0233891 3.102 -v 0.0447202 0.0217782 2.91805 -v 0.0593523 0.0217782 3.00094 -v 0.0902068 0.0107782 3.10102 -v 0.0858624 0.0174173 3.10125 -v 0.0292798 0.0217782 2.91995 -v 0.037 0.0233891 2.919 -v 0.0302492 0.0217782 2.79203 -v 0.0351024 0.0217782 2.84955 -v 0.0556382 0.0107782 2.91671 -v 0.0513098 0.0174173 2.91724 -v 0.0147508 0.0217782 2.79297 -v 0.0225 0.0233891 2.7925 -v 0.0283959 0.0217782 2.71676 -v 0.0412082 0.0107782 2.79136 -v 0.0368635 0.0174173 2.79162 -v 0.0277782 0.0217782 -3.551 -v -0.0961271 0.0106226 3.56534 -v -0.134707 0.003 3.5715 -v -0.0211428 0.0107782 3.54337 -v -0.058069 -0.00477817 3.55673 -v -0.0575602 0.003 3.55825 -v 0.0460925 0.0107782 3.50037 -v 0.0142223 -0.00477817 3.52444 -v 0.0150991 0.003 3.52577 -v 0.09303 0.0107782 3.43873 -v 0.0725345 -0.00477817 3.47156 -v 0.0737814 0.003 3.47255 -v 0.115507 0.0107782 3.36456 -v 0.107061 -0.00477817 3.4026 -v 0.108524 0.003 3.40325 -v 0.119308 0.0107782 3.28748 -v 0.119249 -0.00477817 3.32605 -v 0.120814 0.003 3.32639 -v 0.108116 0.0107782 3.19325 -v 0.116707 -0.00477817 3.24931 -v 0.118312 0.003 3.24942 -v 0.0702803 0.0107782 2.99979 -v 0.0902068 -0.00477817 3.10102 -v 0.0918115 0.003 3.10094 -v 0.0460307 0.0107782 2.84837 -v 0.0556382 -0.00477817 2.91671 -v 0.0572371 0.003 2.91652 -v 0.0393857 0.0107782 2.71659 -v 0.0412082 -0.00477817 2.79136 -v 0.0428131 0.003 2.79126 -v 0.0387782 0.0107782 -3.551 -v -0.0961271 -0.00462261 3.56534 -v -0.135378 -0.0102639 3.56608 -v -0.0211428 -0.00477817 3.54337 -v -0.0615432 -0.0157782 3.54634 -v -0.0594463 -0.0114173 3.55261 -v 0.0460925 -0.00477817 3.50037 -v 0.00823424 -0.0157782 3.5154 -v 0.0118484 -0.0114173 3.52086 -v 0.09303 -0.00477817 3.43873 -v 0.0640204 -0.0157782 3.46479 -v 0.0691592 -0.0114173 3.46888 -v 0.115507 -0.00477817 3.36456 -v 0.0970668 -0.0157782 3.39815 -v 0.103099 -0.0114173 3.40083 -v 0.119308 -0.00477817 3.28748 -v 0.108559 -0.0157782 3.32368 -v 0.115011 -0.0114173 3.32511 -v 0.108116 -0.00477817 3.19325 -v 0.105749 -0.0157782 3.24854 -v 0.112362 -0.0114173 3.249 -v 0.0702803 -0.00477817 2.99979 -v 0.0792486 -0.0157782 3.10159 -v 0.0858624 -0.0114173 3.10125 -v 0.0460307 -0.00477817 2.84837 -v 0.0447202 -0.0157782 2.91805 -v 0.0513098 -0.0114173 2.91724 -v 0.0393857 -0.00477817 2.71659 -v 0.0302492 -0.0157782 2.79203 -v 0.0368635 -0.0114173 2.79162 -v 0.0387782 -0.00477817 -3.551 -v -0.0985422 -0.0154026 3.55489 -v -0.137 -0.015758 3.553 -v -0.0257454 -0.0157782 3.53349 -v -0.0664567 -0.0157782 3.53166 -v -0.064 -0.0173891 3.539 -v 0.038716 -0.0157782 3.49239 -v -0.000234232 -0.0157782 3.5026 -v 0.00400001 -0.0173891 3.509 -v 0.0836399 -0.0157782 3.43318 -v 0.0519796 -0.0157782 3.45521 -v 0.058 -0.0173891 3.46 -v 0.105105 -0.0157782 3.36116 -v 0.0829332 -0.0157782 3.39185 -v 0.09 -0.0173891 3.395 -v 0.108437 -0.0157782 3.28603 -v 0.0934411 -0.0157782 3.32032 -v 0.101 -0.0173891 3.322 -v 0.0971378 -0.0157782 3.1931 -v 0.0902514 -0.0157782 3.24746 -v 0.098 -0.0173891 3.248 -v 0.0593523 -0.0157782 3.00094 -v 0.0637514 -0.0157782 3.10241 -v 0.0715 -0.0173891 3.102 -v 0.0351024 -0.0157782 2.84955 -v 0.0292798 -0.0157782 2.91995 -v 0.037 -0.0173891 2.919 -v 0.0283959 -0.0157782 2.71676 -v 0.0147508 -0.0157782 2.79297 -v 0.0225 -0.0173891 2.7925 -v 0.0277782 -0.0157782 -3.551 -v -0.101958 -0.0154026 3.54011 -v -0.138622 -0.0102639 3.53992 -v -0.0322546 -0.0157782 3.51951 -v -0.069931 -0.00477817 3.52127 -v -0.0685537 -0.0114173 3.52539 -v 0.028284 -0.0157782 3.48111 -v -0.00622225 -0.00477817 3.49356 -v -0.00384836 -0.0114173 3.49714 -v 0.0703601 -0.0157782 3.42532 -v 0.0434655 -0.00477817 3.44844 -v 0.0468408 -0.0114173 3.45112 -v 0.0903948 -0.0157782 3.35634 -v 0.0729393 -0.00477817 3.3874 -v 0.0769013 -0.0114173 3.38917 -v 0.093063 -0.0157782 3.28397 -v 0.0827513 -0.00477817 3.31795 -v 0.0869893 -0.0114173 3.31889 -v 0.0816122 -0.0157782 3.1929 -v 0.0792932 -0.00477817 3.24669 -v 0.0836376 -0.0114173 3.247 -v 0.0438977 -0.0157782 3.00256 -v 0.0527932 -0.00477817 3.10298 -v 0.0571376 -0.0114173 3.10275 -v 0.0196476 -0.0157782 2.8512 -v 0.0183618 -0.00477817 2.92129 -v 0.0226902 -0.0114173 2.92076 -v 0.0128541 -0.0157782 2.71699 -v 0.00379181 -0.00477817 2.79364 -v 0.00813647 -0.0114173 2.79338 -v 0.0122218 -0.0157782 -3.551 -v -0.104373 -0.00462261 3.52966 -v -0.139293 0.003 3.5345 -v -0.0368572 -0.00477817 3.50963 -v -0.069931 0.0107782 3.52127 -v -0.0704398 0.003 3.51975 -v 0.0209075 -0.00477817 3.47313 -v -0.00622225 0.0107782 3.49356 -v -0.00709914 0.003 3.49223 -v 0.06097 -0.00477817 3.41977 -v 0.0434655 0.0107782 3.44844 -v 0.0422186 0.003 3.44745 -v 0.0799931 -0.00477817 3.35294 -v 0.0729393 0.0107782 3.3874 -v 0.0714757 0.003 3.38675 -v 0.082192 -0.00477817 3.28252 -v 0.0827513 0.0107782 3.31795 -v 0.0811859 0.003 3.31761 -v 0.070634 -0.00477817 3.19275 -v 0.0792932 0.0107782 3.24669 -v 0.0776885 0.003 3.24658 -v 0.0329697 -0.00477817 3.00371 -v 0.0527932 0.0107782 3.10298 -v 0.0511885 0.003 3.10306 -v 0.0087193 -0.00477817 2.85238 -v 0.0183618 0.0107782 2.92129 -v 0.0167629 0.003 2.92148 -v 0.00186432 -0.00477817 2.71716 -v 0.00379181 0.0107782 2.79364 -v 0.0021869 0.003 2.79374 -v 0.00122183 -0.00477817 -3.551 -v -0.104373 0.0106226 3.52966 -v -0.138622 0.0162639 3.53992 -v -0.0368572 0.0107782 3.50963 -v -0.0685537 0.0174173 3.52539 -v 0.0209075 0.0107782 3.47313 -v -0.00384836 0.0174173 3.49714 -v 0.06097 0.0107782 3.41977 -v 0.0468408 0.0174173 3.45112 -v 0.0799931 0.0107782 3.35294 -v 0.0769013 0.0174173 3.38917 -v 0.082192 0.0107782 3.28252 -v 0.0869893 0.0174173 3.31889 -v 0.070634 0.0107782 3.19275 -v 0.0836376 0.0174173 3.247 -v 0.0329697 0.0107782 3.00371 -v 0.0571376 0.0174173 3.10275 -v 0.0087193 0.0107782 2.85238 -v 0.0226902 0.0174173 2.92076 -v 0.00186432 0.0107782 2.71716 -v 0.00813647 0.0174173 2.79338 -v 0.00122183 0.0107782 -3.551 -v -0.101958 0.0214026 3.54011 -v -0.0322546 0.0217782 3.51951 -v 0.028284 0.0217782 3.48111 -v 0.0703601 0.0217782 3.42532 -v 0.0903948 0.0217782 3.35634 -v 0.093063 0.0217782 3.28397 -v 0.0816122 0.0217782 3.1929 -v 0.0438977 0.0217782 3.00256 -v 0.0196476 0.0217782 2.8512 -v 0.0128541 0.0217782 2.71699 -v 0.0122218 0.0217782 -3.551 -f 108 89 114 -f 106 108 114 -f 81 108 106 -f 110 81 106 -f 110 106 112 -f 82 110 112 -f 106 114 90 -f 112 106 90 -f 111 90 120 -f 112 90 111 -f 116 112 111 -f 82 112 116 -f 111 118 83 -f 116 111 83 -f 118 120 91 -f 111 120 118 -f 118 126 117 -f 118 91 126 -f 83 117 122 -f 83 118 117 -f 122 124 84 -f 122 117 124 -f 117 92 124 -f 117 126 92 -f 92 132 123 -f 124 92 123 -f 124 123 128 -f 84 124 128 -f 123 130 85 -f 128 123 85 -f 132 93 130 -f 123 132 130 -f 138 129 130 -f 93 138 130 -f 129 134 85 -f 130 129 85 -f 136 86 134 -f 129 136 134 -f 94 136 129 -f 138 94 129 -f 94 135 136 -f 144 135 94 -f 135 140 136 -f 136 140 86 -f 142 87 135 -f 135 87 140 -f 144 142 135 -f 95 142 144 -f 149 142 95 -f 149 141 142 -f 141 146 87 -f 141 87 142 -f 147 146 141 -f 147 88 146 -f 96 141 149 -f 96 147 141 -f 107 147 96 -f 153 107 96 -f 151 88 147 -f 107 151 147 -f 81 151 107 -f 108 81 107 -f 108 107 153 -f 89 108 153 -f 155 154 97 -f 113 154 155 -f 113 89 154 -f 114 89 113 -f 114 113 155 -f 90 114 155 -f 156 155 97 -f 119 155 156 -f 120 155 119 -f 120 90 155 -f 91 119 156 -f 120 119 91 -f 156 97 157 -f 125 156 157 -f 91 125 126 -f 91 156 125 -f 126 157 92 -f 126 125 157 -f 97 158 131 -f 157 97 131 -f 157 131 132 -f 92 157 132 -f 131 158 93 -f 132 131 93 -f 97 159 137 -f 158 97 137 -f 137 138 93 -f 158 137 93 -f 159 94 138 -f 137 159 138 -f 160 143 159 -f 97 160 159 -f 159 144 94 -f 143 144 159 -f 143 95 144 -f 160 95 143 -f 161 160 97 -f 161 148 160 -f 148 95 160 -f 148 149 95 -f 161 149 148 -f 96 149 161 -f 154 161 97 -f 154 152 161 -f 153 96 161 -f 152 153 161 -f 89 152 154 -f 89 153 152 -f 162 81 110 -f 109 162 110 -f 73 162 109 -f 164 73 109 -f 164 109 165 -f 74 164 165 -f 109 110 82 -f 165 109 82 -f 167 73 164 -f 163 167 164 -f 65 167 163 -f 169 65 163 -f 169 163 171 -f 66 169 171 -f 171 163 74 -f 163 164 74 -f 173 65 169 -f 168 173 169 -f 57 173 168 -f 175 57 168 -f 175 168 177 -f 58 175 177 -f 177 168 66 -f 168 169 66 -f 174 57 175 -f 179 57 174 -f 181 179 174 -f 49 179 181 -f 50 174 183 -f 181 174 50 -f 183 175 58 -f 174 175 183 -f 180 49 181 -f 185 49 180 -f 187 185 180 -f 41 185 187 -f 42 180 189 -f 187 180 42 -f 189 181 50 -f 180 181 189 -f 186 41 187 -f 191 41 186 -f 193 191 186 -f 33 191 193 -f 34 186 195 -f 193 186 34 -f 195 187 42 -f 186 187 195 -f 192 33 193 -f 197 33 192 -f 199 197 192 -f 25 197 199 -f 26 192 201 -f 199 192 26 -f 201 193 34 -f 192 193 201 -f 198 25 199 -f 203 25 198 -f 205 203 198 -f 17 203 205 -f 18 198 207 -f 205 198 18 -f 207 199 26 -f 198 199 207 -f 204 17 205 -f 209 17 204 -f 211 209 204 -f 9 209 211 -f 10 204 213 -f 211 204 10 -f 213 205 18 -f 204 205 213 -f 210 9 211 -f 215 9 210 -f 1 215 210 -f 216 1 210 -f 216 210 218 -f 2 216 218 -f 218 211 10 -f 210 211 218 -f 165 82 116 -f 115 165 116 -f 74 165 115 -f 220 74 115 -f 75 220 221 -f 220 115 221 -f 221 115 83 -f 115 116 83 -f 171 74 220 -f 170 171 220 -f 66 171 170 -f 222 66 170 -f 67 222 224 -f 222 170 224 -f 224 170 75 -f 170 220 75 -f 177 66 222 -f 176 177 222 -f 58 177 176 -f 225 58 176 -f 225 176 227 -f 59 225 227 -f 227 176 67 -f 176 222 67 -f 182 58 225 -f 183 58 182 -f 228 183 182 -f 50 183 228 -f 228 182 51 -f 51 182 230 -f 230 225 59 -f 182 225 230 -f 188 50 228 -f 189 50 188 -f 231 189 188 -f 42 189 231 -f 231 188 43 -f 43 188 233 -f 188 228 233 -f 233 228 51 -f 194 42 231 -f 195 42 194 -f 234 195 194 -f 34 195 234 -f 234 194 35 -f 35 194 236 -f 194 231 236 -f 236 231 43 -f 200 34 234 -f 201 34 200 -f 237 201 200 -f 26 201 237 -f 27 200 239 -f 237 200 27 -f 200 234 239 -f 239 234 35 -f 207 26 237 -f 206 207 237 -f 18 207 206 -f 240 18 206 -f 240 206 242 -f 19 240 242 -f 206 237 27 -f 242 206 27 -f 213 18 240 -f 212 213 240 -f 243 10 212 -f 10 213 212 -f 243 212 245 -f 11 243 245 -f 212 240 19 -f 245 212 19 -f 218 10 243 -f 217 218 243 -f 2 218 217 -f 246 2 217 -f 246 217 248 -f 3 246 248 -f 217 243 11 -f 248 217 11 -f 83 122 121 -f 221 83 121 -f 221 121 250 -f 75 221 250 -f 121 251 76 -f 250 121 76 -f 122 84 251 -f 121 122 251 -f 75 250 223 -f 224 75 223 -f 252 224 223 -f 67 224 252 -f 68 223 254 -f 252 223 68 -f 250 76 254 -f 223 250 254 -f 226 67 252 -f 227 67 226 -f 59 227 255 -f 255 227 226 -f 60 226 257 -f 255 226 60 -f 252 68 257 -f 226 252 257 -f 230 59 255 -f 229 230 255 -f 51 230 229 -f 258 51 229 -f 52 258 260 -f 258 229 260 -f 229 255 60 -f 229 60 260 -f 233 51 258 -f 232 233 258 -f 43 233 232 -f 261 43 232 -f 44 261 263 -f 261 232 263 -f 232 258 52 -f 232 52 263 -f 236 43 261 -f 235 236 261 -f 35 236 235 -f 264 35 235 -f 36 264 266 -f 264 235 266 -f 235 261 44 -f 235 44 266 -f 239 35 264 -f 238 239 264 -f 27 239 238 -f 267 27 238 -f 28 267 269 -f 267 238 269 -f 238 264 36 -f 238 36 269 -f 241 27 267 -f 242 27 241 -f 270 242 241 -f 19 242 270 -f 20 241 272 -f 270 241 20 -f 267 28 272 -f 241 267 272 -f 244 19 270 -f 245 19 244 -f 273 245 244 -f 11 245 273 -f 12 244 275 -f 273 244 12 -f 270 20 275 -f 244 270 275 -f 247 11 273 -f 248 11 247 -f 276 248 247 -f 3 248 276 -f 276 247 4 -f 4 247 278 -f 273 12 278 -f 247 273 278 -f 84 128 127 -f 251 84 127 -f 251 127 280 -f 76 251 280 -f 127 281 77 -f 280 127 77 -f 128 85 281 -f 127 128 281 -f 76 280 253 -f 254 76 253 -f 282 254 253 -f 68 254 282 -f 69 253 284 -f 282 253 69 -f 280 77 284 -f 253 280 284 -f 256 68 282 -f 257 68 256 -f 285 257 256 -f 60 257 285 -f 61 256 287 -f 285 256 61 -f 287 282 69 -f 256 282 287 -f 260 60 285 -f 259 260 285 -f 52 260 259 -f 288 52 259 -f 53 288 290 -f 288 259 290 -f 259 285 61 -f 290 259 61 -f 263 52 288 -f 262 263 288 -f 44 263 262 -f 291 44 262 -f 45 291 293 -f 291 262 293 -f 262 288 53 -f 293 262 53 -f 266 44 291 -f 265 266 291 -f 36 266 265 -f 294 36 265 -f 37 294 296 -f 294 265 296 -f 265 291 45 -f 296 265 45 -f 269 36 294 -f 268 269 294 -f 28 269 268 -f 297 28 268 -f 29 297 299 -f 297 268 299 -f 268 294 37 -f 299 268 37 -f 272 28 297 -f 271 272 297 -f 20 272 271 -f 300 20 271 -f 21 300 302 -f 300 271 302 -f 271 297 29 -f 302 271 29 -f 275 20 300 -f 274 275 300 -f 12 275 274 -f 303 12 274 -f 13 303 305 -f 303 274 305 -f 274 300 21 -f 305 274 21 -f 278 12 303 -f 277 278 303 -f 306 278 277 -f 4 278 306 -f 5 277 308 -f 306 277 5 -f 277 303 13 -f 308 277 13 -f 134 133 281 -f 85 134 281 -f 281 310 77 -f 133 310 281 -f 133 78 310 -f 311 78 133 -f 86 311 133 -f 134 86 133 -f 77 283 284 -f 310 283 77 -f 312 69 284 -f 283 312 284 -f 70 312 283 -f 314 70 283 -f 310 314 283 -f 78 314 310 -f 286 287 69 -f 312 286 69 -f 315 61 287 -f 286 315 287 -f 62 315 286 -f 317 62 286 -f 317 286 312 -f 70 317 312 -f 315 290 61 -f 315 289 290 -f 289 318 53 -f 289 53 290 -f 320 318 289 -f 320 54 318 -f 62 289 315 -f 62 320 289 -f 318 293 53 -f 318 292 293 -f 292 321 45 -f 292 45 293 -f 323 321 292 -f 323 46 321 -f 54 292 318 -f 54 323 292 -f 321 296 45 -f 321 295 296 -f 295 324 37 -f 295 37 296 -f 326 324 295 -f 326 38 324 -f 46 295 321 -f 46 326 295 -f 324 299 37 -f 324 298 299 -f 298 327 29 -f 298 29 299 -f 329 327 298 -f 329 30 327 -f 38 298 324 -f 38 329 298 -f 327 302 29 -f 327 301 302 -f 301 330 21 -f 301 21 302 -f 332 330 301 -f 332 22 330 -f 30 301 327 -f 30 332 301 -f 330 305 21 -f 330 304 305 -f 304 333 13 -f 304 13 305 -f 335 333 304 -f 335 14 333 -f 22 304 330 -f 22 335 304 -f 333 308 13 -f 333 307 308 -f 336 5 308 -f 307 336 308 -f 6 336 307 -f 338 6 307 -f 14 307 333 -f 14 338 307 -f 86 139 311 -f 140 139 86 -f 311 340 78 -f 139 340 311 -f 341 79 139 -f 139 79 340 -f 87 341 140 -f 140 341 139 -f 78 313 314 -f 340 313 78 -f 342 70 314 -f 313 342 314 -f 344 71 313 -f 71 342 313 -f 79 344 340 -f 340 344 313 -f 70 316 317 -f 342 316 70 -f 345 62 317 -f 316 345 317 -f 63 345 316 -f 347 63 316 -f 347 316 342 -f 71 347 342 -f 62 345 320 -f 345 319 320 -f 319 348 54 -f 319 54 320 -f 350 348 319 -f 350 55 348 -f 63 319 345 -f 63 350 319 -f 54 348 323 -f 348 322 323 -f 322 351 46 -f 322 46 323 -f 353 351 322 -f 353 47 351 -f 55 322 348 -f 55 353 322 -f 46 351 326 -f 351 325 326 -f 325 354 38 -f 325 38 326 -f 356 354 325 -f 356 39 354 -f 47 325 351 -f 47 356 325 -f 38 354 329 -f 354 328 329 -f 328 357 30 -f 328 30 329 -f 359 357 328 -f 359 31 357 -f 39 328 354 -f 39 359 328 -f 30 331 332 -f 357 331 30 -f 360 22 332 -f 331 360 332 -f 23 360 331 -f 362 23 331 -f 362 331 357 -f 31 362 357 -f 22 334 335 -f 360 334 22 -f 363 14 335 -f 334 363 335 -f 15 363 334 -f 365 15 334 -f 365 334 360 -f 23 365 360 -f 14 337 338 -f 363 337 14 -f 366 6 338 -f 337 366 338 -f 7 366 337 -f 368 7 337 -f 368 337 363 -f 15 368 363 -f 146 145 341 -f 146 341 87 -f 145 370 79 -f 145 79 341 -f 371 370 145 -f 371 80 370 -f 88 145 146 -f 88 371 145 -f 370 343 344 -f 370 344 79 -f 343 372 71 -f 343 71 344 -f 373 372 343 -f 373 72 372 -f 80 343 370 -f 80 373 343 -f 372 347 71 -f 372 346 347 -f 346 63 347 -f 346 374 63 -f 375 374 346 -f 375 64 374 -f 72 346 372 -f 72 375 346 -f 349 350 63 -f 374 349 63 -f 376 55 350 -f 349 376 350 -f 56 376 349 -f 377 56 349 -f 377 349 374 -f 64 377 374 -f 352 353 55 -f 376 352 55 -f 378 47 353 -f 352 378 353 -f 48 378 352 -f 379 48 352 -f 379 352 376 -f 56 379 376 -f 355 356 47 -f 378 355 47 -f 380 39 356 -f 355 380 356 -f 40 380 355 -f 381 40 355 -f 381 355 378 -f 48 381 378 -f 358 359 39 -f 380 358 39 -f 382 31 359 -f 358 382 359 -f 32 382 358 -f 383 32 358 -f 383 358 380 -f 40 383 380 -f 382 362 31 -f 382 361 362 -f 361 23 362 -f 361 384 23 -f 385 384 361 -f 385 24 384 -f 32 361 382 -f 32 385 361 -f 384 365 23 -f 384 364 365 -f 364 15 365 -f 364 386 15 -f 387 16 386 -f 387 386 364 -f 24 364 384 -f 24 387 364 -f 386 368 15 -f 386 367 368 -f 367 7 368 -f 367 388 7 -f 389 388 367 -f 389 8 388 -f 16 367 386 -f 16 389 367 -f 150 371 88 -f 151 150 88 -f 150 80 371 -f 150 391 80 -f 162 391 150 -f 162 73 391 -f 162 150 151 -f 81 162 151 -f 391 166 373 -f 391 373 80 -f 166 72 373 -f 166 392 72 -f 167 392 166 -f 167 65 392 -f 73 166 391 -f 73 167 166 -f 392 172 375 -f 392 375 72 -f 172 64 375 -f 172 393 64 -f 173 393 172 -f 173 57 393 -f 65 172 392 -f 65 173 172 -f 178 377 64 -f 393 178 64 -f 394 56 377 -f 178 394 377 -f 49 394 178 -f 179 49 178 -f 179 178 393 -f 57 179 393 -f 184 379 56 -f 394 184 56 -f 395 48 379 -f 184 395 379 -f 41 395 184 -f 185 41 184 -f 185 184 394 -f 49 185 394 -f 190 381 48 -f 395 190 48 -f 396 40 381 -f 190 396 381 -f 33 396 190 -f 191 33 190 -f 191 190 395 -f 41 191 395 -f 196 383 40 -f 396 196 40 -f 397 32 383 -f 196 397 383 -f 25 397 196 -f 197 25 196 -f 197 196 396 -f 33 197 396 -f 202 385 32 -f 397 202 32 -f 398 24 385 -f 202 398 385 -f 17 398 202 -f 203 17 202 -f 203 202 397 -f 25 203 397 -f 208 387 24 -f 398 208 24 -f 399 16 387 -f 208 399 387 -f 9 399 208 -f 209 9 208 -f 209 208 398 -f 17 209 398 -f 214 389 16 -f 399 214 16 -f 214 8 389 -f 214 400 8 -f 215 400 214 -f 215 1 400 -f 215 214 399 -f 9 215 399 -f 105 2 246 -f 249 105 246 -f 249 246 3 -f 104 249 3 -f 104 3 279 -f 279 3 276 -f 279 276 103 -f 276 4 103 -f 103 4 309 -f 309 4 306 -f 309 306 102 -f 102 306 5 -f 339 102 5 -f 336 339 5 -f 101 339 336 -f 6 101 336 -f 6 369 101 -f 366 369 6 -f 7 100 366 -f 100 369 366 -f 388 390 100 -f 388 100 7 -f 8 99 390 -f 8 390 388 -f 400 401 99 -f 400 99 8 -f 1 401 400 -f 1 98 401 -f 219 98 216 -f 98 1 216 -f 105 219 2 -f 219 216 2 diff --git a/applications/plugins/SensableEmulation/examples/testOmniDriverEmu.scn b/applications/plugins/SensableEmulation/examples/testOmniDriverEmu.scn deleted file mode 100644 index e27e25b8c6f..00000000000 --- a/applications/plugins/SensableEmulation/examples/testOmniDriverEmu.scn +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SensableEmulation/initSensableEmulation.cpp b/applications/plugins/SensableEmulation/initSensableEmulation.cpp deleted file mode 100644 index 1c218b3ab77..00000000000 --- a/applications/plugins/SensableEmulation/initSensableEmulation.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#include - -namespace sofa -{ - -namespace component -{ - -//Here are just several convenient functions to help user to know what contains the plugin - -extern "C" { - SOFA_SENSABLEEMUPLUGIN_API void initExternalModule(); - SOFA_SENSABLEEMUPLUGIN_API const char* getModuleName(); - SOFA_SENSABLEEMUPLUGIN_API const char* getModuleVersion(); - SOFA_SENSABLEEMUPLUGIN_API const char* getModuleLicense(); - SOFA_SENSABLEEMUPLUGIN_API const char* getModuleDescription(); - SOFA_SENSABLEEMUPLUGIN_API const char* getModuleComponentList(); -} - -void initExternalModule() -{ - static bool first = true; - if (first) - { - first = false; - } -} - -const char* getModuleName() -{ - return "SensableEmulation"; -} - -const char* getModuleVersion() -{ - return "beta 1.0"; -} - -const char* getModuleLicense() -{ - return "LGPL"; -} - -const char* getModuleDescription() -{ - return "Force feedback with sensable devices into SOFA Framework"; -} - -const char* getModuleComponentList() -{ - return "OmniDriverEmu"; -} - -} // namespace component - -} // namespace sofa - - diff --git a/applications/plugins/SensableEmulation/pthread/pthread.h b/applications/plugins/SensableEmulation/pthread/pthread.h deleted file mode 100644 index b4072f72c6f..00000000000 --- a/applications/plugins/SensableEmulation/pthread/pthread.h +++ /dev/null @@ -1,1368 +0,0 @@ -/* This is an implementation of the threads API of POSIX 1003.1-2001. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#if !defined( PTHREAD_H ) -#define PTHREAD_H - -/* - * See the README file for an explanation of the pthreads-win32 version - * numbering scheme and how the DLL is named etc. - */ -#define PTW32_VERSION 2,9,1,0 -#define PTW32_VERSION_STRING "2, 9, 1, 0\0" - -/* There are three implementations of cancel cleanup. - * Note that pthread.h is included in both application - * compilation units and also internally for the library. - * The code here and within the library aims to work - * for all reasonable combinations of environments. - * - * The three implementations are: - * - * WIN32 SEH - * C - * C++ - * - * Please note that exiting a push/pop block via - * "return", "exit", "break", or "continue" will - * lead to different behaviour amongst applications - * depending upon whether the library was built - * using SEH, C++, or C. For example, a library built - * with SEH will call the cleanup routine, while both - * C++ and C built versions will not. - */ - -/* - * Define defaults for cleanup code. - * Note: Unless the build explicitly defines one of the following, then - * we default to standard C style cleanup. This style uses setjmp/longjmp - * in the cancelation and thread exit implementations and therefore won't - * do stack unwinding if linked to applications that have it (e.g. - * C++ apps). This is currently consistent with most/all commercial Unix - * POSIX threads implementations. - */ -#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( __CLEANUP_C ) -# define __CLEANUP_C -#endif - -#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined(PTW32_RC_MSC)) -#error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler. -#endif - -/* - * Stop here if we are being included by the resource compiler. - */ -#if !defined(RC_INVOKED) - -#undef PTW32_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_LEVEL -#define PTW32_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_LEVEL -#define PTW32_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_LEVEL_MAX 3 - -#if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_LEVEL) -#define PTW32_LEVEL PTW32_LEVEL_MAX -/* Include everything */ -#endif - -#if defined(_UWIN) -# define HAVE_STRUCT_TIMESPEC 1 -# define HAVE_SIGNAL_H 1 -# undef HAVE_PTW32_CONFIG_H -# pragma comment(lib, "pthread") -#endif - -/* - * ------------------------------------------------------------- - * - * - * Module: pthread.h - * - * Purpose: - * Provides an implementation of PThreads based upon the - * standard: - * - * POSIX 1003.1-2001 - * and - * The Single Unix Specification version 3 - * - * (these two are equivalent) - * - * in order to enhance code portability between Windows, - * various commercial Unix implementations, and Linux. - * - * See the ANNOUNCE file for a full list of conforming - * routines and defined constants, and a list of missing - * routines and constants not defined in this implementation. - * - * Authors: - * There have been many contributors to this library. - * The initial implementation was contributed by - * John Bossom, and several others have provided major - * sections or revisions of parts of the implementation. - * Often significant effort has been contributed to - * find and fix important bugs and other problems to - * improve the reliability of the library, which sometimes - * is not reflected in the amount of code which changed as - * result. - * As much as possible, the contributors are acknowledged - * in the ChangeLog file in the source code distribution - * where their changes are noted in detail. - * - * Contributors are listed in the CONTRIBUTORS file. - * - * As usual, all bouquets go to the contributors, and all - * brickbats go to the project maintainer. - * - * Maintainer: - * The code base for this project is coordinated and - * eventually pre-tested, packaged, and made available by - * - * Ross Johnson - * - * QA Testers: - * Ultimately, the library is tested in the real world by - * a host of competent and demanding scientists and - * engineers who report bugs and/or provide solutions - * which are then fixed or incorporated into subsequent - * versions of the library. Each time a bug is fixed, a - * test case is written to prove the fix and ensure - * that later changes to the code don't reintroduce the - * same error. The number of test cases is slowly growing - * and therefore so is the code reliability. - * - * Compliance: - * See the file ANNOUNCE for the list of implemented - * and not-implemented routines and defined options. - * Of course, these are all defined is this file as well. - * - * Web site: - * The source code and other information about this library - * are available from - * - * http://sources.redhat.com/pthreads-win32/ - * - * ------------------------------------------------------------- - */ - -/* Try to avoid including windows.h */ -#if (defined(__MINGW64__) || defined(__MINGW32__)) && defined(__cplusplus) -#define PTW32_INCLUDE_WINDOWS_H -#endif - -#if defined(PTW32_INCLUDE_WINDOWS_H) -#include -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1300 || defined(__DMC__) -/* - * VC++6.0 or early compiler's header has no DWORD_PTR type. - */ -typedef unsigned long DWORD_PTR; -typedef unsigned long ULONG_PTR; -#endif -/* - * ----------------- - * autoconf switches - * ----------------- - */ - -#if defined(HAVE_PTW32_CONFIG_H) -#include "config.h" -#endif /* HAVE_PTW32_CONFIG_H */ - -#if !defined(NEED_FTIME) -#include -#else /* NEED_FTIME */ -/* use native WIN32 time API */ -#endif /* NEED_FTIME */ - -#if defined(HAVE_SIGNAL_H) -#include -#endif /* HAVE_SIGNAL_H */ - -#include - -/* - * Boolean values to make us independent of system includes. - */ -enum { - PTW32_FALSE = 0, - PTW32_TRUE = (! PTW32_FALSE) -}; - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Several systems don't define some error numbers. - */ -#if !defined(ENOTSUP) -# define ENOTSUP 48 /* This is the value in Solaris. */ -#endif - -#if !defined(ETIMEDOUT) -# define ETIMEDOUT 10060 /* Same as WSAETIMEDOUT */ -#endif - -#if !defined(ENOSYS) -# define ENOSYS 140 /* Semi-arbitrary value */ -#endif - -#if !defined(EDEADLK) -# if defined(EDEADLOCK) -# define EDEADLK EDEADLOCK -# else -# define EDEADLK 36 /* This is the value in MSVC. */ -# endif -#endif - -/* POSIX 2008 - related to robust mutexes */ -#if !defined(EOWNERDEAD) -# define EOWNERDEAD 43 -#endif -#if !defined(ENOTRECOVERABLE) -# define ENOTRECOVERABLE 44 -#endif - -#include - -/* - * To avoid including windows.h we define only those things that we - * actually need from it. - */ -#if !defined(PTW32_INCLUDE_WINDOWS_H) -#if !defined(HANDLE) -# define PTW32__HANDLE_DEF -# define HANDLE void * -#endif -#if !defined(DWORD) -# define PTW32__DWORD_DEF -# define DWORD unsigned long -#endif -#endif - -#if !defined(HAVE_STRUCT_TIMESPEC) -#define HAVE_STRUCT_TIMESPEC -#if !defined(_TIMESPEC_DEFINED) -#define _TIMESPEC_DEFINED -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif /* _TIMESPEC_DEFINED */ -#endif /* HAVE_STRUCT_TIMESPEC */ - -#if !defined(SIG_BLOCK) -#define SIG_BLOCK 0 -#endif /* SIG_BLOCK */ - -#if !defined(SIG_UNBLOCK) -#define SIG_UNBLOCK 1 -#endif /* SIG_UNBLOCK */ - -#if !defined(SIG_SETMASK) -#define SIG_SETMASK 2 -#endif /* SIG_SETMASK */ - -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ - -/* - * ------------------------------------------------------------- - * - * POSIX 1003.1-2001 Options - * ========================= - * - * Options are normally set in , which is not provided - * with pthreads-win32. - * - * For conformance with the Single Unix Specification (version 3), all of the - * options below are defined, and have a value of either -1 (not supported) - * or 200112L (supported). - * - * These options can neither be left undefined nor have a value of 0, because - * either indicates that sysconf(), which is not implemented, may be used at - * runtime to check the status of the option. - * - * _POSIX_THREADS (== 200112L) - * If == 200112L, you can use threads - * - * _POSIX_THREAD_ATTR_STACKSIZE (== 200112L) - * If == 200112L, you can control the size of a thread's - * stack - * pthread_attr_getstacksize - * pthread_attr_setstacksize - * - * _POSIX_THREAD_ATTR_STACKADDR (== -1) - * If == 200112L, you can allocate and control a thread's - * stack. If not supported, the following functions - * will return ENOSYS, indicating they are not - * supported: - * pthread_attr_getstackaddr - * pthread_attr_setstackaddr - * - * _POSIX_THREAD_PRIORITY_SCHEDULING (== -1) - * If == 200112L, you can use realtime scheduling. - * This option indicates that the behaviour of some - * implemented functions conforms to the additional TPS - * requirements in the standard. E.g. rwlocks favour - * writers over readers when threads have equal priority. - * - * _POSIX_THREAD_PRIO_INHERIT (== -1) - * If == 200112L, you can create priority inheritance - * mutexes. - * pthread_mutexattr_getprotocol + - * pthread_mutexattr_setprotocol + - * - * _POSIX_THREAD_PRIO_PROTECT (== -1) - * If == 200112L, you can create priority ceiling mutexes - * Indicates the availability of: - * pthread_mutex_getprioceiling - * pthread_mutex_setprioceiling - * pthread_mutexattr_getprioceiling - * pthread_mutexattr_getprotocol + - * pthread_mutexattr_setprioceiling - * pthread_mutexattr_setprotocol + - * - * _POSIX_THREAD_PROCESS_SHARED (== -1) - * If set, you can create mutexes and condition - * variables that can be shared with another - * process.If set, indicates the availability - * of: - * pthread_mutexattr_getpshared - * pthread_mutexattr_setpshared - * pthread_condattr_getpshared - * pthread_condattr_setpshared - * - * _POSIX_THREAD_SAFE_FUNCTIONS (== 200112L) - * If == 200112L you can use the special *_r library - * functions that provide thread-safe behaviour - * - * _POSIX_READER_WRITER_LOCKS (== 200112L) - * If == 200112L, you can use read/write locks - * - * _POSIX_SPIN_LOCKS (== 200112L) - * If == 200112L, you can use spin locks - * - * _POSIX_BARRIERS (== 200112L) - * If == 200112L, you can use barriers - * - * + These functions provide both 'inherit' and/or - * 'protect' protocol, based upon these macro - * settings. - * - * ------------------------------------------------------------- - */ - -/* - * POSIX Options - */ -#undef _POSIX_THREADS -#define _POSIX_THREADS 200809L - -#undef _POSIX_READER_WRITER_LOCKS -#define _POSIX_READER_WRITER_LOCKS 200809L - -#undef _POSIX_SPIN_LOCKS -#define _POSIX_SPIN_LOCKS 200809L - -#undef _POSIX_BARRIERS -#define _POSIX_BARRIERS 200809L - -#undef _POSIX_THREAD_SAFE_FUNCTIONS -#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L - -#undef _POSIX_THREAD_ATTR_STACKSIZE -#define _POSIX_THREAD_ATTR_STACKSIZE 200809L - -/* - * The following options are not supported - */ -#undef _POSIX_THREAD_ATTR_STACKADDR -#define _POSIX_THREAD_ATTR_STACKADDR -1 - -#undef _POSIX_THREAD_PRIO_INHERIT -#define _POSIX_THREAD_PRIO_INHERIT -1 - -#undef _POSIX_THREAD_PRIO_PROTECT -#define _POSIX_THREAD_PRIO_PROTECT -1 - -/* TPS is not fully supported. */ -#undef _POSIX_THREAD_PRIORITY_SCHEDULING -#define _POSIX_THREAD_PRIORITY_SCHEDULING -1 - -#undef _POSIX_THREAD_PROCESS_SHARED -#define _POSIX_THREAD_PROCESS_SHARED -1 - - -/* - * POSIX 1003.1-2001 Limits - * =========================== - * - * These limits are normally set in , which is not provided with - * pthreads-win32. - * - * PTHREAD_DESTRUCTOR_ITERATIONS - * Maximum number of attempts to destroy - * a thread's thread-specific data on - * termination (must be at least 4) - * - * PTHREAD_KEYS_MAX - * Maximum number of thread-specific data keys - * available per process (must be at least 128) - * - * PTHREAD_STACK_MIN - * Minimum supported stack size for a thread - * - * PTHREAD_THREADS_MAX - * Maximum number of threads supported per - * process (must be at least 64). - * - * SEM_NSEMS_MAX - * The maximum number of semaphores a process can have. - * (must be at least 256) - * - * SEM_VALUE_MAX - * The maximum value a semaphore can have. - * (must be at least 32767) - * - */ -#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 - -#undef PTHREAD_DESTRUCTOR_ITERATIONS -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -#undef _POSIX_THREAD_KEYS_MAX -#define _POSIX_THREAD_KEYS_MAX 128 - -#undef PTHREAD_KEYS_MAX -#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX - -#undef PTHREAD_STACK_MIN -#define PTHREAD_STACK_MIN 0 - -#undef _POSIX_THREAD_THREADS_MAX -#define _POSIX_THREAD_THREADS_MAX 64 - - /* Arbitrary value */ -#undef PTHREAD_THREADS_MAX -#define PTHREAD_THREADS_MAX 2019 - -#undef _POSIX_SEM_NSEMS_MAX -#define _POSIX_SEM_NSEMS_MAX 256 - - /* Arbitrary value */ -#undef SEM_NSEMS_MAX -#define SEM_NSEMS_MAX 1024 - -#undef _POSIX_SEM_VALUE_MAX -#define _POSIX_SEM_VALUE_MAX 32767 - -#undef SEM_VALUE_MAX -#define SEM_VALUE_MAX INT_MAX - - -#if defined(__GNUC__) && !defined(__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#if !defined(PTW32_STATIC_LIB) -# if defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * The Open Watcom C/C++ compiler uses a non-standard calling convention - * that passes function args in registers unless __cdecl is explicitly specified - * in exposed function prototypes. - * - * We force all calls to cdecl even though this could slow Watcom code down - * slightly. If you know that the Watcom compiler will be used to build both - * the DLL and application, then you can probably define this as a null string. - * Remember that pthread.h (this file) is used for both the DLL and application builds. - */ -#define PTW32_CDECL __cdecl - -#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX -# include -#else -/* - * Generic handle type - intended to extend uniqueness beyond - * that available with a simple pointer. It should scale for either - * IA-32 or IA-64. - */ -typedef struct { - void * p; /* Pointer to actual object */ - unsigned int x; /* Extra information - reuse count etc */ -} ptw32_handle_t; - -typedef ptw32_handle_t pthread_t; -typedef struct pthread_attr_t_ * pthread_attr_t; -typedef struct pthread_once_t_ pthread_once_t; -typedef struct pthread_key_t_ * pthread_key_t; -typedef struct pthread_mutex_t_ * pthread_mutex_t; -typedef struct pthread_mutexattr_t_ * pthread_mutexattr_t; -typedef struct pthread_cond_t_ * pthread_cond_t; -typedef struct pthread_condattr_t_ * pthread_condattr_t; -#endif -typedef struct pthread_rwlock_t_ * pthread_rwlock_t; -typedef struct pthread_rwlockattr_t_ * pthread_rwlockattr_t; -typedef struct pthread_spinlock_t_ * pthread_spinlock_t; -typedef struct pthread_barrier_t_ * pthread_barrier_t; -typedef struct pthread_barrierattr_t_ * pthread_barrierattr_t; - -/* - * ==================== - * ==================== - * POSIX Threads - * ==================== - * ==================== - */ - -enum { -/* - * pthread_attr_{get,set}detachstate - */ - PTHREAD_CREATE_JOINABLE = 0, /* Default */ - PTHREAD_CREATE_DETACHED = 1, - -/* - * pthread_attr_{get,set}inheritsched - */ - PTHREAD_INHERIT_SCHED = 0, - PTHREAD_EXPLICIT_SCHED = 1, /* Default */ - -/* - * pthread_{get,set}scope - */ - PTHREAD_SCOPE_PROCESS = 0, - PTHREAD_SCOPE_SYSTEM = 1, /* Default */ - -/* - * pthread_setcancelstate paramters - */ - PTHREAD_CANCEL_ENABLE = 0, /* Default */ - PTHREAD_CANCEL_DISABLE = 1, - -/* - * pthread_setcanceltype parameters - */ - PTHREAD_CANCEL_ASYNCHRONOUS = 0, - PTHREAD_CANCEL_DEFERRED = 1, /* Default */ - -/* - * pthread_mutexattr_{get,set}pshared - * pthread_condattr_{get,set}pshared - */ - PTHREAD_PROCESS_PRIVATE = 0, - PTHREAD_PROCESS_SHARED = 1, - -/* - * pthread_mutexattr_{get,set}robust - */ - PTHREAD_MUTEX_STALLED = 0, /* Default */ - PTHREAD_MUTEX_ROBUST = 1, - -/* - * pthread_barrier_wait - */ - PTHREAD_BARRIER_SERIAL_THREAD = -1 -}; - -/* - * ==================== - * ==================== - * Cancelation - * ==================== - * ==================== - */ -#define PTHREAD_CANCELED ((void *)(size_t) -1) - - -/* - * ==================== - * ==================== - * Once Key - * ==================== - * ==================== - */ -#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0} - -struct pthread_once_t_ -{ - int done; /* indicates if user function has been executed */ - void * lock; - int reserved1; - int reserved2; -}; - - -/* - * ==================== - * ==================== - * Object initialisers - * ==================== - * ==================== - */ -#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t)(size_t) -1) -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t)(size_t) -2) -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t)(size_t) -3) - -/* - * Compatibility with LinuxThreads - */ -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP PTHREAD_RECURSIVE_MUTEX_INITIALIZER -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP PTHREAD_ERRORCHECK_MUTEX_INITIALIZER - -#define PTHREAD_COND_INITIALIZER ((pthread_cond_t)(size_t) -1) - -#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t)(size_t) -1) - -#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t)(size_t) -1) - - -/* - * Mutex types. - */ -enum -{ - /* Compatibility with LinuxThreads */ - PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_TIMED_NP = PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_ADAPTIVE_NP = PTHREAD_MUTEX_FAST_NP, - /* For compatibility with POSIX */ - PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL -}; - - -typedef struct ptw32_cleanup_t ptw32_cleanup_t; - -#if defined(_MSC_VER) -/* Disable MSVC 'anachronism used' warning */ -#pragma warning( disable : 4229 ) -#endif - -typedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *); - -#if defined(_MSC_VER) -#pragma warning( default : 4229 ) -#endif - -struct ptw32_cleanup_t -{ - ptw32_cleanup_callback_t routine; - void *arg; - struct ptw32_cleanup_t *prev; -}; - -#if defined(__CLEANUP_SEH) - /* - * WIN32 SEH version of cancel cleanup. - */ - -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - ptw32_cleanup_t _cleanup; \ - \ - _cleanup.routine = (ptw32_cleanup_callback_t)(_rout); \ - _cleanup.arg = (_arg); \ - __try \ - { \ - -#define pthread_cleanup_pop( _execute ) \ - } \ - __finally \ - { \ - if( _execute || AbnormalTermination()) \ - { \ - (*(_cleanup.routine))( _cleanup.arg ); \ - } \ - } \ - } - -#else /* __CLEANUP_SEH */ - -#if defined(__CLEANUP_C) - - /* - * C implementation of PThreads cancel cleanup - */ - -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - ptw32_cleanup_t _cleanup; \ - \ - ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ - -#define pthread_cleanup_pop( _execute ) \ - (void) ptw32_pop_cleanup( _execute ); \ - } - -#else /* __CLEANUP_C */ - -#if defined(__CLEANUP_CXX) - - /* - * C++ version of cancel cleanup. - * - John E. Bossom. - */ - - class PThreadCleanup { - /* - * PThreadCleanup - * - * Purpose - * This class is a C++ helper class that is - * used to implement pthread_cleanup_push/ - * pthread_cleanup_pop. - * The destructor of this class automatically - * pops the pushed cleanup routine regardless - * of how the code exits the scope - * (i.e. such as by an exception) - */ - ptw32_cleanup_callback_t cleanUpRout; - void * obj; - int executeIt; - - public: - PThreadCleanup() : - cleanUpRout( 0 ), - obj( 0 ), - executeIt( 0 ) - /* - * No cleanup performed - */ - { - } - - PThreadCleanup( - ptw32_cleanup_callback_t routine, - void * arg ) : - cleanUpRout( routine ), - obj( arg ), - executeIt( 1 ) - /* - * Registers a cleanup routine for 'arg' - */ - { - } - - ~PThreadCleanup() - { - if ( executeIt && ((void *) cleanUpRout != (void *) 0) ) - { - (void) (*cleanUpRout)( obj ); - } - } - - void execute( int exec ) - { - executeIt = exec; - } - }; - - /* - * C++ implementation of PThreads cancel cleanup; - * This implementation takes advantage of a helper - * class who's destructor automatically calls the - * cleanup routine if we exit our scope weirdly - */ -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - PThreadCleanup cleanup((ptw32_cleanup_callback_t)(_rout), \ - (void *) (_arg) ); - -#define pthread_cleanup_pop( _execute ) \ - cleanup.execute( _execute ); \ - } - -#else - -#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. - -#endif /* __CLEANUP_CXX */ - -#endif /* __CLEANUP_C */ - -#endif /* __CLEANUP_SEH */ - -/* - * =============== - * =============== - * Methods - * =============== - * =============== - */ - -/* - * PThread Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, - int *detachstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, - void **stackaddr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, - size_t * stacksize); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, - int detachstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, - void *stackaddr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, - size_t stacksize); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, - struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, - const struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, - int); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy (const pthread_attr_t *, - int *); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, - int inheritsched); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(const pthread_attr_t * attr, - int * inheritsched); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, - int); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, - int *); - -/* - * PThread Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid, - const pthread_attr_t * attr, - void *(PTW32_CDECL *start) (void *), - void *arg); - -PTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid); - -PTW32_DLLPORT int PTW32_CDECL pthread_equal (pthread_t t1, - pthread_t t2); - -PTW32_DLLPORT void PTW32_CDECL pthread_exit (void *value_ptr); - -PTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread, - void **value_ptr); - -PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void); - -PTW32_DLLPORT int PTW32_CDECL pthread_cancel (pthread_t thread); - -PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state, - int *oldstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type, - int *oldtype); - -PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void); - -PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control, - void (PTW32_CDECL *init_routine) (void)); - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute); - -PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup, - ptw32_cleanup_callback_t routine, - void *arg); -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Thread Specific Data Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_key_create (pthread_key_t * key, - void (PTW32_CDECL *destructor) (void *)); - -PTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key); - -PTW32_DLLPORT int PTW32_CDECL pthread_setspecific (pthread_key_t key, - const void *value); - -PTW32_DLLPORT void * PTW32_CDECL pthread_getspecific (pthread_key_t key); - - -/* - * Mutex Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t - * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, - int pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setrobust( - pthread_mutexattr_t *attr, - int robust); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getrobust( - const pthread_mutexattr_t * attr, - int * robust); - -/* - * Barrier Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t - * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, - int pshared); - -/* - * Mutex Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, - const pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t * mutex, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_consistent (pthread_mutex_t * mutex); - -/* - * Spinlock Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); - -/* - * Barrier Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, - const pthread_barrierattr_t * attr, - unsigned int count); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); - -/* - * Condition Variable Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, - int pshared); - -/* - * Condition Variable Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, - const pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, - pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, - pthread_mutex_t * mutex, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); - -/* - * Scheduling - */ -PTW32_DLLPORT int PTW32_CDECL pthread_setschedparam (pthread_t thread, - int policy, - const struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_getschedparam (pthread_t thread, - int *policy, - struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency (int); - -PTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency (void); - -/* - * Read-Write Lock Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, - const pthread_rwlockattr_t *attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, - int pshared); - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 - -/* - * Signal Functions. Should be defined in but MSVC and MinGW32 - * already have signal.h that don't define these. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig); - -/* - * Non-portable functions - */ - -/* - * Compatibility with Linux. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, - int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, - int *kind); - -/* - * Possibly supported by other POSIX threads implementations - */ -PTW32_DLLPORT int PTW32_CDECL pthread_delay_np (struct timespec * interval); -PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void); -PTW32_DLLPORT unsigned __int64 PTW32_CDECL pthread_getunique_np(pthread_t thread); - -/* - * Useful if an application wants to statically link - * the lib rather than load the DLL at run-time. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); - -/* - * Features that are auto-detected at load/run time. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int); -enum ptw32_features { - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ - PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ -}; - -/* - * Register a system time change with the library. - * Causes the library to perform various functions - * in response to the change. Should be called whenever - * the application's top level window receives a - * WM_TIMECHANGE message. It can be passed directly to - * pthread_create() as a new thread if desired. - */ -PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); - -#endif /*PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - -/* - * Returns the Win32 HANDLE for the POSIX thread. - */ -PTW32_DLLPORT HANDLE PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); -/* - * Returns the win32 thread ID for POSIX thread. - */ -PTW32_DLLPORT DWORD PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); - - -/* - * Protected Methods - * - * This function blocks until the given WIN32 handle - * is signaled or pthread_cancel had been called. - * This function allows the caller to hook into the - * PThreads cancel mechanism. It is implemented using - * - * WaitForMultipleObjects - * - * on 'waitHandle' and a manually reset WIN32 Event - * used to implement pthread_cancel. The 'timeout' - * argument to TimedWait is simply passed to - * WaitForMultipleObjects. - */ -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (HANDLE waitHandle); -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (HANDLE waitHandle, - DWORD timeout); - -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Thread-Safe C Runtime Library Mappings. - */ -#if !defined(_UWIN) -# if defined(NEED_ERRNO) - PTW32_DLLPORT int * PTW32_CDECL _errno( void ); -# else -# if !defined(errno) -# if (defined(_MT) || defined(_DLL)) - __declspec(dllimport) extern int * __cdecl _errno(void); -# define errno (*_errno()) -# endif -# endif -# endif -#endif - -/* - * Some compiler environments don't define some things. - */ -#if defined(__BORLANDC__) -# define _ftime ftime -# define _timeb timeb -#endif - -#if defined(__cplusplus) - -/* - * Internal exceptions - */ -class ptw32_exception {}; -class ptw32_exception_cancel : public ptw32_exception {}; -class ptw32_exception_exit : public ptw32_exception {}; - -#endif - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - -/* FIXME: This is only required if the library was built using SEH */ -/* - * Get internal SEH tag - */ -PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void); - -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -#if !defined(PTW32_BUILD) - -#if defined(__CLEANUP_SEH) - -/* - * Redefine the SEH __except keyword to ensure that applications - * propagate our internal exceptions up to the library's internal handlers. - */ -#define __except( E ) \ - __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \ - ? EXCEPTION_CONTINUE_SEARCH : ( E ) ) - -#endif /* __CLEANUP_SEH */ - -#if defined(__CLEANUP_CXX) - -/* - * Redefine the C++ catch keyword to ensure that applications - * propagate our internal exceptions up to the library's internal handlers. - */ -#if defined(_MSC_VER) - /* - * WARNING: Replace any 'catch( ... )' with 'PtW32CatchAll' - * if you want Pthread-Win32 cancelation and pthread_exit to work. - */ - -#if !defined(PtW32NoCatchWarn) - -#pragma message("Specify \"/DPtW32NoCatchWarn\" compiler flag to skip this message.") -#pragma message("------------------------------------------------------------------") -#pragma message("When compiling applications with MSVC++ and C++ exception handling:") -#pragma message(" Replace any 'catch( ... )' in routines called from POSIX threads") -#pragma message(" with 'PtW32CatchAll' or 'CATCHALL' if you want POSIX thread") -#pragma message(" cancelation and pthread_exit to work. For example:") -#pragma message("") -#pragma message(" #if defined(PtW32CatchAll)") -#pragma message(" PtW32CatchAll") -#pragma message(" #else") -#pragma message(" catch(...)") -#pragma message(" #endif") -#pragma message(" {") -#pragma message(" /* Catchall block processing */") -#pragma message(" }") -#pragma message("------------------------------------------------------------------") - -#endif - -#define PtW32CatchAll \ - catch( ptw32_exception & ) { throw; } \ - catch( ... ) - -#else /* _MSC_VER */ - -#define catch( E ) \ - catch( ptw32_exception & ) { throw; } \ - catch( E ) - -#endif /* _MSC_VER */ - -#endif /* __CLEANUP_CXX */ - -#endif /* ! PTW32_BUILD */ - -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#if defined(PTW32__HANDLE_DEF) -# undef HANDLE -#endif -#if defined(PTW32__DWORD_DEF) -# undef DWORD -#endif - -#undef PTW32_LEVEL -#undef PTW32_LEVEL_MAX - -#endif /* ! RC_INVOKED */ - -#endif /* PTHREAD_H */ diff --git a/applications/plugins/SensableEmulation/pthread/pthreadVC2.dll b/applications/plugins/SensableEmulation/pthread/pthreadVC2.dll deleted file mode 100644 index fcb5d9dcc1c..00000000000 Binary files a/applications/plugins/SensableEmulation/pthread/pthreadVC2.dll and /dev/null differ diff --git a/applications/plugins/SensableEmulation/pthread/pthreadVC2.lib b/applications/plugins/SensableEmulation/pthread/pthreadVC2.lib deleted file mode 100644 index c20ee200db3..00000000000 Binary files a/applications/plugins/SensableEmulation/pthread/pthreadVC2.lib and /dev/null differ diff --git a/applications/plugins/SensableEmulation/pthread/sched.h b/applications/plugins/SensableEmulation/pthread/sched.h deleted file mode 100644 index f36a97a66be..00000000000 --- a/applications/plugins/SensableEmulation/pthread/sched.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Module: sched.h - * - * Purpose: - * Provides an implementation of POSIX realtime extensions - * as defined in - * - * POSIX 1003.1b-1993 (POSIX.1b) - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ -#if !defined(_SCHED_H) -#define _SCHED_H - -#undef PTW32_SCHED_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_SCHED_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_SCHED_LEVEL -#define PTW32_SCHED_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_SCHED_LEVEL -#define PTW32_SCHED_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_SCHED_LEVEL_MAX 3 - -#if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_SCHED_LEVEL) -#define PTW32_SCHED_LEVEL PTW32_SCHED_LEVEL_MAX -/* Include everything */ -#endif - - -#if defined(__GNUC__) && !defined(__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#if !defined(PTW32_STATIC_LIB) -# if defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX */ - -#if (defined(__MINGW64__) || defined(__MINGW32__)) || defined(_UWIN) -# if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX -/* For pid_t */ -# include -/* Required by Unix 98 */ -# include -# else - typedef int pid_t; -# endif -#else - typedef int pid_t; -#endif - -/* Thread scheduling policies */ - -enum { - SCHED_OTHER = 0, - SCHED_FIFO, - SCHED_RR, - SCHED_MIN = SCHED_OTHER, - SCHED_MAX = SCHED_RR -}; - -struct sched_param { - int sched_priority; -}; - -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ - -PTW32_DLLPORT int __cdecl sched_yield (void); - -PTW32_DLLPORT int __cdecl sched_get_priority_min (int policy); - -PTW32_DLLPORT int __cdecl sched_get_priority_max (int policy); - -PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy); - -PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid); - -/* - * Note that this macro returns ENOTSUP rather than - * ENOSYS as might be expected. However, returning ENOSYS - * should mean that sched_get_priority_{min,max} are - * not implemented as well as sched_rr_get_interval. - * This is not the case, since we just don't support - * round-robin scheduling. Therefore I have chosen to - * return the same value as sched_setscheduler when - * SCHED_RR is passed to it. - */ -#define sched_rr_get_interval(_pid, _interval) \ - ( errno = ENOTSUP, (int) -1 ) - - -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_SCHED_LEVEL -#undef PTW32_SCHED_LEVEL_MAX - -#endif /* !_SCHED_H */ - diff --git a/applications/plugins/SensableEmulation/pthread/semaphore.h b/applications/plugins/SensableEmulation/pthread/semaphore.h deleted file mode 100644 index c6e9407e25b..00000000000 --- a/applications/plugins/SensableEmulation/pthread/semaphore.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Module: semaphore.h - * - * Purpose: - * Semaphores aren't actually part of the PThreads standard. - * They are defined by the POSIX Standard: - * - * POSIX 1003.1b-1993 (POSIX.1b) - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ -#if !defined( SEMAPHORE_H ) -#define SEMAPHORE_H - -#undef PTW32_SEMAPHORE_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_SEMAPHORE_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_SEMAPHORE_LEVEL -#define PTW32_SEMAPHORE_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_SEMAPHORE_LEVEL -#define PTW32_SEMAPHORE_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_SEMAPHORE_LEVEL_MAX 3 - -#if !defined(PTW32_SEMAPHORE_LEVEL) -#define PTW32_SEMAPHORE_LEVEL PTW32_SEMAPHORE_LEVEL_MAX -/* Include everything */ -#endif - -#if defined(__GNUC__) && ! defined (__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#if !defined(PTW32_STATIC_LIB) -# if defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX */ - -#define _POSIX_SEMAPHORES - -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ - -#if !defined(HAVE_MODE_T) -typedef unsigned int mode_t; -#endif - - -typedef struct sem_t_ * sem_t; - -PTW32_DLLPORT int __cdecl sem_init (sem_t * sem, - int pshared, - unsigned int value); - -PTW32_DLLPORT int __cdecl sem_destroy (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_trywait (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_wait (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_timedwait (sem_t * sem, - const struct timespec * abstime); - -PTW32_DLLPORT int __cdecl sem_post (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_post_multiple (sem_t * sem, - int count); - -PTW32_DLLPORT int __cdecl sem_open (const char * name, - int oflag, - mode_t mode, - unsigned int value); - -PTW32_DLLPORT int __cdecl sem_close (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_unlink (const char * name); - -PTW32_DLLPORT int __cdecl sem_getvalue (sem_t * sem, - int * sval); - -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_SEMAPHORE_LEVEL -#undef PTW32_SEMAPHORE_LEVEL_MAX - -#endif /* !SEMAPHORE_H */ diff --git a/applications/plugins/SofaSimpleGUI/CMakeLists.txt b/applications/plugins/SofaSimpleGUI/CMakeLists.txt deleted file mode 100644 index 6f8153328c4..00000000000 --- a/applications/plugins/SofaSimpleGUI/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 3.22) -project(SofaSimpleGUI) - -set(SOFASIMPLEGUI_VERSION 0.1) - -set(HEADER_FILES - Camera.h - Interactor.h - PickedPoint.h - SofaGL.h - SofaScene.h - SpringInteractor.h - VisualPickVisitor.h - config.h.in -) - -set(SOURCE_FILES - Camera.cpp - Interactor.cpp - SofaGL.cpp - SofaScene.cpp - SpringInteractor.cpp - VisualPickVisitor.cpp - initSimpleGUI.cpp -) - -sofa_find_package(Sofa.Component REQUIRED) -sofa_find_package(Eigen3 REQUIRED) -sofa_find_package(Sofa.GL REQUIRED) -sofa_find_package(Sofa.Simulation.Graph REQUIRED) - -add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) -target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Component Sofa.GL Sofa.Simulation.Graph) -target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen) - -set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${SOFASIMPLEGUI_VERSION}) - -## Install rules for the library and headers; CMake package configurations files -sofa_create_package_with_targets( - PACKAGE_NAME ${PROJECT_NAME} - PACKAGE_VERSION ${SOFASIMPLEGUI_VERSION} - TARGETS ${PROJECT_NAME} AUTO_SET_TARGET_PROPERTIES - INCLUDE_INSTALL_DIR ${PROJECT_NAME} - ) diff --git a/applications/plugins/SofaSimpleGUI/Camera.cpp b/applications/plugins/SofaSimpleGUI/Camera.cpp deleted file mode 100644 index 498cb77f94d..00000000000 --- a/applications/plugins/SofaSimpleGUI/Camera.cpp +++ /dev/null @@ -1,196 +0,0 @@ -#include "Camera.h" -#include -#include -using std::cout; -using std::endl; - - -namespace sofa::simplegui -{ - -Camera::Camera() -{ - transform.matrix() = Eigen::Matrix4f::Identity(); - tb_tournerXY=0, tb_translaterXY=0, tb_bougerZ=0; -} - -void Camera::lookAt() -{ - - glMultMatrixf( transform.data() ); -} - -template inline T sqr(const T& t){ return t*t; } - -void Camera::viewAll( float xmin, float ymin, float zmin, float xmax, float ymax, float zmax ) -{ - Vec3 pmin(xmin,ymin,zmin), pmax(xmax,ymax,zmax); - Vec3 pcen = (pmin+pmax)*0.5; - Vec3 diag = pmax-pmin; - float radius = diag.norm(); - // cout<<"Camera, diag = " << diag.transpose() << endl; - // cout<<"Camera, scene radius = " << radius << endl; - - // Desired distance: distance * tan(a) = radius - float distance = 1.5 * radius / tan(fovy * M_PI/180); - // cout<<"Camera::viewAll, angle = " << fovy << ", tan = " << tan(fovy) << ", distance = " << distance << endl; - // cout<<"Camera::viewAll, xmin xmax ymin ymax zmin zmax = " << xmin << " " << xmax <<" "<fabs(dy) ) -// { // rotation z -// float angle = dx; -// Eigen::AngleAxisf rot( angle, Vec3(0,0,-1) ); -// transform.linear() = rot*transform.linear(); -// } -// else if( fabs(dy)>fabs(dx) ) -// { - transform.translation() += Vec3( 0,0, -dy/100); -// } - } - tb_ancienX = x; - tb_ancienY = y; - return true; - } - return false; -} - -Camera::Vec3 Camera::eye() const { - return - transform.linear().inverse() * transform.translation(); -} - - -} - diff --git a/applications/plugins/SofaSimpleGUI/Camera.h b/applications/plugins/SofaSimpleGUI/Camera.h deleted file mode 100644 index 1ef48542626..00000000000 --- a/applications/plugins/SofaSimpleGUI/Camera.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef SOFA_SIMPLEGUI_CAMERA_H -#define SOFA_SIMPLEGUI_CAMERA_H - -#include -#include - - -namespace sofa::simplegui -{ - -/** - * @brief The Camera class implements a simple viewpoint transformation, and its update using the mouse. - * Currently only one displacement mode is implemented, and it is not extensively tested. - * - * @author Francois Faure, 2014 - */ -class SOFA_SOFASIMPLEGUI_API Camera -{ -public: - typedef Eigen::Transform Transform; - typedef Eigen::Vector3f Vec3; - - enum {ButtonLeft, ButtonMiddle, ButtonRight}; - enum {ButtonDown,ButtonUp}; - - - Camera(); - - - /// Set the view point. Parameters correspond to gluLookAt. - /// Note that this just sets the parameters. The actual viewing transform is applied in void lookAt() . - void setlookAt( - float eyeX, float eyeY, float eyeZ, - float targetX, float targetY, float targetZ, - float upX, float upY, float upZ - ); - - /// Apply the viewing transform, typically just after glLoadIdentity() in the draw function. - void lookAt(); - - void viewAll( float xmin, float ymin, float zmin, float xmax, float ymax, float zmax ); - - /// Equivalent of gluPerspective. - /// Alternatively, the definition and the application of the projection matrix can be done separately using other functions. - /// @sa void setPerspective( float fovy, float ratio, float znear, float zfar ) @sa void perspective() - void perspective( float fovy, float ratio, float znear, float zfar ); - - /// Set the projection matrix, without applying it. Parameters correspond to gluPerspective. - /// Note that this just sets the parameters. The actual projection transform is applied in void perspective() . - void setPerspective( float fovy, float ratio, float znear, float zfar ); - - /// Apply the projection matrix defined in setPerspective, typically in the reshape function - void perspective(); - - - - - /// Set the camera displacement modes and return true. - bool handleMouseButton(int button, int state, int x, int y); - /// Displace the camera based on the mouse motion and return true. - bool handleMouseMotion(int x, int y); - - /// Center of the camera in world coordinates - Vec3 eye() const; - - /// Viewing matrix - const Transform& getTransform() const { return transform; } - -protected: - - Transform transform; ///< Viewing transform: world wrt camera, i.e. inverse of the camera pose - - // camera projection - float fovy, ratio, znear, zfar; // parameters of perspective - - - int tb_ancienX, tb_ancienY, tb_tournerXY, tb_translaterXY, tb_bougerZ; - -}; - - - -} - - -#endif // CAMERA_H diff --git a/applications/plugins/SofaSimpleGUI/Interactor.cpp b/applications/plugins/SofaSimpleGUI/Interactor.cpp deleted file mode 100644 index dd5eeceab22..00000000000 --- a/applications/plugins/SofaSimpleGUI/Interactor.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "Interactor.h" -#include "PickedPoint.h" -#include "SofaScene.h" -#include -#include - -using namespace sofa; - - -namespace sofa::simplegui -{ - -Interactor::Interactor(const PickedPoint& picked) - : _pickedPoint( picked ) -{ - _interactionNode = sofa::simulation::getSimulation()->createNewNode("picked point interaction node"); -} - -Interactor::~Interactor() -{ - _interactionNode->execute(sofa::core::execparams::defaultInstance()); -} - -void Interactor::attach(SofaScene *scene) -{ - scene->insertInteractor(this); -} - -void Interactor::detach() -{ - _interactionNode->detachFromGraph(); -} - -} - diff --git a/applications/plugins/SofaSimpleGUI/Interactor.h b/applications/plugins/SofaSimpleGUI/Interactor.h deleted file mode 100644 index f7dd353a718..00000000000 --- a/applications/plugins/SofaSimpleGUI/Interactor.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef SOFA_Interactor_H -#define SOFA_Interactor_H - -#include -#include -#include "PickedPoint.h" - - -namespace sofa::simplegui -{ - -class SofaScene; - -using simulation::Node; - - -/** @brief Base class for all interactors. - * Interactors are sofa subgraphs used to apply actions to the scene, typically through user interaction. - * - * Note that they are not necessarily moved using the mouse, since there is no mouse or window coordinates in the API. - * @author Francois Faure, 2014 -*/ -class SOFA_SOFASIMPLEGUI_API Interactor -{ -protected: - Node::SPtr _interactionNode; ///< Scene node used to implement this - PickedPoint _pickedPoint; ///< The point attached to this - -public: - - typedef type::Vec3 Vec3; - - Interactor( const PickedPoint& picked ); - virtual ~Interactor(); - - /// Insert this in the scene as a child of the given node. If overloaded, this function should be called at the beginning of the overloaded function. - virtual void attach( SofaScene* ); - - /// Remove this from the scene, without destroying it. If overloaded, this function should be called at the end of the overloaded function. - virtual void detach(); - - /// Current interaction point - virtual Vec3 getPoint()=0; - - /// Displace the interaction to the given point - virtual void setPoint( const Vec3& p ) = 0; - - /// Root of the interactor graph - Node::SPtr getNode() { return _interactionNode; } - - /// Simulated point attached to this - const PickedPoint& getPickedPoint() const { return _pickedPoint; } -}; - -} - - -#endif // SOFA_Interactor_H diff --git a/applications/plugins/SofaSimpleGUI/PickedPoint.h b/applications/plugins/SofaSimpleGUI/PickedPoint.h deleted file mode 100644 index 640bb9079b9..00000000000 --- a/applications/plugins/SofaSimpleGUI/PickedPoint.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef GLPICKEDPOINT_H -#define GLPICKEDPOINT_H - -#include -#include -#include - -using sofa::core::behavior::BaseMechanicalState; -typedef std::size_t nat; -typedef sofa::type::Vec3 Vec3; - - -namespace sofa::simplegui -{ - -/** - * @brief The PickedPoint struct represents a vertex of a State, typically picked using the mouse. - * It is returned by the Sofa interface to the user application to set up an interaction. - * We call it valid if it corresponds to a valid index of an existing mechanical state, and invalid if not so (the pointer to the mechanical state is null) - * @author Francois Faure, 2014 - */ -struct SOFA_SOFASIMPLEGUI_API PickedPoint -{ - BaseMechanicalState::SPtr state; ///< the DOF of the picked object - nat index; ///< index of the particle picked - Vec3 point; ///< location of the picked particle in world space - - /// Conversion to boolean for easier test writing. True iff the PickedPoint is valid. Default value is converted to false. - operator bool() const { return state != NULL; } - - PickedPoint(BaseMechanicalState::SPtr state=0, nat index=0) - : state(state) - , index(index) - { } - - inline friend std::ostream& operator << ( std::ostream& out, const PickedPoint p){ - out << "state: " << p.state->getName() << ", index: " << p.index << ", point: " << p.point; - return out; - } - - /// Comparison operator used in maps - bool operator < (const PickedPoint& p ) const { - return state < p.state || index < p.index; - } - - /// Comparison operator used in maps - bool operator != (const PickedPoint& p ) const { - return *this

Examples - -- `glutOnePick`: A Sofa simulation within a basic Glut interface. The user can - click and drag one point at a time to interact with the simulaton. -- `qtSofa`: A Sofa simulation within a basic Qt interface. The user can click and - drag multiple points. -- `qtSofa/qtSofa.pro`: Project file for the same application, built as an - application which is not a sub-project of Sofa. See comments inside. -- `qtQuickSofa`: A Sofa simulation within a QtQuick interface. Not yet mature, may - be temporarily disabled. - - -

Dependencies

- -- Qt > 5.0 is necessary for qtQuickSofa - - -

Issues

- -- Currently there is no way to create interactors in plugins. They are created - by the user application. -- The application built using qtSofa/qtSofa.pro crashes at scene creation time, - while the same code running as a Sofa sub-project works fine. - -*/ diff --git a/applications/plugins/SofaSimpleGUI/SofaGL.cpp b/applications/plugins/SofaSimpleGUI/SofaGL.cpp deleted file mode 100644 index 24903830b67..00000000000 --- a/applications/plugins/SofaSimpleGUI/SofaGL.cpp +++ /dev/null @@ -1,322 +0,0 @@ -#include -#include "SofaGL.h" -#include "VisualPickVisitor.h" -#include -#include -#include -#include - -#include -using sofa::simulation::mechanicalvisitor::MechanicalPickParticlesVisitor; - -using std::cout; -using std::cerr; -using std::endl; - -namespace sofa { -using core::objectmodel::Tag; - -namespace simplegui { - -template inline T sqr(const T& t){ return t*t; } - - -SofaGL::SofaGL(SofaScene *s) : - _sofaScene(s) -{ - if(!_sofaScene) - { - std::cerr << "Error: you are trying to create a SofaGL object with a null SofaScene" << std::endl; - return; - } - - glewInit(); - - _vparams = sofa::core::visual::VisualParams::defaultInstance(); - _vparams->drawTool() = &_drawToolGL; - _vparams->setSupported(sofa::core::visual::API_OpenGL); - - _isPicking = false; - - - _sofaScene->initVisual(); -} - -void SofaGL::draw() -{ - glGetIntegerv (GL_VIEWPORT, _viewport); - glGetDoublev (GL_MODELVIEW_MATRIX, _mvmatrix); - glGetDoublev (GL_PROJECTION_MATRIX, _projmatrix); - - if(_vparams) - { - _vparams->viewport() = sofa::type::fixed_array(_viewport[0], _viewport[1], _viewport[2], _viewport[3]); - SReal xmin,xmax,ymin,ymax,zmin,zmax; - _sofaScene->getBoundingBox(&xmin,&xmax,&ymin,&ymax,&zmin,&zmax); - _vparams->sceneBBox() = sofa::type::BoundingBox(xmin,xmax,ymin,ymax,zmin,zmax); - _vparams->setProjectionMatrix(_projmatrix); - _vparams->setModelViewMatrix(_mvmatrix); - } - - //_sofaScene->getSimulation()->updateVisual(_sofaScene->getSimulation()->GetRoot().get()); // needed to update normals and VBOs ! (i think it should be better if updateVisual() was called from draw(), why it is not already the case ?) - _sofaScene->updateVisual(); // needed to update normals and VBOs ! (i think it should be better if updateVisual() was called from draw(), why it is not already the case ?) - - if( _isPicking ){ - - // start picking - glSelectBuffer(BUFSIZE,selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - gluPickMatrix(pickX,_viewport[3]-pickY,5,5,_viewport); - glMultMatrixd(_projmatrix); - glMatrixMode(GL_MODELVIEW); - - // draw - _vparams->pass() = sofa::core::visual::VisualParams::Std; - VisualPickVisitor pick ( _vparams ); - pick.setTags(_sofaScene->groot()->getTags()); - cerr<<"SofaGL::draw root used " << endl; - _sofaScene->groot()->execute ( &pick ); - - // stop picking - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - glFlush(); - hits = glRenderMode(GL_RENDER); - if (hits != 0) - { - GLuint* buffer = selectBuf; - // process the hits - GLint i, j, numberOfNames=0; - GLuint names, *ptr, minZ,*ptrNames=nullptr; - - ptr = (GLuint *) buffer; - minZ = 0xffffffff; - for (i = 0; i < hits; i++) { - names = *ptr; - ptr++; - if (*ptr < minZ) { - numberOfNames = names; - minZ = *ptr; - ptrNames = ptr+2; - } - - ptr += names+2; - } - if (numberOfNames > 0) { - cerr << "You picked object "; - ptr = ptrNames; - for (j = 0; j < numberOfNames; j++,ptr++) { - cerr<< pick.names[*ptr] << " "; - } - } - else - cerr<<"You didn't click a snowman!"; - cerr<getSimulation()->draw(_vparams, _sofaScene->getSimulation()->GetRoot().get()); - draw(_vparams); -} - -void SofaGL::draw(sofa::core::visual::VisualParams* vparams) -{ - core::visual::VisualLoop* vloop = _sofaScene->groot()->getVisualLoop(); - assert(vloop); - if (!vparams) vparams = sofa::core::visual::VisualParams::defaultInstance(); - vparams->update(); - vloop->drawStep(vparams); -} - -void SofaGL::getPickDirection( GLdouble* dx, GLdouble* dy, GLdouble* dz, int x, int y ) -{ - // Intersection of the ray with the near and far planes - GLint realy = _viewport[3] - (GLint) y - 1; // convert coordinates from image space (y downward) to window space (y upward) - GLdouble wx, wy, wz; /* returned world x, y, z coords */ - gluUnProject ((GLdouble) x, (GLdouble) realy, 0.0, _mvmatrix, _projmatrix, _viewport, &wx, &wy, &wz); // z=0: near plane - //cout<<"World coords at z=0.0 are ("<groot()->getContext() ); - - PickedPoint pickedPoint; - if (!picker.particles.empty()) - { - sofa::core::behavior::BaseMechanicalState *mstate = picker.particles.begin()->second.first; - unsigned index = picker.particles.begin()->second.second; - - pickedPoint.state = mstate; - pickedPoint.index = index; - pickedPoint.point = Vec3(mstate->getPX(index), mstate->getPY(index), mstate->getPZ(index)); - } - - return pickedPoint; -} - - -Interactor* SofaGL::getInteractor( const PickedPoint& glpicked ) -{ - cout << "SofaGL::getInteractor, looking for " << glpicked << endl; - for( Picked_to_Interactor::iterator i=_picked_to_interactor.begin(); i!=_picked_to_interactor.end(); i++ ) - { - cout << "SofaGL::getInteractor, map contains " << (*i).first << endl; - } - if( _picked_to_interactor.find(glpicked)!=_picked_to_interactor.end() ) // there is already an interactor on this particle - { - return _picked_to_interactor[glpicked]; - } - else { // new interactor - return NULL; - } -} - - - -Interactor* SofaGL::pickInteractor( GLdouble ox, GLdouble oy, GLdouble oz, int x, int y ) -{ - - type::Vec3d origin(ox,oy,oz), direction; - getPickDirection(&direction[0],&direction[1],&direction[2],x,y); - double distance = 10.5, distanceGrowth = 0.1; // cone around the ray ???? - // cout<< "SofaScene::rayPick from origin " << origin << ", in direction " << direction << endl; - MechanicalPickParticlesVisitor picker(sofa::core::ExecParams::defaultInstance(), origin, direction, distance, distanceGrowth, sofa::core::objectmodel::Tag("!NoPicking") ); - picker.execute(_sofaScene->groot()->getContext()); - - if (!picker.particles.empty()) - { - PickedPoint pickedPoint(picker.particles.begin()->second.first, picker.particles.begin()->second.second); - if( _picked_to_interactor.find(pickedPoint)!=_picked_to_interactor.end() ) - return _picked_to_interactor[pickedPoint]; - } - - return NULL; -} - - -void SofaGL::attach( Interactor* interactor ) -{ - interactor->attach( _sofaScene ); - _picked_to_interactor[interactor->getPickedPoint()] = interactor; - // cout<<"SofaGL::attach "<< endl; _sofaScene->printGraph(); -} - -void SofaGL::move( Interactor* interactor, int x, int y) -{ - if( !interactor ) - return; - - // get the distance to the current point - Vec3 current = interactor->getPoint(); - GLdouble wcur[3]; // window coordinates of the current point - gluProject(current[0],current[1],current[2],_mvmatrix,_projmatrix,_viewport,wcur,wcur+1,wcur+2); - // cout << "current point = " << current << endl; - // cout<<"move anchor, distance = " << wcur[2] << endl; - - // compute and set the position of the new point - GLdouble p[3]; - gluUnProject ( x, _viewport[3]-y-1, wcur[2], _mvmatrix, _projmatrix, _viewport, &p[0], &p[1], &p[2]); // new position of the picked point - // cout<<"x="<< x <<", y="<< y <<", X="<detach(); - // cout<<"SofaGL::detach "<< endl; _sofaScene->printGraph(); -} - -void SofaGL::getSceneBBox( float* xmin, float* ymin, float* zmin, float* xmax, float* ymax, float* zmax ) -{ - SReal xm, xM, ym, yM, zm, zM; - _sofaScene->getBoundingBox(&xm,&xM,&ym,&yM,&zm,&zM); - - *xmin = helper::narrow_cast(xm); - *xmax = helper::narrow_cast(xM); - *ymin = helper::narrow_cast(ym); - *ymax = helper::narrow_cast(yM); - *zmin = helper::narrow_cast(zm); - *zmax = helper::narrow_cast(zM); -} - - -void SofaGL::viewAll( SReal* xcam, SReal* ycam, SReal* zcam, SReal* xcen, SReal* ycen, SReal* zcen, SReal a, SReal* nearPlane, SReal* farPlane) -{ - // scene center and radius - SReal xmin, xmax, ymin, ymax, zmin, zmax; - _sofaScene->getBoundingBox(&xmin,&xmax,&ymin,&ymax,&zmin,&zmax); - cout<<"SofaGL::viewAll, bounding box = ("<< xmin <<" "< -#include "SofaScene.h" -#include -#include - -#include "PickedPoint.h" -#include "SpringInteractor.h" - - -namespace sofa::simplegui -{ - -/** OpenGL interface to a SofaScene. - * This is not a viewer, this is an object used by a viewer to display a Sofa scene and to pick objects in it. - * It contains a pointer to the Sofa scene. Several viewers can be connected to a single scene through such interfaces. - * - * Picking returns a PickedPoint which describes a particle. - * It is up to the application to create the appropriate Interactor, which can then be inserted in the Sofa scene. - * This class provides the functions to attach/detach an interactor and move it. - * - * @author Francois Faure, 2014 - - */ -class SOFA_SOFASIMPLEGUI_API SofaGL -{ -public: - /** - * @param s The Sofa scene to interact with, the scene MUST already be opened ! - */ - SofaGL( SofaScene* s ); - /** - * @brief Draw the scene and stores the transformation matrices, for picking. - * This requires an OpenGL context. It is supposed to be used by the drawing method of a viewer, after setting the modelview matrix. - */ - void draw(); - /** - * @brief Compute the parameters to pass to gluPerspective to make the whole scene visible. - * The new camera center is set on the line from the current camera center to the scene center, at the appropriate distance. - * @param xcam Camera center (input-output) - * @param ycam Camera center (input-output) - * @param zcam Camera center (input-output) - * @param xcen Center of the scene (output) - * @param ycen Center of the scene (output) - * @param zcen Center of the scene (output) - * @param a Camera vertical angle (input) - * @param near Smaller than the nearest distance from the new camera center to the scene (output) - * @param far Larger than the nearest distance from the new camera center to the scene (output) - */ - void viewAll( SReal* xcam, SReal* ycam, SReal* zcam, SReal* xcen, SReal* ycen, SReal* zcen, SReal a, SReal* nearPlane, SReal* farPlane); - - /// Compute the bounding box of the scene - void getSceneBBox( float* xmin, float* ymin, float* zmin, float* xmax, float* ymax, float* zmax ); - - /// @name Interaction - /// @{ - /** @brief Try to pick a particle along a ray. - * The ray starts at the camera center and passes through point with coordinates x,y - * ox, oy, oz are the camera center in world coordinates. - * x,y in image coordinates (origin on top left). - * If a point is picked, the application may create an Interactor based on it. - * @return a valid PickedPoint if succeeded, an invalid PickedPoint if not. - */ - PickedPoint pick(GLdouble ox, GLdouble oy, GLdouble oz, int x, int y); - - - /** @brief Insert an interactor in the scene - * Does not check if it is already there, so be careful not to insert the same twice - */ - void attach( Interactor* ); - - /** - * @brief getInteractor - * @param picked - * @return Interactor acting on the given picked point, or NULL if none - */ - Interactor* getInteractor( const PickedPoint& picked ); - - - /** @brief Try to pick an Interactor along a ray. - * The ray starts at the camera center and passes through point with coordinates x,y - * ox, oy, oz are the camera center in world coordinates. - * x,y in image coordinates (origin on top left). - * @return Pointer if an Interactor is found, NULL if not. - */ - Interactor* pickInteractor(GLdouble ox, GLdouble oy, GLdouble oz, int x, int y); - - /** - * @brief move the interactor according to the mouse pointer. - * x,y in image coordinates (origin on top left). - */ - void move( Interactor*, int x, int y); - - /// Remove the interactor from the scene, without deleting it. - void detach(Interactor*); - - /// @} - - /** @brief Try to pick a displayed thing along a ray, using OpenGL picking. - * The ray starts at the camera center and passes through point with coordinates x,y in image coordinates (origin on top left). - * In this experimental implementation, this function just prints something on the standard output. - */ - void glPick(int x, int y); - - /** - * @brief getPickDirection Compute the direction of a button click, returned as a unit vector - * @param dx normalized direction - * @param dy normalized direction - * @param dz normalized direction - * @param x x-coordinate of the click - * @param y y-coordinate of the click (origin on top) - */ - void getPickDirection( GLdouble* dx, GLdouble* dy, GLdouble* dz, int x, int y ); - - -protected: - SofaScene* _sofaScene; - - // matrices used for picking - GLint _viewport[4]; - GLdouble _mvmatrix[16], _projmatrix[16]; - - // rendering tools - sofa::gl::DrawToolGL _drawToolGL; - sofa::core::visual::VisualParams* _vparams; - void draw(sofa::core::visual::VisualParams*); - - // Interaction tools - typedef std::map< PickedPoint, Interactor*> Picked_to_Interactor; - /** Currently available interactors, associated with picked points. - * The interactors are not necessarily being manipulated. Only one is typically manipulated at a given time. - */ - Picked_to_Interactor _picked_to_interactor; - Interactor* _drag; ///< The currently active interactor - - - - // OpenGL picking data - bool _isPicking; ///< if we are doing OpenGL picking - GLint pickX, pickY; // window coordinates of the pick point - enum {BUFSIZE=1024}; - GLuint selectBuf[BUFSIZE]; - GLint hits; - - -}; - -} - - -#endif // SOFA_NEWGUI_SofaGL_H diff --git a/applications/plugins/SofaSimpleGUI/SofaGlutAnt.zip b/applications/plugins/SofaSimpleGUI/SofaGlutAnt.zip deleted file mode 100644 index 02195aba1f6..00000000000 Binary files a/applications/plugins/SofaSimpleGUI/SofaGlutAnt.zip and /dev/null differ diff --git a/applications/plugins/SofaSimpleGUI/SofaScene.cpp b/applications/plugins/SofaSimpleGUI/SofaScene.cpp deleted file mode 100644 index 8cbf2a7abdc..00000000000 --- a/applications/plugins/SofaSimpleGUI/SofaScene.cpp +++ /dev/null @@ -1,154 +0,0 @@ -#include "SofaScene.h" -#include "Interactor.h" -#include -using std::cerr; -using std::cout; -using std::endl; - -#include -#include -#include -#include -#include - -// sofa types should not be exposed -//typedef sofa::type::Vec3 Vec3; -//typedef sofa::component::container::MechanicalObject< defaulttype::Vec3Types > Vec3DOF; -typedef sofa::simulation::graph::DAGSimulation SofaSimulation; - - -namespace sofa::simplegui -{ - - -typedef sofa::type::Vec3 Vec3; -typedef sofa::component::statecontainer::MechanicalObject< defaulttype::Vec3Types > Vec3DOF; - - -SofaScene::SofaScene() -{ - _groot = _iroot = nullptr; - std::shared_ptr classVisualModel;// = NULL; - sofa::core::ObjectFactory::AddAlias("VisualModel", "OglModel", true, &classVisualModel); - - sofa::component::init(); -} - -void SofaScene::step( SReal dt) -{ - sofa::simulation::node::animate(_groot.get(),dt); -} - -void SofaScene::printGraph() -{ - sofa::simulation::node::print(_groot.get()); -} - -void SofaScene::loadPlugins( const std::vector& plugins ) -{ - for (const auto& plugin : plugins) - { - cout <<"SofaScene::init, loading plugin " << plugin << '\n'; - sofa::helper::system::PluginManager::getInstance().loadPlugin(plugin); - } - - sofa::helper::system::PluginManager::getInstance().init(); -} - -void SofaScene::open(const std::string& fileName ) -{ - // --- Create simulation graph --- - assert( !fileName.empty()); - - if(_groot) sofa::simulation::node::unload (_groot); - _groot = sofa::simulation::node::load( fileName.c_str() ).get(); - if(!_groot) - { - cerr << "loading failed" << endl; - return; - } - - _iroot = _groot->createChild("iroot").get(); - -// _currentFileName = fileName; - - sofa::simulation::node::init(_groot.get()); - - printGraph(); - SReal xm,xM,ym,yM,zm,zM; - getBoundingBox(&xm,&xM,&ym,&yM,&zm,&zM); - cout<<"SofaScene::setScene, xm="<addChild(node); - _iroot = _groot->createChild("iroot").get(); - sofa::simulation::node::init(_groot.get()); -} - -void SofaScene::reset() -{ - sofa::simulation::node::reset(_groot.get()); -} - -//void SofaScene::open(const char *filename) -//{ -// unload(_groot); - -// _groot = load( filename ); -// if(!_groot) -// { -// cerr << "loading failed" << endl; -// return; -// } - -// _iroot = _groot->createChild("iroot"); - -// _currentFileName = filename; - -// sofa::simulation::node::::init(_groot); -//// cout<<"SofaScene::init, scene loaded" << endl; -//// printGraph(); -//} - -void SofaScene::getBoundingBox( SReal* xmin, SReal* xmax, SReal* ymin, SReal* ymax, SReal* zmin, SReal* zmax ) -{ - SReal pmin[3], pmax[3]; - sofa::simulation::node::computeBBox( _groot.get(), pmin, pmax ); - *xmin = pmin[0]; *xmax = pmax[0]; - *ymin = pmin[1]; *ymax = pmax[1]; - *zmin = pmin[2]; *zmax = pmax[2]; -} - -void SofaScene::insertInteractor( Interactor * interactor ) -{ - if(_iroot) - _iroot->addChild(interactor->getNode()); -} - -simulation::Node* SofaScene::groot() { return _groot.get(); } - -void SofaScene::initVisual(){ - sofa::simulation::node::initTextures(_groot.get()); -} - -void SofaScene::updateVisual() -{ - sofa::simulation::node::updateVisual(_groot.get()); // needed to update normals and VBOs ! (i think it should be better if updateVisual() was called from draw(), why it is not already the case ?) -} - -//void SofaScene::draw( sofa::core::visual::VisualParams* v) -//{ -// if( v==NULL ) -// { -// -// } -// sofa::simulation::node::draw(_vparams, groot() ); -//} - - -} diff --git a/applications/plugins/SofaSimpleGUI/SofaScene.h b/applications/plugins/SofaSimpleGUI/SofaScene.h deleted file mode 100644 index 83de56ad63b..00000000000 --- a/applications/plugins/SofaSimpleGUI/SofaScene.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef SOFA_NEWGUI_SofaScene_H -#define SOFA_NEWGUI_SofaScene_H - -#include -#include -#include -#include - -namespace sofa { -namespace simulation { - class Simulation; -} - -namespace simplegui { - -class Interactor; - - -/** @brief A sofa scene graph with simulation functions. - * - * There are methods to initialize and update the visual models, but rendering must be performed externally, see e.g. class SofaGL. - * - * The typical life cycle is: - * - loadPlugins( list of plugin names ); - setScene( scenegraph ); or open(filename) - initVisual() - [ your main loop: ] - step(dt); - updateVisual(); - [ use a SofaGL object to display the simulated objects ] - - - * @author Francois Faure, 2014 - */ -class SOFA_SOFASIMPLEGUI_API SofaScene -{ -public: - /** - * @brief Initialize Sofa - */ - SofaScene(); - virtual ~SofaScene(){} - - /** - * @brief load the given plugin - * @param plugins names of the plugins - */ - void loadPlugins( const std::vector& plugins ); - /** - * @brief Load a scene file. The previous scene graph, if any, is deleted. - * @param fileName Scene file to load - */ - void open( const std::string& fileName ); - /** - * @brief Set the scene graph. The previous scene graph, if any, is deleted. - * @param graph the scene to simulate - */ - void setScene( simulation::Node* graph ); - /** - * @brief Print the scene graph on the standard output, for debugging. - */ - void printGraph(); - /** - * @brief Integrate time by one step and update the Sofa scene. - */ - void step( SReal dt ); - /** - * @brief restart from the beginning - */ - void reset(); - /** - * @brief Compute the bounding box of the simulated objects - * @param xmin min coordinate in the X direction - * @param xmax max coordinate in the X direction - * @param ymin etc. - * @param ymax - * @param zmin - * @param zmax - */ - void getBoundingBox( SReal* xmin, SReal* xmax, SReal* ymin, SReal* ymax, SReal* zmin, SReal* zmax ); - - /// To do once before rendering a scene, typically at initialization time - void initVisual(); - - /// Update the visual models. To do after animating and before rendering. - void updateVisual(); - - - - /** @name Developer API - * To be used to create new functionalities. - */ - ///@{ - - /// Root of the simulated scene. - simulation::Node* groot(); - - /// Root of the interactors, set as child of groot - simulation::Node* iroot(){ return _iroot; } - - /// Do not use this directly. Use Interactor::attach, which calls this. - void insertInteractor( Interactor* ); - - ///@} - - - - -protected: - simulation::Node::SPtr _groot; ///< root of the scene - simulation::Node* _iroot; ///< root of the interactors, child of _groot - -}; - -} -} - - -#endif // SOFA_NEWGUI_SofaScene_H diff --git a/applications/plugins/SofaSimpleGUI/SofaSimpleGUIConfig.cmake.in b/applications/plugins/SofaSimpleGUI/SofaSimpleGUIConfig.cmake.in deleted file mode 100644 index 25e069ed35b..00000000000 --- a/applications/plugins/SofaSimpleGUI/SofaSimpleGUIConfig.cmake.in +++ /dev/null @@ -1,15 +0,0 @@ -# CMake package configuration file for the SofaSimpleGUI plugin - -@PACKAGE_GUARD@ -@PACKAGE_INIT@ - -find_package(Sofa.Component REQUIRED) -find_package(Eigen3 QUIET REQUIRED) -find_package(Sofa.GL QUIET REQUIRED) -find_package(Sofa.Simulation.Graph QUIET REQUIRED) - -if(NOT TARGET SofaSimpleGUI) - include("${CMAKE_CURRENT_LIST_DIR}/SofaSimpleGUITargets.cmake") -endif() - -check_required_components(SofaSimpleGUI) diff --git a/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp b/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp deleted file mode 100644 index 0e6948d9743..00000000000 --- a/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include "SpringInteractor.h" -#include "PickedPoint.h" -#include -#include -#include - - -namespace sofa::simplegui -{ -typedef sofa::component::constraint::projective::FixedConstraint FixedConstraint3; - -SpringInteractor::SpringInteractor(const PickedPoint &picked, SReal stiffness) - : Interactor(picked) -{ - // get the DOF of the picked object - MechanicalObject3* pickedDof=dynamic_cast(picked.state.get()); assert(pickedDof); - - // create DOF to represent the actuator - _interactorDof = sofa::core::objectmodel::New(); - _interactionNode->addObject(_interactorDof); - _interactorDof->setName("interactorDOF"); - _interactorDof->addTag(std::string("Interactor")); - MechanicalObject3::WriteVecCoord xanchor = _interactorDof->writePositions(); - xanchor[0] = picked.point; - FixedConstraint3::SPtr fixed= sofa::core::objectmodel::New(); // Makes it unmovable through forces - _interactionNode->addObject(fixed); - fixed->init(); - - // create spring to drag the picked object - _spring = sofa::core::objectmodel::New(_interactorDof.get(),pickedDof); - _interactionNode->addObject(_spring); - _spring->addSpring(0,picked.index,stiffness,0.1,0.); - - - -// cout << "SpringInteractor set spring to " << pickedDof->getName() << ", " << picked.index << endl; -} - -Vec3 SpringInteractor::getPoint() -{ - MechanicalObject3::ReadVecCoord xanchor = _interactorDof->readPositions(); - return xanchor[0]; -} - -void SpringInteractor::setPoint( const Vec3& p ) -{ - MechanicalObject3::WriteVecCoord xanchor = _interactorDof->writePositions(); - xanchor[0] = p; -} - -void SpringInteractor::attach(SofaScene *scene) -{ - Inherited::attach(scene); - _interactionNode->removeObject(_spring); - Node* targetParent = dynamic_cast(_spring->getMState2()->getContext()); - targetParent->addObject(_spring); -} - -void SpringInteractor::detach() -{ - Inherited::detach(); - Node* parent = dynamic_cast(_spring->getMState2()->getContext()); - parent->removeObject(_spring); - _interactionNode->addObject(_spring); -} - -} diff --git a/applications/plugins/SofaSimpleGUI/SpringInteractor.h b/applications/plugins/SofaSimpleGUI/SpringInteractor.h deleted file mode 100644 index ec3c187ccd8..00000000000 --- a/applications/plugins/SofaSimpleGUI/SpringInteractor.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef SOFA_SpringInteractor_H -#define SOFA_SpringInteractor_H - -#include -#include "Interactor.h" - -#include -#include -#include - - -namespace sofa::simplegui -{ - using sofa::defaulttype::Vec3Types ; - using MechanicalObject3 = sofa::component::statecontainer::MechanicalObject ; - using SpringForceField3 = sofa::component::solidmechanics::spring::SpringForceField ; - -/** - * @brief Interaction using a spring. - * An interactor, typically attached to the mouse pointer, pulls a control point using a spring. - * @author Francois Faure, 2014 - */ -class SOFA_SOFASIMPLEGUI_API SpringInteractor: public Interactor -{ - typedef Interactor Inherited; -protected: - MechanicalObject3::SPtr _interactorDof; - SpringForceField3::SPtr _spring; -public: - /** - * @brief SpringInteractor - * @param picked The picked point. - * @param stiffness The stiffness of the spring attached to the picked point. - */ - SpringInteractor(const PickedPoint& picked, SReal stiffness=(SReal) 100.); - - /// Insert this in the scene as a child of the given node - void attach( SofaScene* scene ) override; - - /// Remove this from the scene, without destroying it. - void detach() override; - - /// current interaction point - Vec3 getPoint() override; - - /// Displace the interaction to the given point - void setPoint( const Vec3& p ) override; - -}; - -} - - -#endif // SOFA_SpringInteractor_H diff --git a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp deleted file mode 100644 index c7b3203a8d7..00000000000 --- a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp +++ /dev/null @@ -1,138 +0,0 @@ -#include "VisualPickVisitor.h" -#include -using std::cout; -using std::cerr; -using std::endl; - -#include -#include -#include -#include - - -namespace sofa::simplegui -{ - -VisualPickVisitor::VisualPickVisitor(core::visual::VisualParams* params) - : VisualVisitor(params) -{ - pickedId = 0; -} - - -simulation::Visitor::Result VisualPickVisitor::processNodeTopDown(simulation::Node* node) -{ -// cerr <<"VisualPickVisitor::processNodeTopDown" << endl; - hasShader = (node->getShader()!=NULL); - - for_each(this, node, node->visualModel, &VisualPickVisitor::fwdVisualModel); - this->VisualVisitor::processNodeTopDown(node); - - return RESULT_CONTINUE; -} - -void VisualPickVisitor::processNodeBottomUp(simulation::Node* node) -{ -// cerr <<"VisualPickVisitor::processNodeBottomUp" << endl; - for_each(this, node, node->visualModel, &VisualPickVisitor::bwdVisualModel); -} - -void VisualPickVisitor::processObject(simulation::Node* /*node*/, core::objectmodel::BaseObject* o) -{ -#ifdef DEBUG_DRAW - std::cerr << ">" << o->getClassName() << "::draw() of " << o->getName() << std::endl; -#endif -// cout<<"VisualPickVisitor::processObject push name of "<< o->getName() << " = " << pickedId << endl; - names.push_back(o->getName()); - glPushName(pickedId++); - o->draw(vparams); - glPopName(); -// cout<<"VisualPickVisitor::processObject end " << endl; - -#ifdef DEBUG_DRAW - std::cerr << "<" << o->getClassName() << "::draw() of " << o->getName() << std::endl; -#endif -} - -void VisualPickVisitor::fwdVisualModel(simulation::Node* /*node*/, core::visual::VisualModel* vm) -{ -#ifdef DEBUG_DRAW - std::cerr << ">" << vm->getClassName() << "::fwdDraw() of " << vm->getName() << std::endl; -#endif - vm->fwdDraw(vparams); -#ifdef DEBUG_DRAW - std::cerr << "<" << vm->getClassName() << "::fwdDraw() of " << vm->getName() << std::endl; -#endif -} - -void VisualPickVisitor::bwdVisualModel(simulation::Node* /*node*/,core::visual::VisualModel* vm) -{ -#ifdef DEBUG_DRAW - std::cerr << ">" << vm->getClassName() << "::bwdDraw() of " << vm->getName() << std::endl; -#endif - vm->bwdDraw(vparams); -#ifdef DEBUG_DRAW - std::cerr << "<" << vm->getClassName() << "::bwdDraw() of " << vm->getName() << std::endl; -#endif -} - -void VisualPickVisitor::processVisualModel(simulation::Node* node, core::visual::VisualModel* vm) -{ - //cerr<<"VisualPickVisitor::processVisualModel "<getName()<(node->getShader(subsetsToManage)); - - - switch(vparams->pass()) - { - case core::visual::VisualParams::Std: - { - if (shader && shader->isActive()) - shader->start(); -#ifdef DEBUG_DRAW - std::cerr << ">" << vm->getClassName() << "::drawVisual() of " << vm->getName() << std::endl; -#endif - names.push_back(vm->getName()); - glPushName(pickedId++); - vm->drawVisual(vparams); - glPopName(); -#ifdef DEBUG_DRAW - std::cerr << "<" << vm->getClassName() << "::drawVisual() of " << vm->getName() << std::endl; -#endif - if (shader && shader->isActive()) - shader->stop(); - break; - } - case core::visual::VisualParams::Transparent: - { - if (shader && shader->isActive()) - shader->start(); -#ifdef DEBUG_DRAW - std::cerr << ">" << vm->getClassName() << "::drawTransparent() of " << vm->getName() << std::endl; -#endif - vm->drawTransparent(vparams); -#ifdef DEBUG_DRAW - std::cerr << "<" << vm->getClassName() << "::drawTransparent() of " << vm->getName() << std::endl; -#endif - if (shader && shader->isActive()) - shader->stop(); - break; - } - case core::visual::VisualParams::Shadow: -#ifdef DEBUG_DRAW - std::cerr << ">" << vm->getClassName() << "::drawShadow() of " << vm->getName() << std::endl; -#endif - vm->drawShadow(vparams); -#ifdef DEBUG_DRAW - std::cerr << "<" << vm->getClassName() << "::drawShadow() of " << vm->getName() << std::endl; -#endif - break; - } - -} - - -} - - diff --git a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h deleted file mode 100644 index fe72aa97004..00000000000 --- a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef SOFA_SIMPLEGUI_VisualPickVisitor_H -#define SOFA_SIMPLEGUI_VisualPickVisitor_H -#include -#include - - -namespace sofa::simplegui -{ - -/** - * @brief The VisualPickVisitor class displays the scene for OpenGL picking. - * It uses the glPushName instruction, and it must be called within a specific OpenGL context, see http://www.lighthouse3d.com/opengl/picking/ - * The names vector member contains the names of all the objects rendered, in the traversal order. - * This allows to associate a hit number to an object during the pre-processing. - * @sa SofaGL - * @author Francois Faure, 2014 - * - * @warning The code is directly adapted from VisualDrawVisitor, without much insight - */ -class VisualPickVisitor : public ::sofa::simulation::VisualVisitor -{ -public: - bool hasShader; - VisualPickVisitor(core::visual::VisualParams* params); - Result processNodeTopDown(simulation::Node* node) override; - void processNodeBottomUp(simulation::Node* node) override; - virtual void fwdVisualModel(simulation::Node* node, core::visual::VisualModel* vm); - void processVisualModel(simulation::Node* node, core::visual::VisualModel* vm) override; - void processObject(simulation::Node* node, core::objectmodel::BaseObject* o) override; - virtual void bwdVisualModel(simulation::Node* node, core::visual::VisualModel* vm); - const char* getClassName() const override { return "VisualPickVisitor"; } - - sofa::type::vector names; // names of the object displayed - -private: - int pickedId; - - -}; - -} - -#endif // SOFA_SIMPLEGUI_VisualPickVisitor_H diff --git a/applications/plugins/SofaSimpleGUI/config.h.in b/applications/plugins/SofaSimpleGUI/config.h.in deleted file mode 100644 index 5b9af608bb5..00000000000 --- a/applications/plugins/SofaSimpleGUI/config.h.in +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#ifndef SOFASIMPLEGUI_CONFIG_H -#define SOFASIMPLEGUI_CONFIG_H - -#include - -#ifdef SOFA_BUILD_SOFASIMPLEGUI -# define SOFA_TARGET SofaSimpleGUI -# define SOFA_SOFASIMPLEGUI_API SOFA_EXPORT_DYNAMIC_LIBRARY -#else -# define SOFA_SOFASIMPLEGUI_API SOFA_IMPORT_DYNAMIC_LIBRARY -#endif - -#endif diff --git a/applications/plugins/SofaSimpleGUI/doc/Doxyfile b/applications/plugins/SofaSimpleGUI/doc/Doxyfile deleted file mode 100644 index 1ff35ada7e4..00000000000 --- a/applications/plugins/SofaSimpleGUI/doc/Doxyfile +++ /dev/null @@ -1,1918 +0,0 @@ -# Doxyfile 1.8.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. - -PROJECT_NAME = SimpleGUI - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = code - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, -# Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, -# Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. Note that you specify absolute paths here, but also -# relative paths, which will be relative from the directory where doxygen is -# started. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding -# "class=itcl::class" will allow you to use the command class in the -# itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, -# and language is one of the parsers supported by doxygen: IDL, Java, -# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, -# C++. For instance to make doxygen treat .inc files as Fortran files (default -# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note -# that for custom extensions you also need to set FILE_PATTERNS otherwise the -# files are not read by doxygen. - -EXTENSION_MAPPING = - -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all -# comments according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you -# can mix doxygen, HTML, and XML commands with Markdown formatting. -# Disable only in case of backward compatibilities issues. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES (the -# default) will make doxygen replace the get and set methods by a property in -# the documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields or simple typedef fields will be shown -# inline in the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO (the default), structs, classes, and unions are shown on a separate -# page (for HTML and Man pages) or section (for LaTeX and RTF). - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can -# be an expensive process and often the same symbol appear multiple times in -# the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too -# small doxygen will become slower. If the cache is too large, memory is wasted. -# The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid -# range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536 -# symbols. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if section-label ... \endif -# and \cond section-label ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. Do not use -# file names with spaces, bibtex cannot handle them. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = .. - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = ../glutOnePick - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be ignored. -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C, C++ and Fortran comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If left blank doxygen will -# generate a default style sheet. Note that it is recommended to use -# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this -# tag will in the future become obsolete. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional -# user-defined cascading style sheet that is included after the standard -# style sheets created by doxygen. Using this option one can overrule -# certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more -# robust against future updates. Doxygen will copy the style sheet file to -# the output directory. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the style sheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of -# entries shown in the various tree structured indices initially; the user -# can expand and collapse entries dynamically later on. Doxygen will expand -# the tree to such a level that at most the specified number of entries are -# visible (unless a fully collapsed tree already exceeds this amount). -# So setting the number of entries 1 will produce a full collapsed tree by -# default. 0 is a special value representing an infinite number of entries -# and will result in a full expanded tree by default. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely -# identify the documentation publisher. This should be a reverse domain-name -# style string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you may also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and -# SVG. The default value is HTML-CSS, which is slower, but has the best -# compatibility. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to -# the MathJax Content Delivery Network so you can quickly see the result without -# installing MathJax. However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript -# pieces of code that will be used on startup of the MathJax code. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. -# There are two flavours of web server based search depending on the -# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for -# searching and an index file used by the script. When EXTERNAL_SEARCH is -# enabled the indexing and searching needs to be provided by external tools. -# See the manual for details. - -SERVER_BASED_SEARCH = NO - -# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP -# script for searching. Instead the search results are written to an XML file -# which needs to be processed by an external indexer. Doxygen will invoke an -# external search engine pointed to by the SEARCHENGINE_URL option to obtain -# the search results. Doxygen ships with an example indexer (doxyindexer) and -# search engine (doxysearch.cgi) which are based on the open source search -# engine library Xapian. See the manual for configuration details. - -EXTERNAL_SEARCH = NO - -# The SEARCHENGINE_URL should point to a search engine hosted by a web server -# which will returned the search results when EXTERNAL_SEARCH is enabled. -# Doxygen ships with an example search engine (doxysearch) which is based on -# the open source search engine library Xapian. See the manual for configuration -# details. - -SEARCHENGINE_URL = - -# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed -# search data is written to a file for indexing by an external tool. With the -# SEARCHDATA_FILE tag the name of this file can be specified. - -SEARCHDATA_FILE = searchdata.xml - -# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the -# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is -# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple -# projects and redirect the results back to the right project. - -EXTERNAL_SEARCH_ID = - -# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen -# projects other than the one defined by this configuration file, but that are -# all added to the same external search index. Each project needs to have a -# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id -# of to a relative location where the documentation can be found. -# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... - -EXTRA_SEARCH_MAPPINGS = - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4 will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for -# the generated latex document. The footer should contain everything after -# the last chapter. If it is left blank doxygen will generate a -# standard footer. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images -# or other source files which should be copied to the LaTeX output directory. -# Note that the files will be copied as-is; there are no commands or markers -# available. - -LATEX_EXTRA_FILES = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -# The LATEX_BIB_STYLE tag can be used to specify the style to use for the -# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See -# http://en.wikipedia.org/wiki/BibTeX for more info. - -LATEX_BIB_STYLE = plain - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load style sheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options related to the DOCBOOK output -#--------------------------------------------------------------------------- - -# If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files -# that can be used to generate PDF. - -GENERATE_DOCBOOK = NO - -# The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in -# front of it. If left blank docbook will be used as the default path. - -DOCBOOK_OUTPUT = docbook - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition that -# overrules the definition found in the source code. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all references to function-like macros -# that are alone on a line, have an all uppercase name, and do not end with a -# semicolon, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. For each -# tag file the location of the external documentation should be added. The -# format of a tag file without this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths -# or URLs. Note that each tag file must have a unique name (where the name does -# NOT include the path). If a tag file is not located in the directory in which -# doxygen is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed -# in the related pages index. If set to NO, only the current project's -# pages will be listed. - -EXTERNAL_PAGES = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option also works with HAVE_DOT disabled, but it is recommended to -# install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will use the Helvetica font for all dot files that -# doxygen generates. When you want a differently looking font you can specify -# the font name using DOT_FONTNAME. You need to make sure dot is able to find -# the font, which can be done by putting it in a standard location or by setting -# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the -# directory containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the Helvetica font. -# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to -# set the path where dot can find it. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If the UML_LOOK tag is enabled, the fields and methods are shown inside -# the class node. If there are many fields or methods and many nodes the -# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS -# threshold limits the number of items for each type to make the size more -# manageable. Set this to 0 for no limit. Note that the threshold may be -# exceeded by 50% before the limit is enforced. - -UML_LIMIT_NUM_FIELDS = 10 - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. If you choose svg you need to set -# HTML_FILE_EXTENSION to xhtml in order to make the SVG files -# visible in IE 9+ (other browsers do not have this requirement). - -DOT_IMAGE_FORMAT = png - -# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to -# enable generation of interactive SVG images that allow zooming and panning. -# Note that this requires a modern browser other than Internet Explorer. -# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you -# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files -# visible. Older versions of IE do not have SVG support. - -INTERACTIVE_SVG = NO - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MSCFILE_DIRS tag can be used to specify one or more directories that -# contain msc files that are included in the documentation (see the -# \mscfile command). - -MSCFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/applications/plugins/SofaSimpleGUI/doc/DoxygenLayout.xml b/applications/plugins/SofaSimpleGUI/doc/DoxygenLayout.xml deleted file mode 100644 index 4be599bd1a7..00000000000 --- a/applications/plugins/SofaSimpleGUI/doc/DoxygenLayout.xml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SofaSimpleGUI/doc/SimpleGUI.png b/applications/plugins/SofaSimpleGUI/doc/SimpleGUI.png deleted file mode 100644 index 25881a4e2bd..00000000000 Binary files a/applications/plugins/SofaSimpleGUI/doc/SimpleGUI.png and /dev/null differ diff --git a/applications/plugins/SofaSimpleGUI/doc/index.html b/applications/plugins/SofaSimpleGUI/doc/index.html deleted file mode 100644 index f612f48076b..00000000000 --- a/applications/plugins/SofaSimpleGUI/doc/index.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - SimpleGUI - - - - - - - - -

SimpleGUI

- - - - - - - - - - - -
SimpleGUI helps inserting a Sofa simulation in graphics applications, such as this simple Glut program.
-
representative image of the plugin
- -
- - - -
- -

Introduction

-This is a simpler alternative to the standard Sofa GUI. See the code documentation (*) for more detail.
-
-

Compilation

-One subproject uses qtquick. On Ubuntu 14.04, it requires package qtdeclarative5-dev. - - -

Examples

- - -
    - -
  • glutOnePick: a glut application with a Sofa simulation. The user can interact by clicking and dragging particles. -
  • -
  • qtSofa: a qt application with a Sofa simulation. The user can interact by shift-clicking and dragging particles. -
  • -
- - - -

Intellectual -property and rights

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Authors
-
Francois Faure
Contact
-
Francois.Faure@inria.fr
-
License
-
This plugin is distributed under -the same license as the core of SOFA. -
Patents
-

-
APP registration
-

-
Sponsors
-
-
-
- -
- -
- -

HowTo

- -

Code documentation

- -can be generated using doxygen. In Unix -systems, simply type doxygen -Doxyfile in the doc directory.
- -
- -

LaTeX formulas

- -can be directly copy-pasted from .tex to this html document thanks to the mathjax config and -script included in the header. Equation numbering and cross-referencing works, as well a newcommand.
- -
- -
- -
- -
- - diff --git a/applications/plugins/SofaSimpleGUI/examples/liver.scn b/applications/plugins/SofaSimpleGUI/examples/liver.scn deleted file mode 100644 index 2ea0cb8954c..00000000000 --- a/applications/plugins/SofaSimpleGUI/examples/liver.scn +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SofaSimpleGUI/examples/oneTet.scn b/applications/plugins/SofaSimpleGUI/examples/oneTet.scn deleted file mode 100644 index d888792de76..00000000000 --- a/applications/plugins/SofaSimpleGUI/examples/oneTet.scn +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp b/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp deleted file mode 100644 index 7cdc42b84c1..00000000000 --- a/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#include - - -namespace sofa::component -{ - - //Here are just several convenient functions to help user to know what contains the plugin - - extern "C" { - SOFA_SOFASIMPLEGUI_API void initExternalModule(); - SOFA_SOFASIMPLEGUI_API const char* getModuleName(); - SOFA_SOFASIMPLEGUI_API const char* getModuleVersion(); - SOFA_SOFASIMPLEGUI_API const char* getModuleLicense(); - SOFA_SOFASIMPLEGUI_API const char* getModuleDescription(); - SOFA_SOFASIMPLEGUI_API const char* getModuleComponentList(); - } - - void initExternalModule() - { - static bool first = true; - if (first) - { - first = false; - } - } - - const char* getModuleName() - { - return "SimpleGUI"; - } - - const char* getModuleVersion() - { - return "0.2"; - } - - const char* getModuleLicense() - { - return "LGPL"; - } - - - const char* getModuleDescription() - { - return "TODO: replace this with the description of your plugin"; - } - - const char* getModuleComponentList() - { - /// string containing the names of the classes provided by the plugin - return ""; - //return "MyMappingPendulumInPlane, MyBehaviorModel, MyProjectiveConstraintSet"; - } - - - -} - -