|
Sets the point (x,y,z) coordinate.
After changing the points of a polygon dont forget to call STATE_polygon_is_valid()
This call is needed for recalculating internal data of the polygon (such as the polygon's normal)
Example:
double xyz[3]={100,200,300};
STATE_point_set_xyz(my_point, xyz);
STATE_polygon_is_valid(); Update the polygon data (call this function after you have finished manipulating the polygon's point
Please note that if the point belongs to a dynamic object then the (x,y,z) should be in OBJECT_SPACE.
To get a x,y,z coorinate in OBJECT_SPACE you should write the following code:
double xyz[3];
xyz[0]=100; xyz[1]=200; xyz[2]=300; setting the coordinate (world space)
double xyz_object_space[3]
STATE_object_convert_point_to_object_space(my_object, xyz, xyz_object_space);
STATE_point_set_xyz(my_point, xyz);
STATE_polygon_is_valid(); Update the polygon data (call this function after you have finished manipulating the polygon's point)
|