#include <stddef.h>
Go to the source code of this file.
#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 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.
typedef struct picoVertexCombinationData_s picoVertexCombinationData_t |
typedef struct picoVertexCombinationHash_s picoVertexCombinationHash_t |
anonymous enum |
Definition at line 149 of file picomodel.h.
enum picoPrintLevel_t |
Definition at line 73 of file picomodel.h.
enum picoSurfaceType_t |
Definition at line 68 of file picomodel.h.
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.
Definition at line 1598 of file picomodel.c.
References _pico_printf(), i, picoShader_s::name, picoModel_s::numSurfaces, PICO_ERROR, PICO_TRIANGLES, PicoFindSurfaceVertexNum(), PicoGetSurfaceNumIndexes(), PicoGetSurfaceNumVertexes(), PicoNewSurface(), PicoSetSurfaceColor(), PicoSetSurfaceIndex(), PicoSetSurfaceName(), PicoSetSurfaceNormal(), PicoSetSurfaceShader(), PicoSetSurfaceSmoothingGroup(), PicoSetSurfaceST(), PicoSetSurfaceType(), PicoSetSurfaceXYZ(), picoSurface_s::shader, and picoModel_s::surface.
Referenced by _ase_submit_triangles().
picoVertexCombinationHash_t* PicoAddVertexCombinationToHashTable | ( | picoVertexCombinationHash_t ** | hashTable, | |
picoVec3_t | xyz, | |||
picoVec3_t | normal, | |||
picoVec3_t | st, | |||
picoColor_t | color, | |||
picoIndex_t | index | |||
) |
Definition at line 1229 of file picomodel.c.
References _pico_alloc(), _pico_copy_color(), _pico_copy_vec(), _pico_copy_vec2(), picoVertexCombinationData_s::color, picoVertexCombinationHash_s::data, hash(), picoVertexCombinationHash_s::index, picoVertexCombinationHash_s::next, picoVertexCombinationData_s::normal, PicoVertexCoordGenerateHash(), picoVertexCombinationData_s::st, picoVertexCombinationHash_s::vcd, and picoVertexCombinationData_s::xyz.
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 | |||
) |
adjusts a surface's memory allocations to handle the requested sizes. will always grow, never shrink
Definition at line 485 of file picomodel.c.
References _pico_alloc(), _pico_realloc(), picoSurface_s::color, picoSurface_s::faceNormal, i, picoSurface_s::index, picoSurface_s::maxColorArrays, picoSurface_s::maxFaceNormals, picoSurface_s::maxIndexes, picoSurface_s::maxSTArrays, picoSurface_s::maxVertexes, picoSurface_s::normal, picoSurface_s::numColorArrays, picoSurface_s::numFaceNormals, picoSurface_s::numIndexes, picoSurface_s::numSTArrays, picoSurface_s::numVertexes, PICO_GROW_ARRAYS, PICO_GROW_FACES, PICO_GROW_INDEXES, PICO_GROW_VERTEXES, picoSurface_s::smoothingGroup, picoSurface_s::st, and picoSurface_s::xyz.
Referenced by PicoSetFaceNormal(), PicoSetSurfaceColor(), PicoSetSurfaceIndex(), PicoSetSurfaceIndexes(), PicoSetSurfaceNormal(), PicoSetSurfaceSmoothingGroup(), PicoSetSurfaceST(), and PicoSetSurfaceXYZ().
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
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 | |||
) |
Definition at line 1187 of file picomodel.c.
References picoVertexCombinationData_s::color, hash(), HASH_NORMAL_EPSILON, HASH_ST_EPSILON, HASH_XYZ_EPSILON, picoVertexCombinationHash_s::next, picoVertexCombinationData_s::normal, PicoVertexCoordGenerateHash(), picoVertexCombinationData_s::st, picoVertexCombinationHash_s::vcd, and picoVertexCombinationData_s::xyz.
void PicoFixSurfaceNormals | ( | picoSurface_t * | surface | ) |
Definition at line 1577 of file picomodel.c.
References _pico_calloc(), _pico_free(), _pico_normals_assign_generated_normals(), _pico_normals_normalize(), _pico_normals_zero(), _pico_triangles_generate_weighted_normals(), _pico_vertices_combine_shared_normals(), picoSurface_s::index, picoSurface_s::normal, picoSurface_s::numIndexes, picoSurface_s::numVertexes, picoSurface_s::smoothingGroup, and picoSurface_s::xyz.
void PicoFreeModel | ( | picoModel_t * | model | ) |
frees a model and all associated data
Definition at line 252 of file picomodel.c.
References _pico_free(), picoModel_s::fileName, i, picoModel_s::name, picoModel_s::numShaders, picoModel_s::numSurfaces, PicoFreeShader(), PicoFreeSurface(), picoModel_s::shader, and picoModel_s::surface.
Referenced by _ase_load(), _md2_load(), and _md3_load().
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 | ) |
frees a surface and all associated data
Definition at line 451 of file picomodel.c.
References _pico_free(), picoSurface_s::color, picoSurface_s::faceNormal, i, picoSurface_s::index, picoSurface_s::name, picoSurface_s::normal, picoSurface_s::numColorArrays, picoSurface_s::numSTArrays, picoSurface_s::smoothingGroup, picoSurface_s::st, and picoSurface_s::xyz.
Referenced by PicoFreeModel().
void PicoFreeVertexCombinationHashTable | ( | picoVertexCombinationHash_t ** | hashTable | ) |
Definition at line 1159 of file picomodel.c.
References _pico_free(), picoVertexCombinationHash_s::data, HASHTABLE_SIZE, i, and picoVertexCombinationHash_s::next.
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 | ) |
Definition at line 944 of file picomodel.c.
References count, i, picoModel_s::numSurfaces, PicoGetSurfaceNumIndexes(), and picoModel_s::surface.
int PicoGetModelTotalVertexes | ( | picoModel_t * | model | ) |
Definition at line 928 of file picomodel.c.
References count, i, picoModel_s::numSurfaces, PicoGetSurfaceNumVertexes(), and picoModel_s::surface.
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 | |||
) |
Definition at line 1071 of file picomodel.c.
References picoSurface_s::color, picoSurface_s::numColorArrays, and picoSurface_s::numVertexes.
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 | |||
) |
Definition at line 1064 of file picomodel.c.
References picoSurface_s::numSTArrays, picoSurface_s::numVertexes, and picoSurface_s::st.
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 | |||
) |
the meat and potatoes function
Definition at line 136 of file picomodel.c.
References _pico_free_file(), _pico_load_file(), _pico_printf(), picoModule_s::canload, picoModule_s::load, PICO_ERROR, PicoModuleList(), and PicoModuleLoadModel().
const picoModule_t** PicoModuleList | ( | int * | numModules | ) |
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 | |||
) |
Definition at line 191 of file picomodel.c.
References _pico_alloc(), _pico_free(), _pico_printf(), int(), PICO_ERROR, and PicoModuleLoadModel().
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 | ) |
creates a new pico shader and returns its index. -sea
Definition at line 329 of file picomodel.c.
References _pico_alloc(), _pico_free(), _pico_set_color(), picoShader_s::ambientColor, picoShader_s::diffuseColor, picoShader_s::model, picoModel_s::numShaders, PicoAdjustModel(), picoModel_s::shader, shader, picoShader_s::shininess, picoShader_s::specularColor, and picoShader_s::transparency.
Referenced by _ase_load(), _md2_load(), _md3_load(), and _obj_default_shader().
picoSurface_t* PicoNewSurface | ( | picoModel_t * | model | ) |
creates a new pico surface
Definition at line 416 of file picomodel.c.
References _pico_alloc(), _pico_free(), picoSurface_s::model, picoModel_s::numSurfaces, PicoAdjustModel(), PicoSetSurfaceName(), and picoModel_s::surface.
Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().
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 | |||
) |
Definition at line 745 of file picomodel.c.
References _pico_clone_alloc(), _pico_free(), and picoSurface_s::name.
Referenced by _md2_load(), _md3_load(), _obj_load(), PicoAddTriangleToModel(), and PicoNewSurface().
void PicoSetSurfaceNormal | ( | picoSurface_t * | surface, | |
int | num, | |||
picoVec3_t | normal | |||
) |
Definition at line 773 of file picomodel.c.
References _pico_copy_vec(), picoSurface_s::normal, and PicoAdjustSurface().
Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().
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 | |||
) |
Definition at line 762 of file picomodel.c.
References _pico_copy_vec(), _pico_expand_bounds(), picoModel_s::maxs, picoModel_s::mins, picoSurface_s::model, PicoAdjustSurface(), and picoSurface_s::xyz.
Referenced by _md2_load(), _md3_load(), _obj_load(), and PicoAddTriangleToModel().
void PicoShutdown | ( | void | ) |
shuts the pico model library down
Definition at line 55 of file picomodel.c.
unsigned int PicoVertexCoordGenerateHash | ( | picoVec3_t | xyz | ) |
Definition at line 1127 of file picomodel.c.
References _pico_scale_vec(), hash(), HASH_XYZ_EPSILONSPACE_MULTIPLIER, and HASHTABLE_SIZE.
Referenced by PicoAddVertexCombinationToHashTable(), and PicoFindVertexCombinationInHashTable().