- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm developing an app for taking snapshots of poses. It's useful for adding new gestures. I'm designing it to allow the user to set the desired parameters. Right now the checkboxes are non-functional, but I can get either finger foldedness to display or the joint rotations by commenting out one or the other. When I try to get both to show up in a text box, the app crashes. It may not be a bad thing as it really does not make sense to record BOTH foldedness of the whole finger and the rotation of each joint - but I'm puzzled as to the cause of the crash.
Note: I've tried combining console and Windows API outputs through every method I could find, but had no luck. It seems to be either/or. Displaying the data in a text box REALLY slows down the video display. Running in console decreases the ease of selecting parameters.
Special thanks to Jack Ketola for showing me how to query the finger data.
I'm attaching the snapshot solution and inserting the relevant code here.
The BIG QUESTION: why does sending both the finger foldedness AND the joint rotations cause the system to crash???
// create the mocap snapshot string if (snapshotEnabled==true){ // commented out a portion to remove it from the output. This portion below is the joint rotation data /*sAlerts += " Joint: "; sAlerts += NumberToString(j); sAlerts += " X rotation: "; sAlerts += NumberToString(jointData.localRotation.x); sAlerts += " Y rotation: "; sAlerts += NumberToString(jointData.localRotation.y); sAlerts += " Z rotation: "; sAlerts += NumberToString(jointData.localRotation.z); */ //Portion below is the finger foldedness data sAlerts += FingerTypeStrings[finger]; sAlerts += " finger has foldedness of "; sAlerts += NumberToString(fingerData.foldedness); sAlerts += "\r\n"; string2wchar_t(arr, sAlerts); } } if(showExtremityPoint==true){ for(int j = 0; j < PXCHandData::NUMBER_OF_EXTREMITIES ; j++) { handData->QueryExtremityPoint((PXCHandData::ExtremityType)j,extremitiesPointsNodes); } } } //code below works okay for single frame, but bogs down during runtime if (snapshotEnabled == true){ SetMocapData(hwndDlg, arr); snapshotEnabled = false; }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved:
It appears that it was a problem with a fixed size array.
The array that stores the data is initialized as so:
static pxcCHAR arr[1000];
By increasing it to 50000, I was able to store both the foldedness and the rotation data in the editbox.
Next: setting it up as a dynamic array.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page