Back to index

radiance  4R0+20100331
Defines | Typedefs | Functions | Variables
obj2rad.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include "rtmath.h"
#include "rtio.h"
#include "resolu.h"
#include "trans.h"
#include "tmesh.h"

Go to the source code of this file.

Defines

#define PATNAME   "M-pat" /* mesh pattern name (reused) */
#define TEXNAME   "M-nor" /* mesh texture name (reused) */
#define DEFOBJ   "unnamed" /* default object name */
#define DEFMAT   "white" /* default material name */
#define pvect(v)   printf("%18.12g %18.12g %18.12g\n",(v)[0],(v)[1],(v)[2])
#define CHUNKSIZ   1024 /* vertex allocation chunk size */
#define MAXARG   512 /* maximum # arguments in a statement */
#define Q_MTL   0
#define Q_MAP   1
#define Q_GRP   2
#define Q_OBJ   3
#define Q_FAC   4
#define NQUALS   5

Typedefs

typedef int VNDX [3]

Functions

static void getnames (FILE *fp)
static void convert (FILE *fp)
static int getstmt (char *av[MAXARG], FILE *fp)
static char * getmtl (void)
static char * getonm (void)
static int matchrule (RULEHD *rp)
static int cvtndx (VNDX vi, char *vs)
static int nonplanar (int ac, char **av)
static int putface (int ac, char **av)
static int puttri (char *v1, char *v2, char *v3)
static void freeverts (void)
static int newv (double x, double y, double z)
static int newvn (double x, double y, double z)
static int newvt (double x, double y)
static void syntax (char *er)
int main (int argc, char *argv[])
int getstmt (register char *av[MAXARG], FILE *fp)
int matchrule (register RULEHD *rp)
int cvtndx (register VNDX vi, register char *vs)
int nonplanar (register int ac, register char **av)
int putface (int ac, register char **av)

Variables

static const char RCSid [] = "$Id: obj2rad.c,v 2.25 2008/11/10 19:08:18 greg Exp $"
FVECTvlist
int nvs
FVECTvnlist
int nvns
RREAL(* vtlist )[2]
int nvts
int ndegen = 0
char * qname [NQUALS]
QLIST qlist = {NQUALS, qname}
IDLIST qual [NQUALS]
RULEHDourmapping = NULL
char * defmat = DEFMAT
char * defobj = DEFOBJ
int flatten = 0
char mapname [128]
char matname [64]
char group [16][32]
char objname [128]
char * inpfile
int lineno
int faceno

Define Documentation

#define CHUNKSIZ   1024 /* vertex allocation chunk size */

Definition at line 42 of file obj2rad.c.

#define DEFMAT   "white" /* default material name */

Definition at line 27 of file obj2rad.c.

#define DEFOBJ   "unnamed" /* default object name */

Definition at line 26 of file obj2rad.c.

#define MAXARG   512 /* maximum # arguments in a statement */

Definition at line 44 of file obj2rad.c.

#define NQUALS   5

Definition at line 52 of file obj2rad.c.

#define PATNAME   "M-pat" /* mesh pattern name (reused) */

Definition at line 24 of file obj2rad.c.

#define pvect (   v)    printf("%18.12g %18.12g %18.12g\n",(v)[0],(v)[1],(v)[2])

Definition at line 29 of file obj2rad.c.

#define Q_FAC   4

Definition at line 51 of file obj2rad.c.

#define Q_GRP   2

Definition at line 49 of file obj2rad.c.

#define Q_MAP   1

Definition at line 48 of file obj2rad.c.

#define Q_MTL   0

Definition at line 47 of file obj2rad.c.

#define Q_OBJ   3

Definition at line 50 of file obj2rad.c.

#define TEXNAME   "M-nor" /* mesh texture name (reused) */

Definition at line 25 of file obj2rad.c.


Typedef Documentation

typedef int VNDX[3]

Definition at line 40 of file obj2rad.c.


Function Documentation

void convert ( FILE *  fp) [static]

Definition at line 207 of file obj2rad.c.

