STATE_track_find_closest_point_on_track

 

 


   P is a point anywhere in space
   returns the index to the point on the track that
   is the closest.
   NOTE that if an object or a camera has a track and the track_offset is
   not (0,0,0) then you must do the following to get a correct result
  
  	P[0]=P[0]-track_offset[0];
  	P[1]=P[1]-track_offset[1];
  	P[2]=P[2]-track_offset[2];
  	index=STATE_track_find_closest_point_on_track(track, P);
  	STATE_track_get_point(track, index, pt);
  	pt[0]=pt[0]+track_offset[0];
  	pt[1]=pt[1]+track_offset[1];
  	pt[2]=pt[2]+track_offset[2];
  

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com