[JAVA3D] Using swing inside a Java3D scene

2004-04-26 Thread Bénigot Yves
I want to have a Swing user interface, painted on a face of a Java 3D Cube.   There are tutorials and samples which describe using Java 3D *inside* Swing, but I didn't find anything on using Swing *inside* Java3D.   However it seems that both technologies use the underlying awt at the low level,

Re: [JAVA3D] Using swing inside a Java3D scene

2004-04-26 Thread Florin Herinean
I'll be very interested to see such a thing. Theoretically it's possible.   How I imagine it:   a) create the swing panel b) create an offscreen image c) paint the swing panel on the offscreen image d) set the offscreen image as a texture of the java3d cube.   The offscreen image need no

Re: [JAVA3D] Using swing inside a Java3D scene

2004-04-26 Thread Pasi Paasiala
This reminded me of the Project Looking Glass:   http://wwws.sun.com/software/looking_glass/   Pasi -Original Message-From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]On Behalf Of Bénigot YvesSent: 26. huhtikuuta 2004 13:27To: [EMAIL PROTECTED]Subject: [JAVA3D]

Re: [JAVA3D] lookAt method

2004-04-26 Thread Florin Herinean
There's nothing wrong with the lookAt method. The problem relies entirely on your code. Your Arrow, for example, shouldn't take positions as constructor arguments. It should be always created as center=(0, 0, 0), pointer=(0, -length/2, 0). That corresponds to the initial orientation of the 3d canva

Re: [JAVA3D] How to make a translation follow the mouse.

2004-04-26 Thread Skygoth
No, I have a completely different problem. Your problem can be solved by inverting the transform. I want to translate and have the object maintain its relationship to the mouse. That is, if I click on an object, then translate t othe right, I want the object to stay under the mouse. Not just "m

Re: [JAVA3D] Segmentation fault

2004-04-26 Thread Skygoth
If my udnerstanding is correct, Java 3D uses native calls (directx, etc) so if you compiled under win32 using libraries written for windows 3d graphics, you will very distinctly have ap roblem on an SGI/unix box. You will need to bring the code over and compile it on the SGI/unix box with the prop

Re: [JAVA3D] How to make a translation follow the mouse.

2004-04-26 Thread Florin Herinean
write your own pick-move-behavior. the default one doesn't have any constraints attached to it, so it only can make a guess on where to translate the object. if you subclass it or write one from scratch, you can define your own constraints, for example a gliding plane, or a gliding line, and you ca

Re: [JAVA3D] How to make a translation follow the mouse.

2004-04-26 Thread Skygoth
I have already written my own pick-move-behavior. Here's how it works (are there standards for this? if so, I'd love to know so my interface follows standards) If you left-click on the object and move it around, it moves in a parallel plane to your screen (the VScreen? I don't know my terminol

Re: [JAVA3D] How to make a translation follow the mouse.

2004-04-26 Thread Skygoth
SORRY ABOUT SENDING THIS TWICE -- the last one was not complete. I accidentally clicked 'send' (not sure how) in Yahoo Mail. -- the message: -- I have already written my own pick-move-behavior. Here's how it works (are there standards for this? if so, I'd love to know so my interface follows st

Re: [JAVA3D] Segmentation fault

2004-04-26 Thread Naomi Greenberg
Does that apply even if I am using the OpenGL driver and not DirectX? - Original Message - From: "Skygoth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 26, 2004 7:35 AM Subject: Re: [JAVA3D] Segmentation fault > If my udnerstanding is correct, Java 3D uses native > ca

Re: [JAVA3D] Segmentation fault

2004-04-26 Thread Florin Herinean
If you have an java3d installation for the SGI box, your application should run regardless of where it was developed. However, care should be taken so that the SGI version of java3d should be greater or equal to the java3d version of where it was developed. Also, make sure that you meet all the SGI

Re: [JAVA3D] Using swing inside a Java3D scene

2004-04-26 Thread Lars van Gemerden
How about painting a canvas3D on the side of a cube. Through the looking glass ... Great idea, gives me all kinds of visions, but I guess it would be a miracle of OO design if the original designers didn't use it as a design goal. Can't rule it out though.   Thanks,   Lars  -Original

[JAVA3D] How to move a camera in the virtual universe using keyboard?

2004-04-26 Thread Andy
Hi, I am currently trying to have a camera, looking at a cube from the top view, then when I press up/down/left/right, camera will move along the x-z plane, since I am using virtual universe, I cannot use viewingplatform, and I don't like behavior class so I would like to use normal keylistener att

Re: [JAVA3D] How to move a camera in the virtual universe using keyboard?

2004-04-26 Thread Nikolai V. Chr.
Andy wrote: The second question I wanna ask is that how do I use lookAt()? You must call invert() like this: ct3d.lookAt(new Point3d(0, 0, 5f), new Point3d(0, 0, 0), new Vector3d(0, -1, 0)); tg.invert(); tg.setTransform(ct3d); Btw. Are you sure -Y is upwards in your universe? Seem to be an unusual

Re: [JAVA3D] How to move a camera in the virtual universe using keyboard?

2004-04-26 Thread Florin Herinean
i think there is a typo bellow, it should be ct3d.invert() instead of tg.invert() Cheers, Florin -Original Message- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of Nikolai V. Chr. Sent: Montag, 26. April 2004 16:48 To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] How

