Skip to search.
rzr-en · http://rzr.online.fr

Group Information

  • Members: 361
  • Founded: Jan 5, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Diet3D side Tools @ http://rzr.online.fr/java.htm   Message List  
Reply Message #32 of 108 |
hi,

here some tools for Diet3D, I need a java code that does parse the XML
binary stream,
(C code is also welcome)

zip archive provide some samples (see cube-xmlbin.xml)

here is the write code :

int fprintObjectXMLBin(FILE* f, Object const * const o)
{
unsigned int i=0;
fprintf(f,"\n<object");
if ( o->name) fprintf(f," name=\"%s\"",o->name);
else fprintf(f," name=\"unknown\"");
fprintf(f," vertices=\"%d\" faces=\"%d\"", o->nv, o->nf);

fprintf(f,">\n\n");
fprintf(f,"<vertices format=\"3f\" count=\"%d\">",o->nv);
for(i=0;i<o->nv;i++) {
fwrite( &(o->vv[i].x),sizeof( o->vv[i].x ),1,f);
fwrite( &(o->vv[i].y),sizeof( o->vv[i].y ),1,f);
fwrite( &(o->vv[i].z),sizeof( o->vv[i].z ),1,f);
}
fprintf(f,"</vertices>\n");
fprintf(f,"\n<faces format=\"3i\" count=\"%d\">",o->nf);
for(i=0;i<o->nf;i++) {
fwrite( &(o->vf[i].a),sizeof( o->vf[i].a ),1,f);
fwrite( &(o->vf[i].b),sizeof( o->vf[i].b ),1,f);
fwrite( &(o->vf[i].c),sizeof( o->vf[i].c ),1,f);
}
fprintf(f,"</faces>\n");
fprintf(f,"\n</object>\n");
return 1;
}

--
C-x C-c
# Philippe.COVAL(a)IFrance.COM @ http://RzR.online.FR #
# Hire me (as a S/W Eng) @ http://rzr.online.fr/job.htm #
# im:icq,msn,aim,etc @ http://RzR.online.FR/contact.htm #

People who deny the existence of robots may be robots themselves



Sat Mar 27, 2004 3:01 am

philippe_coval
Offline Offline
Send Email Send Email

Attachment
mini3d-win32.zip
Type:
application/zip
Message #32 of 108 |
Expand Messages Author Sort by Date

hi, here some tools for Diet3D, I need a java code that does parse the XML binary stream, (C code is also welcome) zip archive provide some samples (see...
Philippe COVAL
philippe_coval Offline Send Email
Mar 27, 2004
3:06 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help