gCAD3D 2.40
obj_ut.c File Reference

read OBJ file (WaveFront) More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_txTab.h"
#include "../xa/xa_mem.h"

Macros

#define GL_TRIANGLE_FAN   0x0006
 
#define impSpc_INC   250000
 
#define vTab_INC   10000
 

Functions

static UtxTab_NEW (colNam)
 
 typedef_MemTab (ColRGB)
 
static MemTab (ColRGB)
 
int obj_read__ (char *fnam)
 
int obj_readTess__ (char *fnam)
 
int obj_r_v__ (char *cbuf)
 
int obj_r_f__ (char *cbuf, int ioffP)
 
int obj_r_usemtl__ (char *cbuf)
 
int obj_r_mtllib (char *cbuf)
 
int obj_r_vert (char *cbuf)
 
int obj_r_face (long *ia, char *cbuf)
 
int obj_r_f_r (long *ia, char *cbuf)
 

Variables

char AP_mod_dir [128]
 
ColRGB AP_defcol
 die DefaultColor des aktiven (sub)Model More...
 
static int vNr
 
static ObjGX ooxp
 
static ObjGX ooxs
 
static Point opt
 
static int colNr
 
static int colInd
 
static ColRGB colAct
 
static MemspcimpSpc
 

Detailed Description

read OBJ file (WaveFront)

=====================================================
List_functions_start:
gCad_main read WaveFront-OBj-File (for mockup)
obj_readTess__ read WaveFront-OBj-File (for mockup)
obj_read__ read WaveFront-OBj-File (for model)
obj_r_v__ read vertex (for mockup)
obj_r_f__ read face (for model)
obj_r_vert read vertex, change orientation
obj_r_face read face (for mockup)
obj_r_f_r read 3 od 4 indices (for face)
obj_r_mtllib read .mtl-file; build material-table.
obj_r_usemtl__ activate color (material) for following faces
List_functions_end:
=====================================================

Macro Definition Documentation

#define GL_TRIANGLE_FAN   0x0006
#define impSpc_INC   250000
#define vTab_INC   10000

Function Documentation

static UtxTab_NEW ( colNam  )
static
typedef_MemTab ( ColRGB  )
static MemTab ( ColRGB  )
static
int obj_read__ ( char *  fnam)
int obj_readTess__ ( char *  fnam)
int obj_r_v__ ( char *  cbuf)
int obj_r_f__ ( char *  cbuf,
int  ioffP 
)
int obj_r_usemtl__ ( char *  cbuf)

activate color (material) for following faces ..

int obj_r_mtllib ( char *  cbuf)

obj_r_mtllib read .tl-file; build material-table.

int obj_r_vert ( char *  cbuf)
int obj_r_face ( long *  ia,
char *  cbuf 
)
int obj_r_f_r ( long *  ia,
char *  cbuf 
)
* read 3 od 4 indices
* see also obj_r_f__ (for model)
* retCode: -1 less than 3 vertices;
* 0 3 vertices
* 1 4 vertices
*

Variable Documentation

char AP_mod_dir[128]
ColRGB AP_defcol

die DefaultColor des aktiven (sub)Model

int vNr
static
ObjGX ooxp
static
ObjGX ooxs
static
Point opt
static
int colNr
static
int colInd
static
ColRGB colAct
static
Memspc* impSpc
static