Return value of TT_IsTrackableTracked
Posted: Wed Nov 03, 2010 7:40 am
I wrote a c# wrapper for the Tracking Tools API and continously update it since Version 2.0. In the first time of developing it worked very well. Since Tracking Tools 2.2 we have different problems with some entry points. Here are two examples:
While this entry point works perfectly:
[DllImport("NPTrackingTools.dll")]
public static extern void TT_SetTrackableEnabled(int index, bool enabled);
This one only returns the value "true" even though any trackables were disabled with the function above:
[DllImport("NPTrackingTools.dll")]
public static extern bool TT_TrackableEnabled(int index);
The second example concerns the entry point which should return the information about whether the selected rigid body is found in the current frame:
[DllImport("NPTrackingTools.dll")]
public static extern bool TT_IsTrackableTracked(int index);
In this case the return value is also always "true" although some trackables couldn't be seen by the cameras.
I want to refer the thread http://forum.naturalpoint.com/forum/ubb ... #Post39187 where the user lich09 wrote "The only problem I am having is using the TT_IsTrackableTracked function which seems to return a library pointer..."
I changed the return value of this wrapping function from bool to int:
[DllImport("NPTrackingTools.dll")]
public static extern int TT_IsTrackableTracked(int index);
Now, i get results like the number 252117760 which seems to indicate a pointer address or something else.
Can anybody help me? Why this function doesn't work anymore with a return type bool?
While this entry point works perfectly:
[DllImport("NPTrackingTools.dll")]
public static extern void TT_SetTrackableEnabled(int index, bool enabled);
This one only returns the value "true" even though any trackables were disabled with the function above:
[DllImport("NPTrackingTools.dll")]
public static extern bool TT_TrackableEnabled(int index);
The second example concerns the entry point which should return the information about whether the selected rigid body is found in the current frame:
[DllImport("NPTrackingTools.dll")]
public static extern bool TT_IsTrackableTracked(int index);
In this case the return value is also always "true" although some trackables couldn't be seen by the cameras.
I want to refer the thread http://forum.naturalpoint.com/forum/ubb ... #Post39187 where the user lich09 wrote "The only problem I am having is using the TT_IsTrackableTracked function which seems to return a library pointer..."
I changed the return value of this wrapping function from bool to int:
[DllImport("NPTrackingTools.dll")]
public static extern int TT_IsTrackableTracked(int index);
Now, i get results like the number 252117760 which seems to indicate a pointer address or something else.
Can anybody help me? Why this function doesn't work anymore with a return type bool?