diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2013-01-02 18:54:06 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2013-01-02 18:54:06 +0000 |
commit | c681889ab4c37bfd0f049177459b7fda380fda51 (patch) | |
tree | f6072db0b2328b4df9e5214e3578baa43792b48e /FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp | |
parent | 9593aa9c3c231add3dadabf0a1ea9f8182f88a79 (diff) |
Added 'enable axis' parameters to the Trackers. Added 'none' to filter-listbox.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@203 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp')
-rw-r--r-- | FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp b/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp index ecf0e5dd..102c85bd 100644 --- a/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp +++ b/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp @@ -33,15 +33,12 @@ FTNoIR_Tracker::FTNoIR_Tracker() m_StopThread = CreateEvent(0, TRUE, FALSE, 0);
m_WaitThread = CreateEvent(0, TRUE, FALSE, 0);
- ////allocate memory for the parameters
- //parameterValueAsFloat.clear();
- //parameterRange.clear();
-
- //// Add the parameters to the list
- //parameterRange.append(std::pair<float,float>(1000.0f,9999.0f));
- //parameterValueAsFloat.append(0.0f);
- //setParameterValue(kPortAddress,5551.0f);
-
+ bEnableRoll = true;
+ bEnablePitch = true;
+ bEnableYaw = true;
+ bEnableX = true;
+ bEnableY = true;
+ bEnableZ = true;
portAddress = 5551;
newHeadPose.x = 0.0f;
@@ -159,12 +156,24 @@ void FTNoIR_Tracker::StopTracker( bool exit ) bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
{
- data->x = newHeadPose.x;
- data->y = newHeadPose.y;
- data->z = newHeadPose.z;
- data->yaw = newHeadPose.yaw;
- data->pitch = newHeadPose.pitch;
- data->roll = newHeadPose.roll;
+ if (bEnableX) {
+ data->x = newHeadPose.x;
+ }
+ if (bEnableX) {
+ data->y = newHeadPose.y;
+ }
+ if (bEnableX) {
+ data->z = newHeadPose.z;
+ }
+ if (bEnableX) {
+ data->yaw = newHeadPose.yaw;
+ }
+ if (bEnableX) {
+ data->pitch = newHeadPose.pitch;
+ }
+ if (bEnableX) {
+ data->roll = newHeadPose.roll;
+ }
return true;
}
@@ -182,6 +191,12 @@ void FTNoIR_Tracker::loadSettings() { qDebug() << "FTNoIR_Tracker::loadSettings says: iniFile = " << currentFile;
iniFile.beginGroup ( "FTNClient" );
+ bEnableRoll = iniFile.value ( "EnableRoll", 1 ).toBool();
+ bEnablePitch = iniFile.value ( "EnablePitch", 1 ).toBool();
+ bEnableYaw = iniFile.value ( "EnableYaw", 1 ).toBool();
+ bEnableX = iniFile.value ( "EnableX", 1 ).toBool();
+ bEnableY = iniFile.value ( "EnableY", 1 ).toBool();
+ bEnableZ = iniFile.value ( "EnableZ", 1 ).toBool();
portAddress = (float) iniFile.value ( "PortNumber", 5550 ).toInt();
iniFile.endGroup ();
}
|