STATE_polygon_get_first_point

 

 




   Returns a handle to the first point of a polygon
   use STATE_point_get_next_point() the get the next points
  
  Example: 
  
  	  Go over all the points of a polygon
  	for(DWORD point=STATE_polygon_get_first_point(polygon_handle); point!=NULL ; point=STATE_point_get_next_point(point) ) 
  	{
  		
  
  	}
  
  
  Another way of looping through all the objects that are loaded into the engine is by using the FOREACH_POINT macro.
   Example:
  		FOREACH_POINT(poly, pnt) {
  			  do something with the point. For rxsmple lets check its coords
  			double XYZ;
  			STATE_point_get_xyz(pnt, XYZ);
  		}
#define FOREACH_POINT(poly,pnt) for(DWORD pnt=STATE_polygon_get_first_point(poly); pnt!=NULL; pnt=STATE_point_get_next_point(pnt))

 

 

Go to page 1      Select API

 

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