Alex,

Interesting problem. Can you send me some code to take a look at it? Perhaps one of 
the Node derivered classes in J3D has a synchronized version of hashCode()...? 

To achieve what you are trying to do I would store the what-to-do-method in the "user 
data" for the node - that way, given a node you do not have to do any hash table 
lookups, but can jump straight to the method. setUserData(...) etc.

Sincerely,

Daniel Selman

[EMAIL PROTECTED]
http://www.tornadolabs.com 


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ballegooij
> van AR
> Sent: Thursday, June 10, 1999 6:44 AM
> To: [EMAIL PROTECTED]
> Subject: [java3d] Hashing Java3D Node(s)...
> 
> 
> Hi,
> 
> I've made a behavior that uses a hashtable of nodes indexing
> objects describing what to do when the node is clicked.
> 
> What does work is that i 'pick' a node when the user clicks his
> mouse button and then retreive my 'what to do' object from the hashtable
> using hastable.get(node);
> 
> Now i need to ennumerate the hastable, 
> i've tried:
>       Enumeration e     = hash.keys();
>       while(e.hasMoreElements());
>       {
>               Node   n = (Node)e.nextElement();
>                        ...
>       }
> and
>       Set s      = hash.keySet();
>       Iterator i = s.iterator();
>       while(i.hasNext());
>       {
>               Node   n = (Node)i.next();
>               ...
>       }
> Both approaches work perfectly operating on other hastables in my program,
> but in this case the methods hasModeElements/hasNext both seem to 
> block for ever (eg. the java3d thread(s) stop, the main program
> keeps on running, but everything related to j3d stops...)...
> 
> Has anybody had this problem ?
> 
> Thanks in advance,
> Alex...
> 
> 
> 
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/
> 
> 


=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to