Re: [JAVA3D] Using swing inside a Java3D scene

2004-04-26 Thread Alessandro Borges
Hi >I want to have a Swing user interface, painted on > a face of a Java 3D If what you need is a 2D GUI interface inside a 3D enviroment, you can plan some pickable 3D objects (simple quads) with proper texture rendering and a behavior when clicked. But porting Swing to run inside a 3D inviromen

Re: [JAVA3D] Segmentation fault

2004-04-26 Thread Kyle McDonald - Eagle CAD
Naomi Greenberg wrote: Does that apply even if I am using the OpenGL driver and not DirectX? Yes the same java program should be able to run with both versions of the Java3D library without recompiling. More below - Original Message - r From: "Skygoth" <[EMAIL PROTECTED]> To: <[EMAIL P

Re: [JAVA3D] How to move a camera in the virtual universe using keyboard?

2004-04-26 Thread Nikolai V. Chr.
Florin Herinean wrote: i think there is a typo bellow, it should be ct3d.invert() instead of tg.invert() You are are right. Nice of you to call it a typo. :) -- Nikolai V. Christensen, Computer Engineer, Simulation and Training department IFAD, Forskerp

Re: [JAVA3D] lookAt method

2004-04-26 Thread Horst Sueggel
Thank you very much for the answer. But i have still the following problem: I have 2 Points given and i have to draw an arrow between point1 to point2. So i have tried to solve my problem with the lookAt method. But it seems that i haven't implemented my arrow in a right way. My sample code: pr

[JAVA3D] Java 3D FAQ Weekly Posting (26 Apr 2004)

2004-04-26 Thread The Java 3D FAQ
The Java 3D Frequently Asked Questions list for Monday April 26 2004 This is a posting of topics covered in the Java 3D FAQ. The answers to these questions are kept at: http://www.j3d.org/faq Please consult this list and the web site before asking questions on the mailing list. If ther

[JAVA3D] Moving Camera

2004-04-26 Thread Andy
Hi, thank you for replying. I tried t3d.invert() with the lookAt() function but it still doesn't work. If I move the cube to (0, 0, -5), it shows me the cube, but I tried to move the TranformGroup between the BG and ViewPlatform by using lookAt(new Point3d(0, 0, 0), new Point3d(0, -5, 0), new Vec

Re: [JAVA3D] Moving Camera

2004-04-26 Thread Brian McCormick
Maybe you should use this instead: lookAt(new Point3d(0, 0, 0), new Point3d(0, 0, -5), new Vector3f(0, 1, 0)); Hope this helps. -Original Message- From: Andy [mailto:[EMAIL PROTECTED] Sent: Monday, April 26, 2004 3:44 PM To: [EMAIL PROTECTED] Subject: [JAVA3D] Moving Camera Hi, thank y

Re: [JAVA3D] Moving Camera

2004-04-26 Thread Andy
I made stupid mistakes, now it works, thanks to all of you. Another question is that how do I get the normal by cross product or dot product if I am looking from the sky to the ground, for example: eye) \ \ \ target Thanks in advance Andy Brian McCormick wro

[JAVA3D] Keylisteners

2004-04-26 Thread Bassam
Are the listeners of Java 1.4 (like mouselistener and keylisener) valid in J3d?   Because they don't seem to have any effect in my program? What is the alternatives?   Bassam   === To unsubscribe, send email to [EMAIL PROT

Re: [JAVA3D] Client Server J3D

2004-04-26 Thread Dirk L. van Krimpen
Silvère, Well, I am interested in your copy indeed. So, if you find the time (I'm not in a hurry right now) please, drop it directly to my own e-mail address. Thanks in advance, Dirk -Original Message- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] On Behalf Of Silvère M

Re: [JAVA3D] Client Server J3D

2004-04-26 Thread Dirk L. van Krimpen
Andre, Thanks for your detailed answer. Think I'm going to try RMI. Suppose, the best I can do now is to develop a small testprogram and try it out on the prospect's server. Dirk -Original Message- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] On Behalf Of Andre Bialoja