picomodel.h File Reference

#include <stddef.h>
Include dependency graph for picomodel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  picoSurface_s
struct  picoShader_s
struct  picoModel_s
struct  picoModule_s
 pico file format module structure More...
struct  picoVertexCombinationData_s
struct  picoVertexCombinationHash_s

Defines

#define PICOMODEL_VERSION   "0.8.20"
#define PICO_GROW_SHADERS   16
#define PICO_GROW_SURFACES   16
#define PICO_GROW_VERTEXES   1024
#define PICO_GROW_INDEXES   1024
#define PICO_GROW_ARRAYS   8
#define PICO_GROW_FACES   256
#define PICO_MAX_SPECIAL   8
#define PICO_MAX_DEFAULT_EXTS   4
#define PM_PARAMS_CANLOAD   const char *fileName, void *buffer, int bufSize
#define PM_PARAMS_LOAD   const char *fileName, int frameNum, void *buffer, int bufSize
#define PM_PARAMS_CANSAVE   void
#define PM_PARAMS_SAVE   const char *fileName, picoModel_t *model

Typedefs

typedef unsigned char picoByte_t
typedef float picoVec_t
typedef float picoVec2_t [2]
typedef float picoVec3_t [3]
typedef float picoVec4_t [4]
typedef picoByte_t picoColor_t [4]
typedef int picoIndex_t
typedef struct picoSurface_s picoSurface_t
typedef struct picoShader_s picoShader_t
typedef struct picoModel_s picoModel_t
typedef struct picoModule_s picoModule_t
typedef size_t(* PicoInputStreamReadFunc )(void *inputStream, unsigned char *buffer, size_t length)
typedef struct
picoVertexCombinationData_s 
picoVertexCombinationData_t
typedef struct
picoVertexCombinationHash_s 
picoVertexCombinationHash_t

Enumerations

enum  picoSurfaceType_t { PICO_BAD, PICO_TRIANGLES, PICO_PATCH }
enum  picoPrintLevel_t {
  PICO_NORMAL, PICO_VERBOSE, PICO_WARNING, PICO_ERROR,
  PICO_FATAL
}
enum  {
  PICO_PMV_OK, PICO_PMV_ERROR, PICO_PMV_ERROR_IDENT, PICO_PMV_ERROR_VERSION,
  PICO_PMV_ERROR_SIZE, PICO_PMV_ERROR_MEMORY
}

Functions

int PicoInit (void)
void PicoShutdown (void)
 shuts the pico model library down
int PicoError (void)
 returns last picomodel error code (see PME_* defines)
void PicoSetMallocFunc (void *(*func)(size_t))
 sets the ptr to the malloc function
void PicoSetFreeFunc (void(*func)(void *))
 sets the ptr to the free function
void PicoSetLoadFileFunc (void(*func)(char *, unsigned char **, int *))
 sets the ptr to the file load function
void PicoSetFreeFileFunc (void(*func)(void *))
 sets the ptr to the free function
void PicoSetPrintFunc (void(*func)(int, const char *))
 sets the ptr to the print function
const picoModule_t ** PicoModuleList (int *numModules)
picoModel_tPicoLoadModel (char *name, int frameNum)
 the meat and potatoes function
picoModel_tPicoModuleLoadModelStream (const picoModule_t *module, const char *fileName, void *inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum)
picoModel_tPicoNewModel (void)
 creates a new pico model
void PicoFreeModel (picoModel_t *model)
 frees a model and all associated data
int PicoAdjustModel (picoModel_t *model, int numShaders, int numSurfaces)
 adjusts a models's memory allocations to handle the requested sizes. will always grow, never shrink
picoShader_tPicoNewShader (picoModel_t *model)
 creates a new pico shader and returns its index. -sea
void PicoFreeShader (picoShader_t *shader)
 frees a shader and all associated data -sea
picoShader_tPicoFindShader (picoModel_t *model, char *name, int caseSensitive)
 finds a named shader in a model
picoSurface_tPicoNewSurface (picoModel_t *model)
 creates a new pico surface
void PicoFreeSurface (picoSurface_t *surface)
 frees a surface and all associated data
picoSurface_tPicoFindSurface (picoModel_t *model, char *name, int caseSensitive)
 Finds first matching named surface in a model.
