Re: [JAVA3D] Getting Vertices just onetime..

2005-02-24 Thread Gilson Laurent
Moin > 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 t

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-24 Thread Rolf Gabler-Mieck
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

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-24 Thread Mike Goldwater
> 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 r

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-24 Thread Rolf Gabler-Mieck
Hi, Best thanks for your answers and solutions! Now I got the vertices to be able to sort them in a Grid-Like structure I decided the using of a TreeSet and implement a Comparator, which will not work in that way. may anybody of you know how to make point3f comparable? I got a hint from another

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-24 Thread Mike Goldwater
Yes, of course, However it does give you an array of Object[] rather than Point3f[] which can be annoying. Regards Mike -Original Message- On Behalf Of Christophe LOREK to produce your array, you could use the toArray method of the HashSet (inherited from AbstractCollection) Set set=ne

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-23 Thread Christophe LOREK
to produce your array, you could use the toArray method of the HashSet (inherited from AbstractCollection) Set set=new HashSet(); for(i=0; i To: Sent: Wednesday, February 23, 2005 9:56 PM Subject: Re: [JAVA3D] Getting Vertices just onetime.. > > But what I need is an array with every

Re: [JAVA3D] Getting Vertices just onetime..

2005-02-23 Thread Mike Goldwater
> But what I need is an array with every single vertex. > is there an easy way, ... > get all values between "hight[" and "]"? Yes. Add each point to a HashSet. The set will only hold one copy of each point. Then iterate through the set putting the points into a new array. Set set=new HashSet();