STATE_polygon_create

 

 


  Get the handle to the last added point of the polygon.
  This is very useful for getting the handle of a point after 
  calling the function STATE_polygon_add_point();
  
   Example:
  
  	DWORD poly=STATE_polygon_create()
  	double point[6]={1,2,3, 0,0, 199};
  	STATE_polygon_add_point(poly, point);
      Now if we want to set the point light/color we need to get the point handle
      To get the handle to the last point of the polygon (which is the last point we added) we use:
  	point_handle=STATE_polygon_get_last_point(poly);
  	BYTE rgb[3]={255,0,0};   red color
  	STATE_point_set_rgb(point_handle, rgb);
  
DWORD STATE_stdcall STATE_polygon_get_last_point(DWORD polygon_handle);


   Creates a new empty polygon.
   Returns a handle to the new polygons
   or NULL if an error occurred.
   Note ! the polygon won't be seen or checked for errors 
   till you do STATE_engine_add_polygon()
   Use STATE_polygon_add_point() to add points to the created polygon.

 

 

Go to page 1      Select API

 

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