int PicoAdjustSurface (picoSurface_t *surface, int numVertexes, int numSTArrays, int numColorArrays, int numIndexes, int numFaceNormals)
 adjusts a surface's memory allocations to handle the requested sizes. will always grow, never shrink
void PicoSetModelName (picoModel_t *model, const char *name)
void PicoSetModelFileName (picoModel_t *model, const char *fileName)
void PicoSetModelFrameNum (picoModel_t *model, int frameNum)
void PicoSetModelNumFrames (picoModel_t *model, int numFrames)
void PicoSetModelData (picoModel_t *model, void *data)
void PicoSetShaderName (picoShader_t *shader, const char *name)
void PicoSetShaderMapName (picoShader_t *shader, char *mapName)
void PicoSetShaderAmbientColor (picoShader_t *shader, picoColor_t color)
void PicoSetShaderDiffuseColor (picoShader_t *shader, picoColor_t color)
void PicoSetShaderSpecularColor (picoShader_t *shader, picoColor_t color)
void PicoSetShaderTransparency (picoShader_t *shader, float value)
void PicoSetShaderShininess (picoShader_t *shader, float value)
void PicoSetSurfaceData (picoSurface_t *surface, void *data)
void PicoSetSurfaceType (picoSurface_t *surface, picoSurfaceType_t type)
void PicoSetSurfaceName (picoSurface_t *surface, char *name)
void PicoSetSurfaceShader (picoSurface_t *surface, picoShader_t *shader)
void PicoSetSurfaceXYZ (picoSurface_t *surface, int num, picoVec3_t xyz)
void PicoSetSurfaceNormal (picoSurface_t *surface, int num, picoVec3_t normal)
void PicoSetSurfaceST (picoSurface_t *surface, int array, int num, picoVec2_t st)
void PicoSetSurfaceColor (picoSurface_t *surface, int array, int num, const picoColor_t color)
void PicoSetSurfaceIndex (picoSurface_t *surface, int num, picoIndex_t index)
void PicoSetSurfaceIndexes (picoSurface_t *surface, int num, picoIndex_t *index, int count)
void PicoSetFaceNormal (picoSurface_t *surface, int num, picoVec3_t normal)
void PicoSetSurfaceSpecial (picoSurface_t *surface, int num, int special)
void PicoSetSurfaceSmoothingGroup (picoSurface_t *surface, int num, picoIndex_t smoothingGroup)
char * PicoGetModelName (picoModel_t *model)
char * PicoGetModelFileName (picoModel_t *model)
int PicoGetModelFrameNum (picoModel_t *model)
int PicoGetModelNumFrames (picoModel_t *model)
void * PicoGetModelData (picoModel_t *model)
int PicoGetModelNumShaders (picoModel_t *model)
picoShader_tPicoGetModelShader (picoModel_t *model, int num)
int PicoGetModelNumSurfaces (picoModel_t *model)
picoSurface_tPicoGetModelSurface (picoModel_t *model, int num)
int PicoGetModelTotalVertexes (picoModel_t *model)
int PicoGetModelTotalIndexes (picoModel_t *model)
char * PicoGetShaderName (picoShader_t *shader)
char * PicoGetShaderMapName (picoShader_t *shader)
picoByte_tPicoGetShaderAmbientColor (picoShader_t *shader)
picoByte_tPicoGetShaderDiffuseColor (picoShader_t *shader)
picoByte_tPicoGetShaderSpecularColor (picoShader_t *shader)
float PicoGetShaderTransparency (picoShader_t *shader)
float PicoGetShaderShininess (picoShader_t *shader)
void * PicoGetSurfaceData (picoSurface_t *surface)
char * PicoGetSurfaceName (picoSurface_t *surface)
picoSurfaceType_t PicoGetSurfaceType (picoSurface_t *surface)
picoShader_tPicoGetSurfaceShader (picoSurface_t *surface)
int PicoGetSurfaceNumVertexes (picoSurface_t *surface)
picoVec_tPicoGetSurfaceXYZ (picoSurface_t *surface, int num)
picoVec_tPicoGetSurfaceNormal (picoSurface_t *surface, int num)
picoVec_tPicoGetSurfaceST (picoSurface_t *surface, int array, int num)
picoByte_tPicoGetSurfaceColor (picoSurface_t *surface, int array, int num)
int PicoGetSurfaceNumIndexes (picoSurface_t *surface)
picoIndex_t PicoGetSurfaceIndex (picoSurface_t *surface, int num)
picoIndex_tPicoGetSurfaceIndexes (picoSurface_t *surface, int num)
picoVec_tPicoGetFaceNormal (picoSurface_t *surface, int num)
int PicoGetSurfaceSpecial (picoSurface_t *surface, int num)
unsigned int PicoVertexCoordGenerateHash (picoVec3_t xyz)
picoVertexCombinationHash_t ** PicoNewVertexCombinationHashTable (void)
void PicoFreeVertexCombinationHashTable (picoVertexCombinationHash_t **hashTable)
picoVertexCombinationHash_tPicoFindVertexCombinationInHashTable (picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color)
picoVertexCombinationHash_tPicoAddVertexCombinationToHashTable (picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color, picoIndex_t index)
int PicoFindSurfaceVertexNum (picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, picoColor_t *color, picoIndex_t smoothingGroup)
 finds a vertex matching the set parameters
