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=new HashSet(); for(i=0; i<dgnpoints.lenth; i++) set.add(dgmpoints[i]); Point3f[] array2= (Point3f[]) set.toArray(); ----- Original Message ----- From: "Mike Goldwater" <[EMAIL PROTECTED]> > > 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(); > for(i=0; i<dgnpoints.lenth; i++) set.add(dgmpoints[i]); > Point3f[] array2=new Point3f[set.size()]; > int ii=0; > for(Iterator it=set.iterator; it.hasNext(); ii++ ){ > array2[ii]=(Point3f)set.next(); > } > > Sorry I don't do Java 5 yet. > > Regards > > Mike > > ___________________________________ > Mike Goldwater > > -----Original Message----- > From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] > On Behalf Of Rolf Gabler-Mieck > Sent: 23 February 2005 14:41 > To: JAVA3D-INTEREST@JAVA.SUN.COM > Subject: [JAVA3D] Getting Vertices just onetime.. > > But what I need is an array with every single vertex. > is there an easy way, or wouldn't it easier to get > the VRML-ElevationGrid per ASCII-reading a second time > and get all values between "hight[" and "]"? > > best regards and thanks for any hint > Rolf > > -- > 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". =========================================================================== 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".