Page 1 of 1
Where are the Optitrack "params" flags defined?
Posted: Thu Dec 08, 2016 6:55 am
by JeffV
I see from the C++ example that there are flags packed in the params field to indicate some status.
Where can I find the documentation for these flags for Optitrack host?
Code: Select all
// FrameOfMocapData params
bool bIsRecording = ((data->params & 0x01)!=0);
bool bTrackedModelsChanged = ((data->params & 0x02)!=0);
Thanks!
Re: Where are the Optitrack "params" flags defined?
Posted: Thu Dec 08, 2016 12:50 pm
by steven.andrews
Hello JeffV,
The param variables do contain some tracked and untracked status flags. The only reference we have for this is the usage in the SampleClient, which is what you have already found.
Currently these are the only flags in use, but the SampleClient will be updated if this changes.
Code: Select all
// FrameOfMocapData params
bool bIsRecording = ((data->params & 0x01)!=0);
bool bTrackedModelsChanged = ((data->params & 0x02)!=0);
// Rigid Body params
// 0x01 : bool, rigid body was successfully tracked in this frame
bool bTrackingValid = data->RigidBodies[i].params & 0x01;
// Labeled Markers params
bool bOccluded; // marker was not visible (occluded) in this frame
bool bPCSolved; // reported position provided by point cloud solve
bool bModelSolved; // reported position provided by model solve
printf("Labeled Markers [Count=%d]\n", data->nLabeledMarkers);
for(i=0; i < data->nLabeledMarkers; i++)
{
bOccluded = ((data->LabeledMarkers[i].params & 0x01)!=0);
bPCSolved = ((data->LabeledMarkers[i].params & 0x02)!=0);
bModelSolved = ((data->LabeledMarkers[i].params & 0x04)!=0);
}
I hope you find this to be useful. If you require any further assistance, please feel free to reach out to us at
help.naturalpoint.com
Best,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer