STATE_object_create_from_file

 

 



   *** a very inportant function
  Similar to STATE_engine_add_world() the difference is that
  the added world file is added as a dynamic object.
  This function is most useful for adding md2 file (quake files)
  If the world contains a 3d animation (all md2 files contain 3d animation)
  The 3D animation will automatically be added to the engine
  see the 3D_animation API and the 3D_sequence API
  Example:
  		A) loading an md2 object
  		DWORD girl=STATE_object_create_from_file("people\\girl.md2");
  
  		B) Loading a 3dstate file (that can be created using WorldBuilder)
  			DWORD boat=STATE_object_create_from_file("models\\boat.3dstate");
  
   Note:
  	1) If the bitmaps for the object are not located in the default directory
   (inside the bitmaps folder) you can set the bitmap folder by calling
   STATE_engine_set_bitmap_folder();
  
  
    2) This function currently support the following file formats:
  		wld, 3dstate, morfit, md2, anim3d
  
    3) If you have a model that you have created using 3D Studio Max or any other 3D editor
  	  you would first have to convert it to one of the formats supported by 3DSTATE.
  
    4) When using the function STATE_object_get_name() for object that were loaded using
  		STATE_object_create_from_file(), the name returned will be the object file name without the path and 
  		without the file extension.
  	  
  
   See also STATE_object_create_from_file2(), STATE_engine_set_bitmap_folder()

 

 

Go to page 1      Select API

 

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