Mike Goldwater wrote:

may anybody of you know how to make point3f comparable?



Yes, I do know. You can't. A classical mathematical theorem says that any set which can be ordered is 1-dimensional.

If you know a lot about the coordinates you might be able sort the points
first on y then on x (perhaps after a suitable rotation) but if your set is
at all interesting this is unlikely to work. Anyway if you that much about
your coordinates you would probably doing this by another method. Sorry
about the bad news.



...hmm, bad news are not good news....
yep I learned yesterday that this math theorem works :-)
so the idea which cames from a non-j3d list was to
override point3f class
and implement there a method which sorts the new Point3f
using the individual float values...so just 1-dim objects will
be sortet "manually" (not by Arrays.sort)
something like if(x1>x2 and so far...

but after trying this... I thought about this:
getting the Point3f[] as described....
then using the information of the Grid, the gridspacing is a constant to
x & z
put all coordinates in a single float[] for x,y,z
search for the indices of the linear rising x and y values...
if they're found ... get the y-value where(xsearch==ysearch)
...should work...and eat runtime-performance..

the Arrays.binarySearch(float[] , key) needs a sorted list...
so this wouldn't be helpful, because of destroing the indexorder
of the other triple-values .. so ??? stills.....

but thats the point, when my first plan come again:
The software I develop needs at first the surface,
which is described in a VRML97 ElevationGrid,
so I need the method of getting the hight-values
just onetime to get a numerical model of the raster
in the defined order (goal is to get a greyscaled
RasterImage of the hight-values and to be able
to get each hight of a selected point)

the result of
" Set set=new HashSet();
for(i=0; i<dgnpoints.lenth; i++) set.add(dgmpoints[i]);
Point3f[] array2= (Point3f[]) set.toArray();"

seems be more needful for a "re-triangulate",
cause the order seems to be defined by
by the triangulation-order....

so it seems to be easier and also faster
to read the vrml-file as ascii a second time
and parseFloat the hightvalues....to get
the values in a ready-to-run correct ordererd
float[] or eg float[][]

but a bit strange workarround to get the "same"
information two-times...
but looks better - isn't it ?

best regards
rolf







Regards

Mike
-----Original Message-----
On Behalf Of Rolf Gabler-Mieck




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

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






--
Rolf Gabler-Mieck
c/o
LGI-Geographisches Institut der CAU-Kiel
Ludewig-Meyen Str. 14
24098 Kiel
Tel: +49 431-880.2955
FAX: +49 431-880.4658
e-mail: [EMAIL PROTECTED]

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