I know I could post this to a general java list but the problem came up
while looking at building a loader for STL files (used for faceted
descriptions of 3D objects to be built using rapid prototyping processes).

Questions:
1) though I have started building a loader for STL files if there is one
already out there then please let me know!!
I have searched through multiple archives of loaders with no luck.
2) I can load ascii STL file but binary ones (more common) are a bit of a
problem due to byte ordering!
e.g. my file has encoded in it the number 12 (in four bytes written by a
C++/C program on a PC writting out an int)
the binary coding looks like: 0C 00 00 00
When using a DataStreamInput method readInt() gives me 201326592!
What java expects is that the number 12 would be encoded as 00 00 00 0C
instead!

Though I can read these byte by byte and reconstruct integers manually I
hate to think what I would have to do in order to read floats written by the
same C program!

Any suggestions, alternative apporaches?
John

--
-((Insert standard disclaimer here))-|- Washington Irving (1783-1859) -
John Kenneth Dickinson               |   "A sharp tongue is the only
Research Council Officer  IMTI-NRC   |    edge tool that grows keener
email: [EMAIL PROTECTED]         |    with constant use."

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to