void PicoFixSurfaceNormals (picoSurface_t *surface)
void PicoAddTriangleToModel (picoModel_t *model, picoVec3_t **xyz, picoVec3_t **normals, int numSTs, picoVec2_t **st, int numColors, picoColor_t **colors, picoShader_t *shader, picoIndex_t *smoothingGroup)
 A nice way to add individual triangles to the model. Chooses an appropriate surface based on the shader, or adds a new surface if necessary.

Define Documentation

#define PICO_GROW_ARRAYS   8

Definition at line 54 of file picomodel.h.

Referenced by PicoAdjustSurface().

#define PICO_GROW_FACES   256

Definition at line 55 of file picomodel.h.

Referenced by PicoAdjustSurface().

#define PICO_GROW_INDEXES   1024

Definition at line 53 of file picomodel.h.

Referenced by PicoAdjustSurface().

#define PICO_GROW_SHADERS   16

Definition at line 50 of file picomodel.h.

Referenced by PicoAdjustModel().

#define PICO_GROW_SURFACES   16

Definition at line 51 of file picomodel.h.

Referenced by PicoAdjustModel().

#define PICO_GROW_VERTEXES   1024

Definition at line 52 of file picomodel.h.

Referenced by PicoAdjustSurface().

#define PICO_MAX_DEFAULT_EXTS   4

Definition at line 57 of file picomodel.h.

#define PICO_MAX_SPECIAL   8

Definition at line 56 of file picomodel.h.

Referenced by PicoGetSurfaceSpecial(), and PicoSetSurfaceSpecial().

#define PICOMODEL_VERSION   "0.8.20"

Definition at line 47 of file picomodel.h.

#define PM_PARAMS_CANLOAD   const char *fileName, void *buffer, int bufSize

Definition at line 161 of file picomodel.h.

#define PM_PARAMS_CANSAVE   void

Definition at line 167 of file picomodel.h.

#define PM_PARAMS_LOAD   const char *fileName, int frameNum, void *buffer, int bufSize

Definition at line 164 of file picomodel.h.

#define PM_PARAMS_SAVE   const char *fileName, picoModel_t *model

Definition at line 170 of file picomodel.h.


Typedef Documentation

typedef unsigned char picoByte_t

Definition at line 60 of file picomodel.h.

typedef picoByte_t picoColor_t[4]

Definition at line 65 of file picomodel.h.

typedef int picoIndex_t

Definition at line 66 of file picomodel.h.

typedef size_t(* PicoInputStreamReadFunc)(void *inputStream, unsigned char *buffer, size_t length)

Definition at line 204 of file picomodel.h.

typedef struct picoModel_s picoModel_t

Definition at line 80 of file picomodel.h.

typedef struct picoModule_s picoModule_t

Definition at line 81 of file picomodel.h.

typedef struct picoShader_s picoShader_t

Definition at line 79 of file picomodel.h.

typedef struct picoSurface_s picoSurface_t

Definition at line 78 of file picomodel.h.

typedef float picoVec2_t[2]

Definition at line 62 of file picomodel.h.

typedef float picoVec3_t[3]

Definition at line 63 of file picomodel.h.

typedef float picoVec4_t[4]

Definition at line 64 of file picomodel.h.

typedef float picoVec_t

Definition at line 61 of file picomodel.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
PICO_PMV_OK 

file valid

