From: Thomas Pietrzak Date: Wed, 23 Jan 2013 10:55:46 +0000 (+0000) Subject: Added Tactile fluids, fixed tactile buttons X-Git-Url: https://git.thomaspietrzak.com/?a=commitdiff_plain;h=b895ca6cbe47da643a3eff5754ee4f8a71ebc2ba;p=dwell.git Added Tactile fluids, fixed tactile buttons git-svn-id: svn+ssh://thomaspietrzak.com/var/svn/rep@100 47cf9a05-e0a8-4ed5-9e9b-101a649bc004 --- diff --git a/DwellCursor.sln b/DwellCursor.sln deleted file mode 100644 index 588db48..0000000 --- a/DwellCursor.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DwellCursor", "DwellCursor\DwellCursor.vcxproj", "{2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Debug|Win32.ActiveCfg = Debug|Win32 - {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Debug|Win32.Build.0 = Debug|Win32 - {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Release|Win32.ActiveCfg = Release|Win32 - {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/DwellCursor.suo b/DwellCursor.suo deleted file mode 100644 index ed03066..0000000 Binary files a/DwellCursor.suo and /dev/null differ diff --git a/PushButtons/MainScene.cpp b/PushButtons/MainScene.cpp index 08ecd6a..e60d433 100644 Binary files a/PushButtons/MainScene.cpp and b/PushButtons/MainScene.cpp differ diff --git a/PushButtons/PushButton.cpp b/PushButtons/PushButton.cpp index 1dd7051..38084af 100644 --- a/PushButtons/PushButton.cpp +++ b/PushButtons/PushButton.cpp @@ -1,6 +1,7 @@ #include "PushButton.h" #include +#include QColor PushButton::_bgcolor = Qt::gray; QColor PushButton::_hovercolor = Qt::lightGray; @@ -8,7 +9,7 @@ QColor PushButton::_validatedcolor = Qt::red; QColor PushButton::_targetcolor = Qt::green; QColor PushButton::_targethovercolor = Qt::yellow; -const float PushButton::_pushdistance = 0.1; +const float PushButton::_pushdistance = 0.05; PushButton::PushButton(QGraphicsItem *parent) diff --git a/TactileButtons.sln b/TactileButtons.sln index c7b7611..b12eb95 100644 --- a/TactileButtons.sln +++ b/TactileButtons.sln @@ -5,6 +5,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PushButtons", "PushButtons\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DwellCursor", "DwellCursor\DwellCursor.vcxproj", "{2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TactileFluids", "TactileFluids\TactileFluids.vcxproj", "{014A41B9-3E4D-48F0-B5D7-8C6FE42A142E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -19,6 +21,10 @@ Global {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Debug|Win32.Build.0 = Debug|Win32 {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Release|Win32.ActiveCfg = Release|Win32 {2928B2FC-98F8-427E-B0D2-2CEA2DA1FFC9}.Release|Win32.Build.0 = Release|Win32 + {014A41B9-3E4D-48F0-B5D7-8C6FE42A142E}.Debug|Win32.ActiveCfg = Debug|Win32 + {014A41B9-3E4D-48F0-B5D7-8C6FE42A142E}.Debug|Win32.Build.0 = Debug|Win32 + {014A41B9-3E4D-48F0-B5D7-8C6FE42A142E}.Release|Win32.ActiveCfg = Release|Win32 + {014A41B9-3E4D-48F0-B5D7-8C6FE42A142E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/TactileButtons.suo b/TactileButtons.suo index a914ffb..95b9ff6 100644 Binary files a/TactileButtons.suo and b/TactileButtons.suo differ diff --git a/TactileFluids/KinectInput.cpp b/TactileFluids/KinectInput.cpp new file mode 100644 index 0000000..e908518 --- /dev/null +++ b/TactileFluids/KinectInput.cpp @@ -0,0 +1,99 @@ +#include "KinectInput.h" + +#include + +#define TIMEOUT 100 + +KinectInput::KinectInput() +:_running(false), _skeletonid(-1), _skeletonEvent(NULL) +{ + //creates the kinect sensor (id 0) + if(FAILED(NuiCreateSensorByIndex(0, &_kinect))) + { + qDebug() << "Cannot find a KINECT sensor" << endl; + //I should do something else, sucha as an exception + return; + } + + if (_kinect->NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX | NUI_INITIALIZE_FLAG_USES_SKELETON) == E_NUI_SKELETAL_ENGINE_BUSY) + { + qDebug() << "Cannot initialize the KINECT sensor" << endl; + return; + } + + //initialize the skeleton tracking + _skeletonEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if(!HasSkeletalEngine(_kinect) || FAILED(_kinect->NuiSkeletonTrackingEnable(_skeletonEvent, 0))) + { + qDebug() << "Cannot Initialize skeleton tracking" << endl; + return; + } +} + +KinectInput::~KinectInput() +{ + NuiShutdown(); + if( _skeletonEvent && ( _skeletonEvent != INVALID_HANDLE_VALUE ) ) + CloseHandle( _skeletonEvent ); +} + +//thread that manages the kinect events +void KinectInput::run() +{ + _running = true; + while(_running) + { + //wait for an event + if (WaitForSingleObject(_skeletonEvent, TIMEOUT) != 0) + continue; + + //get skeleton values + NUI_SKELETON_FRAME SkeletonFrame; + HRESULT hr = _kinect->NuiSkeletonGetNextFrame( 0, &SkeletonFrame ); +// qDebug() << "Kinect frame " << SkeletonFrame.dwFrameNumber; + + //if no skeleton already identified or not tracked anymore, search for one + if (_skeletonid < 0 || SkeletonFrame.SkeletonData[_skeletonid].eTrackingState != NUI_SKELETON_TRACKED) + { + for( int i = 0 ; i < NUI_SKELETON_COUNT ; i++ ) + { + if(SkeletonFrame.SkeletonData[i].eTrackingState == NUI_SKELETON_TRACKED) + { + _skeletonid = i; + break; + } + } + } + + //no skeleton found + if (_skeletonid < 0) + continue; + + //retrieve information on the skeleton + NUI_SKELETON_DATA &data = SkeletonFrame.SkeletonData[_skeletonid]; + + //checking if we have a skeleton +/* if (data.eTrackingState != NUI_SKELETON_TRACKED) + continue;*/ + + //smooth out the skeleton data + _kinect->NuiTransformSmooth(&SkeletonFrame, NULL); + + + if (data.eSkeletonPositionTrackingState[NUI_SKELETON_POSITION_HAND_RIGHT] == NUI_SKELETON_NOT_TRACKED) + continue; //right hand not detected + else + { +/* float posx, posy; + NuiTransformSkeletonToDepthImageF(data.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT], &posx, &posy); + emit rightHandMove(posx, posy,0);*/ + Vector4 &skelpos = data.SkeletonPositions[NUI_SKELETON_POSITION_HAND_RIGHT]; + emit rightHandMove(skelpos.x, skelpos.y, skelpos.z); + } + } +} + +void KinectInput::stop() +{ + _running = false; +} diff --git a/TactileFluids/KinectInput.h b/TactileFluids/KinectInput.h new file mode 100644 index 0000000..b4bf077 --- /dev/null +++ b/TactileFluids/KinectInput.h @@ -0,0 +1,29 @@ +#ifndef __KINECTINPUT__ +#define __KINECTINPUT__ + +#include +#include +#include +#include + +class KinectInput: public QThread +{ + Q_OBJECT + public: + KinectInput(); + ~KinectInput(); + + void run(); + void stop(); + + private: + INuiSensor* _kinect; + HANDLE _skeletonEvent; + bool _running; + int _skeletonid; + + signals: + void rightHandMove(float x, float y, float z); +}; + +#endif diff --git a/TactileFluids/OneEuroFilter.cpp b/TactileFluids/OneEuroFilter.cpp new file mode 100644 index 0000000..02377c4 --- /dev/null +++ b/TactileFluids/OneEuroFilter.cpp @@ -0,0 +1,113 @@ +#include "OneEuroFilter.h" + +#define _USE_MATH_DEFINES +#include +#include + +LowPassFilter::LowPassFilter(double alpha, double initval) +:_y(initval), _s(initval), _initialized(false) +{ + setAlpha(alpha); +} + +double LowPassFilter::filter(double value) +{ + double result; + if (_initialized) + result = _a * value + (1.0 - _a) * _s; + else + { + result = value; + _initialized = true; + } + _y = value; + _s = result; + return result; +} + +double LowPassFilter::filterWithAlpha(double value, double alpha) +{ + setAlpha(alpha); + return filter(value); +} + +bool LowPassFilter::hasLastRawValue(void) +{ + return _initialized; +} + +double LowPassFilter::lastRawValue(void) +{ + return _y ; +} + +void LowPassFilter::setAlpha(double alpha) +{ + if (alpha <= 0.0 || alpha > 1.0) + throw std::range_error("alpha should be in ]0.0., 1.0]"); + _a = alpha; +} + + +OneEuroFilter::OneEuroFilter(double freq, double mincutoff, double beta, double dcutoff) +:_x(new LowPassFilter(alpha(mincutoff))), _dx(new LowPassFilter(alpha(dcutoff))), _lasttime(UndefinedTime) +{ + setFrequency(freq); + setMinCutoff(mincutoff); + setBeta(beta); + setDerivateCutoff(dcutoff); +} + +OneEuroFilter::~OneEuroFilter(void) +{ + delete _x; + delete _dx; +} + +double OneEuroFilter::filter(double value, TimeStamp timestamp) +{ + // update the sampling frequency based on timestamps + if (_lasttime != UndefinedTime && timestamp != UndefinedTime) + _freq = 1.0 / (timestamp - _lasttime); + _lasttime = timestamp; + // estimate the current variation per second + double dvalue = _x->hasLastRawValue() ? (value - _x->lastRawValue()) * _freq : 0.0; // FIXME: 0.0 or value? + double edvalue = _dx->filterWithAlpha(dvalue, alpha(_dcutoff)); + // use it to update the cutoff frequency + double cutoff = _mincutoff + _beta * fabs(edvalue); + // filter the given value + return _x->filterWithAlpha(value, alpha(cutoff)); +} + +double OneEuroFilter::alpha(double cutoff) +{ + double te = 1.0 / _freq; + double tau = 1.0 / (2 * M_PI * cutoff); + return 1.0 / (1.0 + tau/te); +} + +void OneEuroFilter::setFrequency(double f) +{ + if (f <= 0) + throw std::range_error("freq should be >0"); + _freq = f; +} + +void OneEuroFilter::setMinCutoff(double mc) +{ + if (mc <= 0) + throw std::range_error("mincutoff should be >0"); + _mincutoff = mc; +} + +void OneEuroFilter::setBeta(double b) +{ + _beta = b; +} + +void OneEuroFilter::setDerivateCutoff(double dc) +{ + if (dc <= 0) + throw std::range_error("dcutoff should be >0"); + _dcutoff = dc; +} diff --git a/TactileFluids/OneEuroFilter.h b/TactileFluids/OneEuroFilter.h new file mode 100644 index 0000000..100a5ae --- /dev/null +++ b/TactileFluids/OneEuroFilter.h @@ -0,0 +1,62 @@ +/* + * OneEuroFilter.h/.cpp - + * + * Author: Thomas Pietrzak (thomas.pietrzak@lifl.fr) + * based on code from + * Nicolas Roussel (nicolas.roussel@inria.fr) + * + */ + + +#ifndef __ONEEURO__ +#define __ONEEURO__ + + +typedef double TimeStamp ; // in seconds + +static const TimeStamp UndefinedTime = -1.0 ; + + +class LowPassFilter +{ + public: + LowPassFilter(double alpha, double initval=0.0); + + double filterWithAlpha(double value, double alpha); + inline bool hasLastRawValue(void); + inline double lastRawValue(void); + + private: + double _y, _a, _s; + bool _initialized; + + void setAlpha(double alpha); + double filter(double value); +} ; + +class OneEuroFilter +{ + public: + OneEuroFilter( + double freq, + double mincutoff=1.0, + double beta_=0.0, + double dcutoff=1.0); + + ~OneEuroFilter(); + + double filter(double value, TimeStamp timestamp=UndefinedTime); + + private: + double _freq, _mincutoff, _beta;, _dcutoff; + LowPassFilter *_x, *_dx; + TimeStamp _lasttime; + + double alpha(double cutoff); + inline void setFrequency(double f); + inline void setMinCutoff(double mc); + inline void setBeta(double b); + inline void setDerivateCutoff(double dc); +} ; + +#endif diff --git a/TactileFluids/TactileFluids.cpp b/TactileFluids/TactileFluids.cpp new file mode 100644 index 0000000..83ab8d3 --- /dev/null +++ b/TactileFluids/TactileFluids.cpp @@ -0,0 +1,100 @@ +#include "TactileFluids.h" + +#include +#include + +TactileFluids::TactileFluids(QWidget *parent, Qt::WFlags flags) +: QMainWindow(parent, flags), _filter(100.0, 1.0) +{ + try + { + _tactonplayer = new TactonPlayer("COM8"); + } + catch (...) + { + _tactonplayer = NULL; + qDebug() << "No wristband found"; + } + + setupUi(this); + + _pos.x = _pos.y = _pos.z = 0.0; + + _tactonplayer->setFrequency(_frequency->value()); + + connect(_frequency, SIGNAL(valueChanged(int)), this, SLOT(updateFrequency(int))); + + connect(&_kinectsensor, SIGNAL(rightHandMove(float,float,float)), + this, SLOT(updateHand(float,float,float))); + + _kinectsensor.start(); + _timer.start(); + + _tactonplayer->setFrequency(_frequency->value()); +} + +TactileFluids::~TactileFluids() +{ + _kinectsensor.stop(); + + if (_tactonplayer) + { + unsigned char amp[] = {0, 0, 0, 0}; + _tactonplayer->setAmplitudes(4, amp); + delete _tactonplayer; + } +} + +void TactileFluids::updateFrequency(int f) +{ + _tactonplayer->setFrequency(f); +} + +void TactileFluids::updateHand(float x, float y, float z) +{ + float dx = x - _pos.x; + float dy = y - _pos.y; + float dz = z - _pos.z; + float speed = 100000 * sqrt(dx*dx + dy*dy + dz*dz) / _timer.elapsed(); + + //filter the speed value + try + { + speed = _filter.filter(speed, QDateTime::currentMSecsSinceEpoch()); + } + catch(...) + { + qDebug() << "Filter went wrong speed=" << speed << " timestamp=" << QDateTime::currentMSecsSinceEpoch(); + } + + //cap values between 0 and 255 + if (speed <= _minspeed->value()) + { + unsigned char amp[] = {0, 0, 0, 0}; + _tactonplayer->setAmplitudes(4, amp); + } + else if (speed >= _maxspeed->value()) + { + unsigned char amp[] = {255, 255, 255, 255}; + _tactonplayer->setAmplitudes(4, amp); + } + else + { + unsigned char amp[4]; + memset(amp, unsigned char(255 * (speed - _minspeed->value()) / (_maxspeed->value() - _minspeed->value())), 4); + _tactonplayer->setAmplitudes(4, amp); + } + + //qDebug() << "deltat = " << _timer.elapsed() << " dist = " << sqrt(dx*dx + dy*dy + dz*dz) << "\n"; + _timer.restart(); + + _pos.x = x; + _pos.y = y; + _pos.z = z; + + _x->setText("x=" + QString::number(_pos.x, 'f', 3)); + _y->setText("y=" + QString::number(_pos.y, 'f', 3)); + _z->setText("z=" + QString::number(_pos.z, 'f', 3)); + _v->setText("v=" + QString::number(speed, 'f', 3)); + +} diff --git a/TactileFluids/TactileFluids.h b/TactileFluids/TactileFluids.h new file mode 100644 index 0000000..c3b80c0 --- /dev/null +++ b/TactileFluids/TactileFluids.h @@ -0,0 +1,33 @@ +#ifndef TACTILEFLUIDS_H +#define TACTILEFLUIDS_H + +#include +#include "ui_tactilefluids.h" + +#include +#include + +#include "KinectInput.h" +#include "OneEuroFilter.h" + +class TactileFluids : public QMainWindow, public Ui::TactileFluidsClass +{ + Q_OBJECT + + public: + TactileFluids(QWidget *parent = 0, Qt::WFlags flags = 0); + ~TactileFluids(); + + private: + KinectInput _kinectsensor; + TactonPlayer *_tactonplayer; + struct { float x, y, z; } _pos; + QTime _timer; + OneEuroFilter _filter; + + public slots: + void updateHand(float, float, float); + void updateFrequency(int); +}; + +#endif // TACTILEFLUIDS_H diff --git a/TactileFluids/TactileFluids.vcxproj b/TactileFluids/TactileFluids.vcxproj new file mode 100644 index 0000000..1ba5787 --- /dev/null +++ b/TactileFluids/TactileFluids.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {014A41B9-3E4D-48F0-B5D7-8C6FE42A142E} + Qt4VSv1.0 + + + + Application + + + Application + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + AllRules.ruleset + + + AllRules.ruleset + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions) + $(KINECTSDK10_DIR)\inc;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories) + Disabled + ProgramDatabase + MultiThreadedDebugDLL + false + + + Windows + $(OutDir)\$(ProjectName).exe + $(KINECTSDK10_DIR)\lib\x86;;$(QTDIR)\lib;%(AdditionalLibraryDirectories) + true + TactonPlayerd.lib;Kinect10.lib;qtmaind.lib;QtCored4.lib;QtGuid4.lib;%(AdditionalDependencies) + + + + + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions) + $(KINECTSDK10_DIR)\inc;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories) + + + MultiThreadedDLL + false + + + Windows + $(OutDir)\$(ProjectName).exe + $(KINECTSDK10_DIR)\lib\x86;;$(QTDIR)\lib;%(AdditionalLibraryDirectories) + false + TactonPlayer.lib;Kinect10.lib;qtmain.lib;QtCore4.lib;QtGui4.lib;%(AdditionalDependencies) + + + + + true + + + true + + + + + + + + + true + + + true + + + + + + + + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing TactileFluids.h... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB "-I$(KINECTSDK10_DIR)\inc" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing TactileFluids.h... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I$(KINECTSDK10_DIR)\inc" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" + + + + + Document + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + + + + + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing KinectInput.h... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB "-I$(KINECTSDK10_DIR)\inc" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing KinectInput.h... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I$(KINECTSDK10_DIR)\inc" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" + + + + + Document + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + + + + + + + + + + + \ No newline at end of file diff --git a/TactileFluids/main.cpp b/TactileFluids/main.cpp new file mode 100644 index 0000000..c42ab7b --- /dev/null +++ b/TactileFluids/main.cpp @@ -0,0 +1,10 @@ +#include "TactileFluids.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + TactileFluids w; + w.show(); + return a.exec(); +} diff --git a/TactileFluids/tactilefluids.qrc b/TactileFluids/tactilefluids.qrc new file mode 100644 index 0000000..486c8c8 --- /dev/null +++ b/TactileFluids/tactilefluids.qrc @@ -0,0 +1,4 @@ + + + + diff --git a/TactileFluids/tactilefluids.ui b/TactileFluids/tactilefluids.ui new file mode 100644 index 0000000..22abb01 --- /dev/null +++ b/TactileFluids/tactilefluids.ui @@ -0,0 +1,157 @@ + + + TactileFluidsClass + + + + 0 + 0 + 322 + 164 + + + + TactileFluids + + + + + + + + + Min speed + + + + + + + 10000 + + + 10 + + + 5 + + + + + + + cm/s + + + + + + + + + + + Max speed + + + + + + + 1 + + + 10000 + + + 10 + + + 100 + + + + + + + cm/s + + + + + + + + + + + Frequency + + + + + + + 1 + + + 1000 + + + 10 + + + 250 + + + + + + + Hz + + + + + + + + + + + x= + + + + + + + y= + + + + + + + z= + + + + + + + v= + + + + + + + + + + + + + +