Add a polygon to the world. A polygon can be created and manipulated
but it is not drawn until this function (or STATE_object_add_polygon() ) is called.
This function also calls STATE_polygon_is_valid() to check the validity of the added polygon.
If STATE_polygon_is_valid() returns NO (not valid) it will try to
fix the polygon. If the attempt to fix the polygon will fail the
function will return VR_ERROR.
This function works only in EDITOR_MODE.
To add a polygon in Viewer Mode (The default mode) use the
function STATE_object_add_polygon().
In viewer mode it is only possible to add polygons to the dynamic part of the world
using STATE_object_add_polygon().
Returns OK or VR_ERROR.
|