PICO_PMV_ERROR 

file not valid

PICO_PMV_ERROR_IDENT 

unknown file magic (aka ident)

PICO_PMV_ERROR_VERSION 

unsupported file version

PICO_PMV_ERROR_SIZE 

file size error

PICO_PMV_ERROR_MEMORY 

out of memory error

Definition at line 149 of file picomodel.h.

Enumerator:
PICO_NORMAL 
PICO_VERBOSE 
PICO_WARNING 
PICO_ERROR 
PICO_FATAL 

Definition at line 73 of file picomodel.h.

Enumerator:
PICO_BAD 
PICO_TRIANGLES 
PICO_PATCH 

Definition at line 68 of file picomodel.h.


Function Documentation

void PicoAddTriangleToModel ( picoModel_t model,
picoVec3_t **  xyz,
picoVec3_t **  normals,
int  numSTs,
picoVec2_t **  st,
int  numColors,
picoColor_t **  colors,
picoShader_t shader,
picoIndex_t smoothingGroup 
)
picoVertexCombinationHash_t* PicoAddVertexCombinationToHashTable ( picoVertexCombinationHash_t **  hashTable,
picoVec3_t  xyz,
picoVec3_t  normal,
picoVec3_t  st,
picoColor_t  color,
picoIndex_t  index 
)
int PicoAdjustModel ( picoModel_t model,
int  numShaders,
int  numSurfaces 
)

adjusts a models's memory allocations to handle the requested sizes. will always grow, never shrink

Definition at line 285 of file picomodel.c.

References _pico_realloc(), picoModel_s::maxShaders, picoModel_s::maxSurfaces, picoModel_s::numShaders, picoModel_s::numSurfaces, PICO_GROW_SHADERS, PICO_GROW_SURFACES, picoModel_s::shader, and picoModel_s::surface.

Referenced by PicoNewShader(), and PicoNewSurface().

int PicoAdjustSurface ( picoSurface_t surface,
int  numVertexes,
int  numSTArrays,
int  numColorArrays,
int  numIndexes,
int  numFaceNormals 
)
int PicoError ( void   ) 

returns last picomodel error code (see PME_* defines)

Definition at line 62 of file picomodel.c.

picoShader_t* PicoFindShader ( picoModel_t model,
char *  name,
int  caseSensitive 
)

finds a named shader in a model

Definition at line 387 of file picomodel.c.

References _pico_stricmp, i, picoShader_s::name, picoModel_s::numShaders, and picoModel_s::shader.

picoSurface_t* PicoFindSurface ( picoModel_t model,
char *  name,
int  caseSensitive 
)

Finds first matching named surface in a model.

Definition at line 587 of file picomodel.c.

References _pico_stricmp, i, picoSurface_s::name, picoModel_s::numSurfaces, and picoModel_s::surface.

int PicoFindSurfaceVertexNum ( picoSurface_t surface,
picoVec3_t  xyz,
picoVec3_t  normal,
int  numSTs,
picoVec2_t st,
int  numColors,
picoColor_t color,
picoIndex_t  smoothingGroup 
)

finds a vertex matching the set parameters

Todo:
needs non-naive algorithm

Definition at line 1262 of file picomodel.c.

References picoSurface_s::color, i, picoSurface_s::normal, picoSurface_s::numVertexes, picoSurface_s::smoothingGroup, picoSurface_s::st, and picoSurface_s::xyz.

Referenced by PicoAddTriangleToModel().

picoVertexCombinationHash_t* PicoFindVertexCombinationInHashTable ( picoVertexCombinationHash_t **  hashTable,
picoVec3_t  xyz,
picoVec3_t  normal,
picoVec3_t  st,
picoColor_t  color 
)
void PicoFixSurfaceNormals ( picoSurface_t surface  ) 
void PicoFreeModel ( picoModel_t model  ) 
void PicoFreeShader ( picoShader_t shader  ) 

frees a shader and all associated data -sea

Definition at line 368 of file picomodel.c.

References _pico_free(), picoShader_s::mapName, and picoShader_s::name.

Referenced by PicoFreeModel().

void PicoFreeSurface ( picoSurface_t surface  ) 
void PicoFreeVertexCombinationHashTable ( picoVertexCombinationHash_t **  hashTable  ) 
picoVec_t* PicoGetFaceNormal ( picoSurface_t surface,
int  num 
)

