pm_ase.c File Reference

#include "picointernal.h"
Include dependency graph for pm_ase.c:

Go to the source code of this file.

Data Structures

struct  aseSubMaterial_s
struct  aseMaterial_s
struct  aseVertex_s
struct  aseTexCoord_s
struct  aseColor_s
struct  aseFace_s

Defines

#define PM_ASE_C
#define _ase_error_return(m)

Typedefs

typedef struct aseSubMaterial_s aseSubMaterial_t
typedef struct aseMaterial_s aseMaterial_t
typedef struct aseVertex_s aseVertex_t
typedef struct aseTexCoord_s aseTexCoord_t
typedef struct aseColor_s aseColor_t
typedef struct aseFace_s aseFace_t
typedef aseFace_taseFacesIter_t

Functions

static aseMaterial_t_ase_get_material (aseMaterial_t *list, int mtlIdParent)
static aseSubMaterial_t_ase_get_submaterial (aseMaterial_t *list, int mtlIdParent, int subMtlId)
static aseSubMaterial_t_ase_get_submaterial_or_default (aseMaterial_t *materials, int mtlIdParent, int subMtlId)
static aseMaterial_t_ase_add_material (aseMaterial_t **list, int mtlIdParent)
static aseSubMaterial_t_ase_add_submaterial (aseMaterial_t **list, int mtlIdParent, int subMtlId, picoShader_t *shader)
static void _ase_free_materials (aseMaterial_t **list)
static int _ase_canload (PM_PARAMS_CANLOAD)
 validates a 3dsmax ase model file.
static void _ase_submit_triangles (picoModel_t *model, aseMaterial_t *materials, aseVertex_t *vertices, aseTexCoord_t *texcoords, aseColor_t *colors, aseFace_t *faces, int numFaces)
 use the surface and the current face list to look up material/submaterial IDs and submit them to the model for proper processing
static void shadername_convert (char *shaderName)
static picoModel_t_ase_load (PM_PARAMS_LOAD)
 loads a 3dsmax ase model file.

Variables

static picoColor_t white = { 255, 255, 255, 255 }
const picoModule_t picoModuleASE

Define Documentation

#define _ase_error_return ( m   ) 
Value:
{ \
        _pico_printf(PICO_ERROR, "%s in ASE, line %d.",m,p->curLine); \
        _pico_free_parser(p); \
        PicoFreeModel(model); \
        return NULL; \
    }

Referenced by _ase_load().

#define PM_ASE_C

Definition at line 36 of file pm_ase.c.


Typedef Documentation

typedef struct aseColor_s aseColor_t
typedef struct aseFace_s aseFace_t

Definition at line 255 of file pm_ase.c.

typedef struct aseMaterial_s aseMaterial_t
typedef struct aseTexCoord_s aseTexCoord_t
typedef struct aseVertex_s aseVertex_t

Function Documentation

static aseMaterial_t* _ase_add_material ( aseMaterial_t **  list,
int  mtlIdParent 
) [static]

Definition at line 123 of file pm_ase.c.

References _pico_calloc().

Referenced by _ase_add_submaterial().

static aseSubMaterial_t* _ase_add_submaterial ( aseMaterial_t **  list,
int  mtlIdParent,
int  subMtlId,
picoShader_t shader 
) [static]
static int _ase_canload ( PM_PARAMS_CANLOAD   )  [static]
static void _ase_free_materials ( aseMaterial_t **  list  )  [static]

Definition at line 152 of file pm_ase.c.

References _pico_free(), and aseSubMaterial_s::next.

Referenced by _ase_load().

static aseMaterial_t* _ase_get_material ( aseMaterial_t list,
int  mtlIdParent 
) [static]

Definition at line 73 of file pm_ase.c.

Referenced by _ase_add_submaterial(), and _ase_get_submaterial().

static aseSubMaterial_t* _ase_get_submaterial ( aseMaterial_t list,
int  mtlIdParent,
int  subMtlId 
) [static]
static aseSubMaterial_t* _ase_get_submaterial_or_default ( aseMaterial_t materials,
int  mtlIdParent,
int  subMtlId 
) [static]

Definition at line 106 of file pm_ase.c.

References _ase_get_submaterial(), _pico_printf(), and PICO_ERROR.

Referenced by _ase_submit_triangles().

static picoModel_t* _ase_load ( PM_PARAMS_LOAD   )  [static]
static void _ase_submit_triangles ( picoModel_t model,
aseMaterial_t materials,
aseVertex_t vertices,
aseTexCoord_t texcoords,
aseColor_t colors,
aseFace_t faces,
int  numFaces 
) [static]

use the surface and the current face list to look up material/submaterial IDs and submit them to the model for proper processing

Note:
The following still holds from ydnar's _ase_make_surface: indexes 0 1 2 = vert indexes indexes 3 4 5 = st indexes indexes 6 7 8 = color indexes (new)

Definition at line 265 of file pm_ase.c.

References _ase_get_submaterial_or_default(), aseColor_s::color, i, PicoAddTriangleToModel(), aseSubMaterial_s::shader, st, aseTexCoord_s::texcoord, and white.

Referenced by _ase_load().

static void shadername_convert ( char *  shaderName  )  [static]

Definition at line 304 of file pm_ase.c.

Referenced by _ase_load().


Variable Documentation

Initial value:
 { "1.0", 
"Autodesk 3DSMAX ASCII", 
"Jared Hefty, seaw0lf", 
"2003 Jared Hefty, 2002 seaw0lf", 
{ "ase", NULL, NULL, NULL 
}, _ase_canload, 
_ase_load, 
NULL, 
NULL 
}

Definition at line 938 of file pm_ase.c.

picoColor_t white = { 255, 255, 255, 255 } [static]

Definition at line 50 of file pm_ase.c.

Referenced by _ase_submit_triangles(), and MAP_DrawMapMarkers().


Generated by  doxygen 1.6.2