STATE_object_duplicate

 

 




  Create a copy of a given object
  Returns a handle to the created object
  If an error occurred it will return NULL
   duplicate_polygons_flag can be YES or NO.
   if NO is given then the source and the new copy will
   use the same polygons. That means that if we will change the bitmap or the color
   of a polygon it will effect all the copies too.
   If the object is big then duplicating all its polygons can be time consuming,
   That's why we might prefer to set duplicate_polygons_flag to NO.
   Note also that if the polygons are not really duplicated then many
   functions that receive a polygon will fail.
   For example if we call STATE_polygon_get_location()
   and we send a polygon that belongs to a copy of an object. 
   then since we didnt duplicate the object's polygons there is only
   one polygon for both objects so in this case the function will return
   the location of the polygon from the original object.
   The Same story is with functions like STATE_polygon_add_shadow_patch()

 

 

Go to page 1      Select API

 

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