home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
POLYEDIT.LZH
/
READER
/
TEST.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-21
|
849b
|
49 lines
#include <stdio.h>
#include <stdlib.h>
#include "reader.h"
void main( argc, argv )
int argc ;
char *argv[] ;
{
int type ;
char name[64] ;
Color col, amb, dif, spc, size ;
int h ;
float x, y, z, vx, vy, vz, u, v ;
ReaderInit();
MatrixInit();
printf( "start\n" );
if ( AtrReadOpen( "dman.atr" ) == FALSE )
exit( 1 );
while( AtrReadNext() )
{
AtrReadName( name );
printf( "atrname : %s\n", name );
type = AtrReadColor( &col, &amb, &dif, &spc, &size, &h );
}
AtrReadClose();
if ( ObjReadOpen( "dman.suf" ) == FALSE )
exit( 1 );
ObjReadName( name );
while( ObjReadPoly( name, &type ) )
{
printf( "ReadPoly\n" );
while( ObjReadVertex( &x, &y, &z, &vx, &vy, &vz, &u, &v ) )
{
printf( "( %g, %g, %g )\n", x, y, z );
}
printf( "\n" );
}
ObjReadClose();
}