{
       char   *argv[MAXARG];
       int    argc;
       int    nstats, nunknown;
       register int  i;

       nstats = nunknown = 0;
                                   /* scan until EOF */
       while ( (argc = getstmt(argv, fp)) ) {
              switch (argv[0][0]) {
              case 'v':            /* vertex */
                     switch (argv[0][1]) {
                     case '\0':                  /* point */
                            if (badarg(argc-1,argv+1,"fff"))
                                   syntax("Bad vertex");
                            newv(atof(argv[1]), atof(argv[2]),
                                          atof(argv[3]));
                            break;
                     case 'n':                   /* normal */
                            if (argv[0][2])
                                   goto unknown;
                            if (badarg(argc-1,argv+1,"fff"))
                                   syntax("Bad normal");
                            if (!newvn(atof(argv[1]), atof(argv[2]),
                                          atof(argv[3])))
                                   syntax("Zero normal");
                            break;
                     case 't':                   /* texture map */
                            if (argv[0][2])
                                   goto unknown;
                            if (badarg(argc-1,argv+1,"ff"))
                                   goto unknown;
                            newvt(atof(argv[1]), atof(argv[2]));
                            break;
                     default:
                            goto unknown;
                     }
                     break;
              case 'f':                          /* face */
                     if (argv[0][1])
                            goto unknown;
                     faceno++;
                     switch (argc-1) {
                     case 0: case 1: case 2:
                            syntax("Too few vertices");
                            break;
                     case 3:
                            if (!puttri(argv[1], argv[2], argv[3]))
                                   syntax("Bad triangle");
                            break;
                     default:
                            if (!putface(argc-1, argv+1))
                                   syntax("Bad face");
                            break;
                     }
                     break;
              case 'u':
                     if (!strcmp(argv[0], "usemtl")) {  /* material */
                            if (argc < 2)
                                   break;        /* not fatal */
                            strcpy(matname, argv[1]);
                     } else if (!strcmp(argv[0], "usemap")) {/* map */
                            if (argc < 2)
                                   break;        /* not fatal */
                            if (!strcmp(argv[1], "off"))
                                   mapname[0] = '\0';
                            else
                                   sprintf(mapname, "%s.hdr", argv[1]);
                     } else
                            goto unknown;
                     break;
              case 'o':            /* object name */
                     if (argv[0][1])
                            goto unknown;
                     if (argc < 2)
                            break;        /* not fatal */
                     strcpy(objname, argv[1]);
                     break;
              case 'g':            /* group name(s) */
                     if (argv[0][1])
                            goto unknown;
                     for (i = 1; i < argc; i++)
                            strcpy(group[i-1], argv[i]);
                     group[i-1][0] = '\0';
                     break;
              case '#':            /* comment */
                     printargs(argc, argv, stdout);
                     break;
              default:;            /* something we don't deal with */
              unknown:
                     nunknown++;
                     break;
              }
              nstats++;
       }
       printf("\n# Done processing file: %s\n", inpfile);
       printf("# %d lines, %d statements, %d unrecognized\n",
                     lineno, nstats, nunknown);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int cvtndx ( VNDX  vi,
char *  vs 
) [static]

Here is the caller graph for this function:

int cvtndx ( register VNDX  vi,
register char *  vs 
)

Definition at line 457 of file obj2rad.c.

{
                                   /* get point */
       vi[0] = atoi(vs);
       if (vi[0] > 0) {
              if (vi[0]-- > nvs)
                     return(0);
       } else if (vi[0] < 0) {
              vi[0] += nvs;
              if (vi[0] < 0)
                     return(0);
       } else
              return(0);
                                   /* get map */
       while (*vs)
              if (*vs++ == '/')
                     break;
       vi[1] = atoi(vs);
       if (vi[1] > 0) {
              if (vi[1]-- > nvts)
                     return(0);
       } else if (vi[1] < 0) {
              vi[1] += nvts;
              if (vi[1] < 0)
                     return(0);
       } else
              vi[1] = -1;
                                   /* get normal */
       while (*vs)
              if (*vs++ == '/')
                     break;
       vi[2] = atoi(vs);
       if (vi[2] > 0) {
              if (vi[2]-- > nvns)
                     return(0);
       } else if (vi[2] < 0) {
              vi[2] += nvns;
              if (vi[2] < 0)
                     return(0);
       } else
              vi[2] = -1;
       return(1);
}
void freeverts ( void  ) [static]

Definition at line 689 of file obj2rad.c.

{
       if (nvs) {
              free((void *)vlist);
              nvs = 0;
       }
       if (nvts) {
              free((void *)vtlist);
              nvts = 0;
       }
       if (nvns) {
              free((void *)vnlist);
              nvns = 0;
       }
}
char * getmtl ( void  ) [static]

Definition at line 352 of file obj2rad.c.

{
       register RULEHD      *rp = ourmapping;

       if (rp == NULL) {           /* no rule set */
              if (matname[0])
                     return(matname);
              if (group[0][0])
                     return(group[0]);
              return(defmat);
       }
                                   /* check for match */
       do {
              if (matchrule(rp)) {
                     if (!strcmp(rp->mnam, VOIDID))
                            return(NULL); /* match is null */
                     return(rp->mnam);
              }
              rp = rp->next;
       } while (rp != NULL);
                                   /* no match found */
       return(NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void getnames ( FILE *  fp) [static]

Definition at line 156 of file obj2rad.c.

{
       char   *argv[MAXARG];
       int    argc;
       ID     tmpid;
       register int  i;

       while ( (argc = getstmt(argv, fp)) )
              switch (argv[0][0]) {
              case 'f':                          /* face */
                     if (!argv[0][1])
                            faceno++;
                     break;
              case 'u':
                     if (!strcmp(argv[0], "usemtl")) {  /* material */
                            if (argc < 2)
                                   break;        /* not fatal */
                            tmpid.number = 0;
                            tmpid.name = argv[1];
                            findid(&qual[Q_MTL], &tmpid, 1);
                     } else if (!strcmp(argv[0], "usemap")) {/* map */
                            if (argc < 2 || !strcmp(argv[1], "off"))
                                   break;        /* not fatal */
                            tmpid.number = 0;
                            tmpid.name = argv[1];
                            findid(&qual[Q_MAP], &tmpid, 1);
                     }
                     break;
              case 'o':            /* object name */
                     if (argv[0][1] || argc < 2)
                            break;
                     tmpid.number = 0;
                     tmpid.name = argv[1];
                     findid(&qual[Q_OBJ], &tmpid, 1);
                     break;
              case 'g':            /* group name(s) */
                     if (argv[0][1])
                            break;
                     tmpid.number = 0;
                     for (i = 1; i < argc; i++) {
                            tmpid.name = argv[i];
                            findid(&qual[Q_GRP], &tmpid, 1);
                     }
                     break;
              }
}

Here is the call graph for this function:

Here is the caller graph for this function:

char * getonm ( void  ) [static]

Definition at line 378 of file obj2rad.c.

{
       static char   name[64];
       register char *cp1, *cp2;
       register int  i;
                                   /* check for preset */
       if (objname[0])
              return(objname);
       if (!group[0][0])
              return(defobj);
       cp1 = name;                 /* else make name out of groups */
       for (i = 0; group[i][0]; i++) {
              cp2 = group[i];
              if (cp1 > name)
                     *cp1++ = '.';
              while ( (*cp1 = *cp2++) )
                     if (++cp1 >= name+sizeof(name)-2) {
                            *cp1 = '\0';
                            return(name);
                     }
       }
       return(name);
}

Here is the caller graph for this function:

static int getstmt ( char *  av[MAXARG],
FILE *  fp 
) [static]

Here is the caller graph for this function:

int getstmt ( register char *  av[MAXARG],
FILE *  fp 
)

Definition at line 312 of file obj2rad.c.

{
       static char   sbuf[MAXARG*16];
       register char *cp;
       register int  i;

       do {
              if (fgetline(cp=sbuf, sizeof(sbuf), fp) == NULL)
                     return(0);
              i = 0;
              for ( ; ; ) {
                     while (isspace(*cp) || *cp == '\\') {
                            if (*cp == '\n')
                                   lineno++;
                            *cp++ = '\0';
                     }
                     if (!*cp)
                            break;
                     if (i >= MAXARG-1) {
                            fprintf(stderr,
                     "warning: line %d: too many arguments (limit %d)\n",
                                   lineno+1, MAXARG-1);
                            break;
                     }
                     av[i++] = cp;
                     while (*++cp && !isspace(*cp))
                            ;
              }
              av[i] = NULL;
              lineno++;
       } while (!i);

       return(i);
}

Here is the call graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 99 of file obj2rad.c.

{
       int    donames = 0;
       int    i;

       for (i = 1; i < argc && argv[i][0] == '-'; i++)
              switch (argv[i][1]) {
              case 'o':            /* object name */
                     defobj = argv[++i];
                     break;
              case 'n':            /* just produce name list */
                     donames++;
                     break;
              case 'm':            /* use custom mapfile */
                     ourmapping = getmapping(argv[++i], &qlist);
                     break;
              case 'f':            /* flatten surfaces */
                     flatten++;
                     break;
              default:
                     goto userr;
              }
       if ((i > argc) | (i < argc-1))
              goto userr;
       if (i == argc)
              inpfile = "<stdin>";
       else if (freopen(inpfile=argv[i], "r", stdin) == NULL) {
              fprintf(stderr, "%s: cannot open\n", inpfile);
              exit(1);
       }
       if (donames) {                            /* scan for ids */
              getnames(stdin);
              printf("filename \"%s\"\n", inpfile);
              printf("filetype \"Wavefront\"\n");
              write_quals(&qlist, qual, stdout);
              printf("qualifier %s begin\n", qlist.qual[Q_FAC]);
              printf("[%d:%d]\n", 1, faceno);
              printf("end\n");
       } else {                           /* translate file */
              printf("# ");
              printargs(argc, argv, stdout);
              convert(stdin);
       }
       if (ndegen)
              printf("# %d degenerate faces\n", ndegen);
       exit(0);
userr:
       fprintf(stderr, "Usage: %s [-o obj][-m mapping][-n][-f] [file.obj]\n",
                     argv[0]);
       exit(1);
}

Here is the call graph for this function:

static int matchrule ( RULEHD rp) [static]
int matchrule ( register RULEHD rp)

Definition at line 404 of file obj2rad.c.

{
       ID     tmpid;
       int    gotmatch;
       register int  i;

       if (rp->qflg & FL(Q_MTL)) {
              if (!matname[0])
                     return(0);
              tmpid.number = 0;
              tmpid.name = matname;
              if (!matchid(&tmpid, &idm(rp)[Q_MTL]))
                     return(0);
       }
       if (rp->qflg & FL(Q_MAP)) {
              if (!mapname[0])
                     return(0);
              tmpid.number = 0;
              tmpid.name = mapname;
              if (!matchid(&tmpid, &idm(rp)[Q_MAP]))
                     return(0);
       }
       if (rp->qflg & FL(Q_GRP)) {
              tmpid.number = 0;
              gotmatch = 0;
              for (i = 0; group[i][0]; i++) {
                     tmpid.name = group[i];
                     gotmatch |= matchid(&tmpid, &idm(rp)[Q_GRP]);
              }
              if (!gotmatch)
                     return(0);
       }
       if (rp->qflg & FL(Q_OBJ)) {
              if (!objname[0])
                     return(0);
              tmpid.number = 0;
              tmpid.name = objname;
              if (!matchid(&tmpid, &idm(rp)[Q_OBJ]))
                     return(0);
       }
       if (rp->qflg & FL(Q_FAC)) {
              tmpid.name = NULL;
              tmpid.number = faceno;
              if (!matchid(&tmpid, &idm(rp)[Q_FAC]))
                     return(0);
       }
       return(1);
}

Here is the call graph for this function:

int newv ( double  x,
double  y,
double  z 
) [static]

Definition at line 707 of file obj2rad.c.

{
       if (!(nvs%CHUNKSIZ)) {             /* allocate next block */
              if (nvs == 0)
                     vlist = (FVECT *)malloc(CHUNKSIZ*sizeof(FVECT));
              else
                     vlist = (FVECT *)realloc((void *)vlist,
                                   (nvs+CHUNKSIZ)*sizeof(FVECT));
              if (vlist == NULL) {
                     fprintf(stderr,
                     "Out of memory while allocating vertex %d\n", nvs);
                     exit(1);
              }
       }
                                   /* assign new vertex */
       vlist[nvs][0] = x;
       vlist[nvs][1] = y;
       vlist[nvs][2] = z;
       return(++nvs);
}

Here is the caller graph for this function:

int newvn ( double  x,
double  y,
double  z 
) [static]

Definition at line 734 of file obj2rad.c.

{
       if (!(nvns%CHUNKSIZ)) {            /* allocate next block */
              if (nvns == 0)
                     vnlist = (FVECT *)malloc(CHUNKSIZ*sizeof(FVECT));
              else
                     vnlist = (FVECT *)realloc((void *)vnlist,
                                   (nvns+CHUNKSIZ)*sizeof(FVECT));
              if (vnlist == NULL) {
                     fprintf(stderr,
                     "Out of memory while allocating normal %d\n", nvns);
                     exit(1);
              }
       }
                                   /* assign new normal */
       vnlist[nvns][0] = x;
       vnlist[nvns][1] = y;
       vnlist[nvns][2] = z;
       if (normalize(vnlist[nvns]) == 0.0)
              return(0);
       return(++nvns);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int newvt ( double  x,
double  y 
) [static]

Definition at line 763 of file obj2rad.c.

{
       if (!(nvts%CHUNKSIZ)) {            /* allocate next block */
              if (nvts == 0)
                     vtlist = (RREAL (*)[2])malloc(CHUNKSIZ*2*sizeof(RREAL));
              else
                     vtlist = (RREAL (*)[2])realloc((void *)vtlist,
                                   (nvts+CHUNKSIZ)*2*sizeof(RREAL));
              if (vtlist == NULL) {
                     fprintf(stderr,
                     "Out of memory while allocating texture vertex %d\n",
                                   nvts);
                     exit(1);
              }
       }
                                   /* assign new vertex */
       vtlist[nvts][0] = x;
       vtlist[nvts][1] = y;
       return(++nvts);
}

Here is the caller graph for this function:

static int nonplanar ( int  ac,
char **  av 
) [static]

Here is the caller graph for this function:

int nonplanar ( register int  ac,
register char **  av 
)

Definition at line 506 of file obj2rad.c.

{
       VNDX   vi;
       RREAL  *p0, *p1;
       FVECT  v1, v2, nsum, newn;
       double d;
       register int  i;

       if (!cvtndx(vi, av[0]))
              return(0);
       if (!flatten && vi[2] >= 0)
              return(1);           /* has interpolated normals */
       if (ac < 4)
              return(0);           /* it's a triangle! */
                                   /* set up */
       p0 = vlist[vi[0]];
       if (!cvtndx(vi, av[1]))
              return(0);           /* error gets caught later */
       nsum[0] = nsum[1] = nsum[2] = 0.;
       p1 = vlist[vi[0]];
       fvsum(v2, p1, p0, -1.0);
       for (i = 2; i < ac; i++) {
              VCOPY(v1, v2);
              if (!cvtndx(vi, av[i]))
                     return(0);
              p1 = vlist[vi[0]];
              fvsum(v2, p1, p0, -1.0);
              fcross(newn, v1, v2);
              if (normalize(newn) == 0.0) {
                     if (i < 3)
                            return(1);    /* can't deal with this */
                     fvsum(nsum, nsum, nsum, 1./(i-2));
                     continue;
              }
              d = fdot(newn,nsum);
              if (d >= 0) {
                     if (d < (1.0-FTINY)*(i-2))
                            return(1);
                     fvsum(nsum, nsum, newn, 1.0);
              } else {
                     if (d > -(1.0-FTINY)*(i-2))
                            return(1);
                     fvsum(nsum, nsum, newn, -1.0);
              }
       }
       return(0);
}

Here is the call graph for this function:

static int putface ( int  ac,
char **  av 
) [static]
int putface ( int  ac,
register char **  av 
)

Definition at line 559 of file obj2rad.c.

{
       VNDX   vi;
       char   *cp;
       register int  i;

       if (nonplanar(ac, av)) {    /* break into triangles */
              while (ac > 2) {
                     if (!puttri(av[0], av[1], av[2]))
                            return(0);
                     ac--;         /* remove vertex & rotate */
                     cp = av[0];
                     for (i = 0; i < ac-1; i++)
                            av[i] = av[i+2];
                     av[i] = cp;
              }
              return(1);
       }
       if ((cp = getmtl()) == NULL)
              return(0);
       printf("\n%s polygon %s.%d\n", cp, getonm(), faceno);
       printf("0\n0\n%d\n", 3*ac);
       for (i = 0; i < ac; i++) {
              if (!cvtndx(vi, av[i]))
                     return(0);
              pvect(vlist[vi[0]]);
       }
       return(1);
}

Here is the call graph for this function:

int puttri ( char *  v1,
char *  v2,
char *  v3 
) [static]

Definition at line 594 of file obj2rad.c.

{
       char   *mod;
       VNDX   v1i, v2i, v3i;
       BARYCCM       bvecs;
       RREAL  bcoor[3][3];
       int    texOK = 0, patOK;
       int    flatness;
       register int  i;

       if ((mod = getmtl()) == NULL)
              return(0);

       if (!cvtndx(v1i, v1) || !cvtndx(v2i, v2) || !cvtndx(v3i, v3))
              return(0);
                                   /* compute barycentric coordinates */
       if (v1i[2]>=0 && v2i[2]>=0 && v3i[2]>=0)
              flatness = flat_tri(vlist[v1i[0]], vlist[v2i[0]], vlist[v3i[0]],
                            vnlist[v1i[2]], vnlist[v2i[2]], vnlist[v3i[2]]);
       else
              flatness = ISFLAT;

       switch (flatness) {
       case DEGEN:                 /* zero area */
              ndegen++;
              return(-1);
       case RVFLAT:                /* reversed normals, but flat */
       case ISFLAT:                /* smoothing unnecessary */
              texOK = 0;
              break;
       case RVBENT:                /* reversed normals with smoothing */
       case ISBENT:                /* proper smoothing */
              texOK = 1;
              break;
       }
       if (flatten)
              texOK = 0;
#ifdef TEXMAPS
       patOK = mapname[0] && (v1i[1]>=0 && v2i[1]>=0 && v3i[1]>=0);
#else
       patOK = 0;
#endif
       if (texOK | patOK)
              if (comp_baryc(&bvecs, vlist[v1i[0]], vlist[v2i[0]],
                            vlist[v3i[0]]) < 0)
                     texOK = patOK = 0;
                                   /* put out texture (if any) */
       if (texOK) {
              printf("\n%s texfunc %s\n", mod, TEXNAME);
              mod = TEXNAME;
              printf("4 dx dy dz %s\n", TCALNAME);
              printf("0\n");
              for (i = 0; i < 3; i++) {
                     bcoor[i][0] = vnlist[v1i[2]][i];
                     bcoor[i][1] = vnlist[v2i[2]][i];
                     bcoor[i][2] = vnlist[v3i[2]][i];
              }
              put_baryc(&bvecs, bcoor, 3);
       }
#ifdef TEXMAPS
                                   /* put out pattern (if any) */
       if (patOK) {
              printf("\n%s colorpict %s\n", mod, PATNAME);
              mod = PATNAME;
              printf("7 noneg noneg noneg %s %s u v\n", mapname, TCALNAME);
              printf("0\n");
              for (i = 0; i < 2; i++) {
                     bcoor[i][0] = vtlist[v1i[1]][i];
                     bcoor[i][1] = vtlist[v2i[1]][i];
                     bcoor[i][2] = vtlist[v3i[1]][i];
              }
              put_baryc(&bvecs, bcoor, 2);
       }
#endif
                                   /* put out (reversed) triangle */
       printf("\n%s polygon %s.%d\n", mod, getonm(), faceno);
       printf("0\n0\n9\n");
       if (flatness == RVFLAT || flatness == RVBENT) {
              pvect(vlist[v3i[0]]);
              pvect(vlist[v2i[0]]);
              pvect(vlist[v1i[0]]);
       } else {
              pvect(vlist[v1i[0]]);
              pvect(vlist[v2i[0]]);
              pvect(vlist[v3i[0]]);
       }
       return(1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void syntax ( char *  er) [static]

Variable Documentation

char* defmat = DEFMAT

Definition at line 68 of file obj2rad.c.

char* defobj = DEFOBJ

Definition at line 69 of file obj2rad.c.

int faceno

Definition at line 79 of file obj2rad.c.

int flatten = 0

Definition at line 71 of file obj2rad.c.

char group[16][32]

Definition at line 75 of file obj2rad.c.

char* inpfile

Definition at line 77 of file obj2rad.c.

int lineno

Definition at line 78 of file obj2rad.c.

char mapname[128]

Definition at line 73 of file obj2rad.c.

char matname[64]

Definition at line 74 of file obj2rad.c.

int ndegen = 0

Definition at line 38 of file obj2rad.c.

int nvns

Definition at line 34 of file obj2rad.c.

int nvs

Definition at line 32 of file obj2rad.c.

int nvts

Definition at line 36 of file obj2rad.c.

char objname[128]

Definition at line 76 of file obj2rad.c.

RULEHD* ourmapping = NULL

Definition at line 66 of file obj2rad.c.

Definition at line 62 of file obj2rad.c.

char* qname[NQUALS]
Initial value:
 {
       "Material",
       "Map",
       "Group",
       "Object",
       "Face",
}

Definition at line 54 of file obj2rad.c.

Definition at line 64 of file obj2rad.c.

const char RCSid[] = "$Id: obj2rad.c,v 2.25 2008/11/10 19:08:18 greg Exp $" [static]

Definition at line 2 of file obj2rad.c.

Definition at line 31 of file obj2rad.c.

Definition at line 33 of file obj2rad.c.

RREAL(* vtlist)[2]

Definition at line 35 of file obj2rad.c.