Skip to main content

Re: Re: [JAVA3D-INTEREST] Can I get an IndexedGeometryArray from aShape3D?

1 reply [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matthew Hilliard

>I'm happy you could bear my poor English and understand what I means.
>Now my jre version is 1.4.2_03,and I will not plan to move it to 1.5.

No worries :)
You can view my code snippet as a HOWTO (I Initially planned on writing it
as Pascal, but that seemed silly on a Java forum).

>I know the Vector and the ArrayList is much slower than the Array(see
>"Peter Haggar. Practical Java" )So I'm afraid that the efficiency is
>heavily decreased when the vrml file is large.

This was true in Jan 2000 when Practical Java was written, but for arrays
accessed via Lists, the 1.4 (and 1.5) JIT compilers will reduce the access
times between the datatypes to virtually nothing--i.e. its no longer true
in November 2004 so feel free to use indexed Lists with little to no
performance hit.
Again, here you can use the code here as a HOWTO and populate arrays if you
prefer, or call the toArray() method of the list at the end, after you've
filled it. I'm just illustrating it is not too hard create indexed
geometry information.
In all, I'd defer to Alessandro's technique, (I learned something new
there, myself) as its almost always easier and cleaner to use an existing
library (assuming it is working properly) rather than writing a new one.
Should that still not work out, I'm sure we can backport that snippet to
1.4 for you.

To unsubscribe, e-mail:
For additional commands, e-mail: