Dear Andy,
I wrote:
> > Did _YOU_ invent some class of this name (ActionEvent's')? I'm sure you
> > didn't!
So, sorry, now I can see, that you really invented it ... but you might
imagine, that, without your code, one _can't_ know how it is implemented.
My apologizes for my rude attitude.
> I am too shame of my code, so I didn't send all out.
Nobody here will request code to lough at the author, really, remember,
we all once started, and in my case, I'm making errors all day and
understand not the half of what I would like to understand.
> ... I don't understand why you need the other methods like the
> constructor..but anyway may be that just matters.
The matter simply is: make our life easier, just compile, look at the
result/error, then at the code really running and try to find the
problem. Else I've better things to do. And I'm _not_ interested in
other code, just the essential lines to reproduce the problem (and this
is the same the Java3D team wants to have in bug reports: a minimal
sample showing the error). So you could have taken all things out, that
have nothing to do with your problem: no lights, no textures, just a
simple cube to see something. Besides, often, in the process of breaking
out unneccessary code, you might find the problem yourself.
> ... But the KeyNavigatorBehavior in createView() method is
> not working.
Hmm, it WORKS for me, just fine. The only things I had to do was:
- supply 2 textures
- remove the comments around the KeyNavigatorBehaviour lines:
/**
* BranchGraph for View BranchGroup
*/
private BranchGroup createView(Canvas3D c){
...
bg.addChild(tg);
tg.addChild(vp);
KeyNavigatorBehavior key = new KeyNavigatorBehavior(tg);
key.setSchedulingBounds(new BoundingSphere());
bg.addChild(key);
return bg;
}
The view moves forward/backward with cursor up/down, turns with
cursor left/right etc., just as expected.
So, what actually is your problem??? What exactly is 'not working'?
Is it, that you press cursor up/down and the view doesn't move
forward/backward?
If so, do you develop/test under Linux? I remember to have seen
some note about this problem:
- Java on Linux deliveres a KEY_RELEASED KeyEvent for every
KEY_PRESSED event, even when the key is pressed continuously,
whereas Java on Windows deliveres a sequence of KEY_PRESSED
events, as long as the key remains pressed, then just one
KEY_RELEASED event, when the key is released.
As of the current implementation of KeyNavigator this might lead
to jaggie movement, but it should move a little, I believe
(can't test under Linux currently).
You can try the IntersectTest from directory
<YOUR_JDK>/demo/java3d/PickTest, it uses KeyNavigatorBehavior and
works on my system; how does it behave on yours, same problem as
with your app?
regards
Georg
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ [EMAIL PROTECTED] +49 (40) 23 53 27 10
PS: my System:
W2K, Servicepack 2
Riva TNT graphics card, driver version 6.13.10.2311
JDK 1.4
J3D 1.3beta2
===========================================================================
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".