Sachin,

>> I have to read this vertices from a file, and I am not able to
>> figure out which java.io classes and methods, should I use to read
>> these "double" values from a file into an array (arrayList maybe???).

Use java.io.DataInputStream, method readDouble(). It reads 8 raw bytes from
a file and interprets them as IEEE double value. This is probably what you
want.

If you design the file format yourself, you can also use a text-only file
format. Use a BufferedReader/FileReader combo in this case.


>> What is the best way to store these points? The total number of
>> points do not change (till I am ready to write them into a file after
some
>> calculation) and I frequently need to pull out these points sequentially.

Simply use a double[] if the number of points is fixed. There is no faster
way to store/access sequential data. You should also look at the method
        System.arraycopy(...)
and the class
        java.lang.Arrays
Both can help you when dealing with arrays. They offer methods like copy,
sort, or search arrays (or part of an array).


>> Any suggestion would be a huge help. And could someone point me
>> towards a book/resource which deals in examples with reading/storing
>> geometric data?

No idea... but reading geometry data is not really different from reading a
database of cooking recipes. You should look for general java.io information
on the net.

-- Julian

===========================================================================
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