Definition at line 1099 of file picomodel.c.

References picoSurface_s::faceNormal, and picoSurface_s::numFaceNormals.

void* PicoGetModelData ( picoModel_t model  ) 

Definition at line 879 of file picomodel.c.

References picoModel_s::data.

char* PicoGetModelFileName ( picoModel_t model  ) 

Definition at line 856 of file picomodel.c.

References picoModel_s::fileName.

int PicoGetModelFrameNum ( picoModel_t model  ) 

Definition at line 865 of file picomodel.c.

References picoModel_s::frameNum.

char* PicoGetModelName ( picoModel_t model  ) 

Definition at line 847 of file picomodel.c.

References picoModel_s::name.

int PicoGetModelNumFrames ( picoModel_t model  ) 

Definition at line 872 of file picomodel.c.

References picoModel_s::numFrames.

int PicoGetModelNumShaders ( picoModel_t model  ) 

Definition at line 886 of file picomodel.c.

References picoModel_s::numShaders.

int PicoGetModelNumSurfaces ( picoModel_t model  ) 

Definition at line 907 of file picomodel.c.

References picoModel_s::numSurfaces.

picoShader_t* PicoGetModelShader ( picoModel_t model,
int  num 
)

Definition at line 893 of file picomodel.c.

References picoModel_s::numShaders, and picoModel_s::shader.

Referenced by _md2_load().

picoSurface_t* PicoGetModelSurface ( picoModel_t model,
int  num 
)

Definition at line 914 of file picomodel.c.

References picoModel_s::numSurfaces, and picoModel_s::surface.

int PicoGetModelTotalIndexes ( picoModel_t model  ) 
int PicoGetModelTotalVertexes ( picoModel_t model  ) 
picoByte_t* PicoGetShaderAmbientColor ( picoShader_t shader  ) 

Definition at line 978 of file picomodel.c.

References picoShader_s::ambientColor.

picoByte_t* PicoGetShaderDiffuseColor ( picoShader_t shader  ) 

Definition at line 985 of file picomodel.c.

References picoShader_s::diffuseColor.

char* PicoGetShaderMapName ( picoShader_t shader  ) 

Definition at line 969 of file picomodel.c.

References picoShader_s::mapName.

char* PicoGetShaderName ( picoShader_t shader  ) 

Definition at line 960 of file picomodel.c.

References picoShader_s::name.

float PicoGetShaderShininess ( picoShader_t shader  ) 

Definition at line 1006 of file picomodel.c.

References picoShader_s::shininess.

picoByte_t* PicoGetShaderSpecularColor ( picoShader_t shader  ) 

Definition at line 992 of file picomodel.c.

References picoShader_s::specularColor.

float PicoGetShaderTransparency ( picoShader_t shader  ) 

Definition at line 999 of file picomodel.c.

References picoShader_s::transparency.

picoByte_t* PicoGetSurfaceColor ( picoSurface_t surface,
int  array,
int  num 
)
void* PicoGetSurfaceData ( picoSurface_t surface  ) 

Definition at line 1013 of file picomodel.c.

References picoSurface_s::data.

picoIndex_t PicoGetSurfaceIndex ( picoSurface_t surface,
int  num 
)

Definition at line 1085 of file picomodel.c.

References picoSurface_s::index, and picoSurface_s::numIndexes.

picoIndex_t* PicoGetSurfaceIndexes ( picoSurface_t surface,
int  num 
)

Definition at line 1092 of file picomodel.c.

References picoSurface_s::index, and picoSurface_s::numIndexes.

char* PicoGetSurfaceName ( picoSurface_t surface  ) 

Definition at line 1027 of file picomodel.c.

References picoSurface_s::name.

picoVec_t* PicoGetSurfaceNormal ( picoSurface_t surface,
int  num 
)

Definition at line 1057 of file picomodel.c.

References picoSurface_s::normal, and picoSurface_s::numVertexes.

int PicoGetSurfaceNumIndexes ( picoSurface_t surface  ) 

Definition at line 1078 of file picomodel.c.

References picoSurface_s::numIndexes.

Referenced by PicoAddTriangleToModel(), and PicoGetModelTotalIndexes().

int PicoGetSurfaceNumVertexes ( picoSurface_t surface  ) 

Definition at line 1043 of file picomodel.c.

