gCAD3D 2.35
lwo_r.c File Reference

read LWO file More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

Macros

#define MK_ID(a, b, c, d)
 
#define LWO_FORM   MK_ID('F','O','R','M')
 
#define LWO_LWOB   MK_ID('L','W','O','B')
 
#define LWO_PNTS   MK_ID('P','N','T','S')
 
#define LWO_SRFS   MK_ID('S','R','F','S')
 
#define LWO_SURF   MK_ID('S','U','R','F')
 
#define LWO_POLS   MK_ID('P','O','L','S')
 
#define LWO_COLR   MK_ID('C','O','L','R')
 
#define LW_MAX_POINTS   200
 
#define LW_MAX_NAME_LEN   500
 

Functions

static long read_char (FILE *f)
 
static long read_short (FILE *f)
 
static long read_long (FILE *f)
 
static float read_float (FILE *f)
 
static long read_string (FILE *f, char *s)
 
int lwo_cb_savePoint (int ip, float *pt1)
 
int lwo_cb_saveFace (int vNr, int *vTab)
 
static void read_pnts (FILE *f, long nbytes)
 
static void read_pols (FILE *f, long nbytes)
 
static void read_srfs (FILE *f, long nbytes)
 
static void read_surf (FILE *f, long nbytes)
 
int lwo_read (const char *lw_file)
 

Variables

static long vertex_cnt
 
static char txbuf [512]
 

Detailed Description

read LWO file

=====================================================
List_functions_start:
List_functions_end:
=====================================================

Macro Definition Documentation

#define MK_ID (   a,
  b,
  c,
 
)
Value:
((((unsigned long)(a))<<24)| \
(((unsigned long)(b))<<16)| \
(((unsigned long)(c))<< 8)| \
(((unsigned long)(d)) ))
#define LWO_FORM   MK_ID('F','O','R','M')
#define LWO_LWOB   MK_ID('L','W','O','B')
#define LWO_PNTS   MK_ID('P','N','T','S')
#define LWO_SRFS   MK_ID('S','R','F','S')
#define LWO_SURF   MK_ID('S','U','R','F')
#define LWO_POLS   MK_ID('P','O','L','S')
#define LWO_COLR   MK_ID('C','O','L','R')
#define LW_MAX_POINTS   200
#define LW_MAX_NAME_LEN   500

Function Documentation

static long read_char ( FILE *  f)
static
static long read_short ( FILE *  f)
static
static long read_long ( FILE *  f)
static
static float read_float ( FILE *  f)
static
static long read_string ( FILE *  f,
char *  s 
)
static
int lwo_cb_savePoint ( int  ip,
float *  pt1 
)
int lwo_cb_saveFace ( int  vNr,
int *  vTab 
)
static void read_pnts ( FILE *  f,
long  nbytes 
)
static
static void read_pols ( FILE *  f,
long  nbytes 
)
static
static void read_srfs ( FILE *  f,
long  nbytes 
)
static
static void read_surf ( FILE *  f,
long  nbytes 
)
static
int lwo_read ( const char *  lw_file)

Variable Documentation

long vertex_cnt
static
char txbuf[512]
static