[Gtkradiant] [Bug 625] PicoModel: add support for non-MD3 models in tools

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Fri, 18 Oct 2002 11:19:47 -0500


http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=625





------- Additional Comments From ydnar@shaderlab.com  2002-10-18 11:19 -------
PicoModel is now at version 0.7. The API should be stable enough for other 
components (non-Q3Map2) to start using it. It currently loads MD3 and 3DS 
models. The ASE and OBJ loaders were stubbed out until the primary API was 
completed.

PicoModel quick & dirty:

#include "picomodel.h"

PicoInit();
PicoSetMallocFunc( safe_malloc );
PicoSetFreeFunc( free );
PicoSetPrintFunc( PicoPrintFunc );
PicoSetLoadFileFunc( PicoLoadFileFunc );

/* name, frame */
picoModel_t *pm = PicoLoadModel( "models/mapobjects/tree/tree2.md3", 0 );

/* getting data */
picoSurface_t *ps = PicoGetModelSurface( pm, 0 );
picoVec3_t *xyz = PicoGetSurfaceXYZ( ps, 0 );
picoVec3_t *normal = PicoGetSurfaceNormal( ps, 0 );

etc.