References picoSurface_s::numVertexes.

Referenced by PicoAddTriangleToModel(), and PicoGetModelTotalVertexes().

picoShader_t* PicoGetSurfaceShader ( picoSurface_t surface  ) 

Definition at line 1036 of file picomodel.c.

References picoSurface_s::shader.

int PicoGetSurfaceSpecial ( picoSurface_t surface,
int  num 
)

Definition at line 1106 of file picomodel.c.

References PICO_MAX_SPECIAL, and picoSurface_s::special.

picoVec_t* PicoGetSurfaceST ( picoSurface_t surface,
int  array,
int  num 
)
picoSurfaceType_t PicoGetSurfaceType ( picoSurface_t surface  ) 

Definition at line 1020 of file picomodel.c.

References PICO_BAD, and picoSurface_s::type.

picoVec_t* PicoGetSurfaceXYZ ( picoSurface_t surface,
int  num 
)

Definition at line 1050 of file picomodel.c.

References picoSurface_s::numVertexes, and picoSurface_s::xyz.

int PicoInit ( void   ) 

Definition at line 46 of file picomodel.c.

picoModel_t* PicoLoadModel ( char *  name,
int  frameNum 
)
const picoModule_t** PicoModuleList ( int *  numModules  ) 
Returns:
a pointer to the module list and optionally stores the number of supported modules in 'numModules'. Note that this param can be NULL when the count is not needed.

Definition at line 64 of file picomodules.c.

Referenced by PicoLoadModel().

picoModel_t* PicoModuleLoadModelStream ( const picoModule_t module,
const char *  fileName,
void *  inputStream,
PicoInputStreamReadFunc  inputStreamRead,
size_t  streamLength,
int  frameNum 
)
picoModel_t* PicoNewModel ( void   ) 

creates a new pico model

Definition at line 227 of file picomodel.c.

References _pico_alloc(), _pico_zero_bounds(), picoModel_s::maxs, picoModel_s::mins, and picoModel_s::numFrames.

Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_load().

picoShader_t* PicoNewShader ( picoModel_t model  ) 
picoSurface_t* PicoNewSurface ( picoModel_t model  ) 
picoVertexCombinationHash_t** PicoNewVertexCombinationHashTable ( void   ) 

Definition at line 1150 of file picomodel.c.

References _pico_alloc(), and HASHTABLE_SIZE.

void PicoSetFaceNormal ( picoSurface_t surface,
int  num,
picoVec3_t  normal 
)

Definition at line 822 of file picomodel.c.

References _pico_copy_vec(), picoSurface_s::faceNormal, and PicoAdjustSurface().

void PicoSetFreeFileFunc ( void(*)(void *)  func  ) 

sets the ptr to the free function

Definition at line 97 of file picomodel.c.

References _pico_ptr_free_file.

void PicoSetFreeFunc ( void(*)(void *)  func  ) 

sets the ptr to the free function

Definition at line 79 of file picomodel.c.

References _pico_ptr_free.

void PicoSetLoadFileFunc ( void(*)(char *, unsigned char **, int *)  func  ) 

sets the ptr to the file load function

Definition at line 88 of file picomodel.c.

References _pico_ptr_load_file.

void PicoSetMallocFunc ( void *(*)(size_t)  func  ) 

sets the ptr to the malloc function

Definition at line 70 of file picomodel.c.

References _pico_ptr_malloc.

void PicoSetModelData ( picoModel_t model,
void *  data 
)

Definition at line 648 of file picomodel.c.

References picoModel_s::data.

void PicoSetModelFileName ( picoModel_t model,
const char *  fileName 
)

Definition at line 624 of file picomodel.c.

References _pico_clone_alloc(), _pico_free(), and picoModel_s::fileName.

Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_load().

void PicoSetModelFrameNum ( picoModel_t model,
int  frameNum 
)

Definition at line 634 of file picomodel.c.

References picoModel_s::frameNum.

Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_load().

void PicoSetModelName ( picoModel_t model,
const char *  name 
)

Definition at line 614 of file picomodel.c.

References _pico_clone_alloc(), _pico_free(), and picoModel_s::name.

Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_load().

void PicoSetModelNumFrames ( picoModel_t model,
int  numFrames 
)

Definition at line 641 of file picomodel.c.

References picoModel_s::numFrames.

