Page 1 of 1
					
				Markers in a tracked rigid body
				Posted: Tue Aug 18, 2009 4:35 am
				by kahl_hellmer
				..a question about real-time tracking of a specific marker in a tracked rigid body. What would be the easiest/CPU-friendliest way of finding this marker? In a way - what I am looking for is a function like TT_TrackableMarker() for the tracked rigid body and not the rigid body definition.
Is the only way to go through each marker in a frame using TT_FrameMarkerX-Z and choose? WWJD?
Thanks,
Kahl Hellmer
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Tue Aug 18, 2009 12:28 pm
				by beckdo
				Yes, that is the current way.  If you have any specific function requests, let me know and I'll try to get them added into the API.
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Wed Aug 19, 2009 1:43 am
				by kahl_hellmer
				Ok, thanks. Then I'll do it the hard way for now..
It would help me alot if the API had a function that takes a rigid body index and a marker index as input and returns the marker position (not from definition, but the tracked position). Also, the possibility to explicitly index or set ID to the markers when creating a rigid body definition would in this case be very helpful.
Thanks again,
Kahl
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Wed Sep 30, 2009 3:39 pm
				by litch09
				This is certainly an important feature which would help if implemented in future versions. What is the best way to do this calculation?
Do you have to calculate the distance of each marker (obtained from TT_FrameMarkerX-Z) from the the other markers and determine which markers best match the distances from the definition of the trackables obtained from TT_TrackableMarker()? Or is there a more efficient way?
Cheers, 
Glen
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Thu Oct 01, 2009 11:40 am
				by kahl_hellmer
				You can also use the TT_TrackableMarker() information with the TT_TrackableLocation() and calculate where the markers "should" be. Its probably more CPU-friendly, but might not be suitable. I guess that what you described would be the correct way.
Kahl
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Thu Oct 01, 2009 2:02 pm
				by litch09
				Yes, that does sound like a good way of doing this. I will give it a go.
Cheers
			 
			
					
				Re: Markers in a tracked rigid body
				Posted: Wed Aug 03, 2011 2:52 am
				by saftschachtel
				Hi guys!
I want to bring this post to life again.
I think the requested functionality is a very basic one.
I should be implemented definetly to the libraries. 
Something like...
///Get the current position of a marker, that belongs to a rigid body.
/**
*\param rigidIndex - the index of the rigidbody
*\param markerIndex - the markerindex in the rigidbody
*\param posX, posY, posZ - pointer to variables in which the position is stored 
*/
void TT_TrackableMarkerLocation( int rigidIndex, int markerIndex, float *posX, float *posY, float *posZ);
...would be really great!
Tom