Referenced by _md2_load(), and _md3_load().

void PicoSetPrintFunc ( void(*)(int, const char *)  func  ) 

sets the ptr to the print function

Definition at line 106 of file picomodel.c.

References _pico_ptr_print.

void PicoSetShaderAmbientColor ( picoShader_t shader,
picoColor_t  color 
)

Definition at line 675 of file picomodel.c.

References picoShader_s::ambientColor.

Referenced by _ase_load().

void PicoSetShaderDiffuseColor ( picoShader_t shader,
picoColor_t  color 
)

Definition at line 685 of file picomodel.c.

References picoShader_s::diffuseColor.

Referenced by _ase_load().

void PicoSetShaderMapName ( picoShader_t shader,
char *  mapName 
)

Definition at line 665 of file picomodel.c.

References _pico_clone_alloc(), _pico_free(), and picoShader_s::mapName.

Referenced by _ase_load().

void PicoSetShaderName ( picoShader_t shader,
const char *  name 
)

Definition at line 655 of file picomodel.c.

References _pico_clone_alloc(), _pico_free(), and picoShader_s::name.

Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_default_shader().

void PicoSetShaderShininess ( picoShader_t shader,
float  value 
)

Definition at line 718 of file picomodel.c.

References picoShader_s::shininess.

Referenced by _ase_load().

void PicoSetShaderSpecularColor ( picoShader_t shader,
picoColor_t  color 
)

Definition at line 695 of file picomodel.c.

References picoShader_s::specularColor.

Referenced by _ase_load().

void PicoSetShaderTransparency ( picoShader_t shader,
float  value 
)

Definition at line 705 of file picomodel.c.

References picoShader_s::transparency.

Referenced by _ase_load().

void PicoSetSurfaceColor ( picoSurface_t surface,
int  array,
int  num,
const picoColor_t  color 
)

Definition at line 792 of file picomodel.c.

References picoSurface_s::color, and PicoAdjustSurface().

Referenced by _md2_load(), _md3_load(), and PicoAddTriangleToModel().

void PicoSetSurfaceData ( picoSurface_t surface,
void *  data 
)

Definition at line 731 of file picomodel.c.

References picoSurface_s::data.

void PicoSetSurfaceIndex ( picoSurface_t surface,
int  num,
picoIndex_t  index 
)

Definition at line 804 of file picomodel.c.

References picoSurface_s::index, and PicoAdjustSurface().

Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().

void PicoSetSurfaceIndexes ( picoSurface_t surface,
int  num,
picoIndex_t index,
int  count 
)

Definition at line 813 of file picomodel.c.

References picoSurface_s::index, and PicoAdjustSurface().

void PicoSetSurfaceName ( picoSurface_t surface,
char *  name 
)
void PicoSetSurfaceNormal ( picoSurface_t surface,
int  num,
picoVec3_t  normal 
)
void PicoSetSurfaceShader ( picoSurface_t surface,
picoShader_t shader 
)

Definition at line 755 of file picomodel.c.

References picoSurface_s::shader.

Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().

void PicoSetSurfaceSmoothingGroup ( picoSurface_t surface,
int  num,
picoIndex_t  smoothingGroup 
)

Definition at line 831 of file picomodel.c.

References PicoAdjustSurface(), and picoSurface_s::smoothingGroup.

Referenced by PicoAddTriangleToModel().

void PicoSetSurfaceSpecial ( picoSurface_t surface,
int  num,
int  special 
)

Definition at line 840 of file picomodel.c.

References PICO_MAX_SPECIAL, and picoSurface_s::special.

void PicoSetSurfaceST ( picoSurface_t surface,
int  array,
int  num,
picoVec2_t  st 
)

Definition at line 782 of file picomodel.c.

References PicoAdjustSurface(), and picoSurface_s::st.

Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().

void PicoSetSurfaceType ( picoSurface_t surface,
picoSurfaceType_t  type 
)

Definition at line 738 of file picomodel.c.

References picoSurface_s::type.

Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().

void PicoSetSurfaceXYZ ( picoSurface_t surface,
int  num,
picoVec3_t  xyz 
)
void PicoShutdown ( void   ) 

shuts the pico model library down

Definition at line 55 of file picomodel.c.

unsigned int PicoVertexCoordGenerateHash ( picoVec3_t  xyz  ) 

Generated by  doxygen 1.6.2