Developement Java3D with SpaceTraveler
Moderator: Moderators
Developement Java3D with SpaceTraveler
Hi, i am a french student from Polytech'Tours, a enginerring school.
We have a problem, we develop an interface with Java 3D and we need to use a SpaceTraveler.
I do a research on the internet, and i see that a chinese student have a same problem of me => viewtopic.php?p=634
I understand that it's necessary to use JNI for transcript you're SDK to Java.
I download your exemple "Jnisiapp" but when i launch the applet "HelloUniverse.html", i have that http://www.dotnetclub.info/images/Appli.JPG.
i don't understand what's happen.
If i want create an application with Java 3D, what will i do?
Thanks
Best Regards.
We have a problem, we develop an interface with Java 3D and we need to use a SpaceTraveler.
I do a research on the internet, and i see that a chinese student have a same problem of me => viewtopic.php?p=634
I understand that it's necessary to use JNI for transcript you're SDK to Java.
I download your exemple "Jnisiapp" but when i launch the applet "HelloUniverse.html", i have that http://www.dotnetclub.info/images/Appli.JPG.
i don't understand what's happen.
If i want create an application with Java 3D, what will i do?
Thanks
Best Regards.
Hello lololem,
I don't see any errors in the screen shot you sent, just an empy window.
Make sure the SpaceTraveler works with the demos before trying Java.
You can also try to use our new SDK. It is COM based. Unfortunately we don't have any Java examples for it.
Perhaps someone else in the community can help out.
Jim
3Dx Software Development
I don't see any errors in the screen shot you sent, just an empy window.
Make sure the SpaceTraveler works with the demos before trying Java.
You can also try to use our new SDK. It is COM based. Unfortunately we don't have any Java examples for it.
Perhaps someone else in the community can help out.
Jim
3Dx Software Development
i don't understand.
I read your topic :
In my screenshot, i launch your applet HelloUniverse and i tkink there is a cube are modelled but there is nothing.
I want to know what function of SDK, i do transcript in Java for use spaceTraveler in Java3D?
Have u got an other exemple of JniPrograms who runs?
Best Regards
I read your topic :
and you propose a little application who call an API Java 3D.Hi Dan,
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
In my screenshot, i launch your applet HelloUniverse and i tkink there is a cube are modelled but there is nothing.
I want to know what function of SDK, i do transcript in Java for use spaceTraveler in Java3D?
Have u got an other exemple of JniPrograms who runs?
Best Regards
In fact, i understand you're application HelloUniverse make a cube in java3D who can be drive by the mouse SpaceTraveler.
I try to make you're folder JniApplication and i have just that => http://www.dotnetclub.info/images/javaApplication.JPG, an applet empty.
May be i understand nothing... and if it's that your application do what?
Thanks
Best regards
I try to make you're folder JniApplication and i have just that => http://www.dotnetclub.info/images/javaApplication.JPG, an applet empty.
May be i understand nothing... and if it's that your application do what?
Thanks
Best regards
Last edited by lololem on Tue Mar 27, 2007 1:32 pm, edited 1 time in total.
Hi lololem,
Hopefully someone in the community will be able to help. It will be quite a while before I will be able to load up a Java development environment and look at this.
One thing I noticed is that you are using firefox. The JNI solution was developed with IE. I don't know if that will make a difference. But it is worth giving it a try under IE.
You have all the src code for this. If you debug down into it, how far is it getting? Old fashioned debugging...
Jim
3Dx Software Development
Hopefully someone in the community will be able to help. It will be quite a while before I will be able to load up a Java development environment and look at this.
One thing I noticed is that you are using firefox. The JNI solution was developed with IE. I don't know if that will make a difference. But it is worth giving it a try under IE.
You have all the src code for this. If you debug down into it, how far is it getting? Old fashioned debugging...
Jim
3Dx Software Development
Hi jwick
Thanks for your answer.
I test with IE and i have no result, always the white box with a red cross.
You are right, i go to understand and debugging the program,
in any way i have no choice, we have got to working the mouse with Java3D.
if you have least additional information, contact me.
Best Regards.
Thanks for your answer.
I test with IE and i have no result, always the white box with a red cross.
You are right, i go to understand and debugging the program,
in any way i have no choice, we have got to working the mouse with Java3D.
if you have least additional information, contact me.
Best Regards.
Java3D
Hi all!
Im new in this forum. I have been reading any clue about j3d and 3dConnexion mouse... But I haven't found anything.
The problem I have is that the example I have (HelloSpacemouse.java) works very good (a little bit slow I think) but when I try to add another kind of functionality (for example the MouseTranslate ability) I cant handle the color cube with the conventional mouse, I dont know I anyboudy have tried this.
What I want to do is a movement similar to Google Earth where you can use either the 3dconnexion mouse or the conconventional one.
Thanks a lot for reading the post!
Im new in this forum. I have been reading any clue about j3d and 3dConnexion mouse... But I haven't found anything.
The problem I have is that the example I have (HelloSpacemouse.java) works very good (a little bit slow I think) but when I try to add another kind of functionality (for example the MouseTranslate ability) I cant handle the color cube with the conventional mouse, I dont know I anyboudy have tried this.
What I want to do is a movement similar to Google Earth where you can use either the 3dconnexion mouse or the conconventional one.
Thanks a lot for reading the post!
You might need to handle the mouse and the SpaceTraveler in two separate threads.
Take a look at this other thread for a different approach:
Example in Java
Take a look at this other thread for a different approach:
Example in Java
I have been having a look at the example you sent jwick and it seems to be very helpful but it doesn't give any clue about my problem.
I think I have not explained it right. I think that the best way to solve my jigsaw is trying to capture SpaceTraveler events and transform them into mouse events so I can handle them with my own classes.
I mean that if I have a Y rotation performed by the SpaceTraveler I would like to transform it into a MouseEvent.MOUSE_DRAG (for example).
I dont know if I have explained it well... If so, do you have any other link where I can get information on how to do that?
Thanks again!
I think I have not explained it right. I think that the best way to solve my jigsaw is trying to capture SpaceTraveler events and transform them into mouse events so I can handle them with my own classes.
I mean that if I have a Y rotation performed by the SpaceTraveler I would like to transform it into a MouseEvent.MOUSE_DRAG (for example).
I dont know if I have explained it well... If so, do you have any other link where I can get information on how to do that?
Thanks again!
Hi chamorrus,
I don't understand what you are trying to do. If you apply the Y rotation to a mouse drag event, what are you going to do with the other 5 axes?
Do you truly have only a 2 degree of freedom problem that you are trying to apply the SpaceTraveler to?
I thought you were trying to move a 3D item with a mouse and a SpaceTraveler at the same time. Those would involve different mathematics. They should work simultaneously without any problem.
Jim
3Dx Software Development
I don't understand what you are trying to do. If you apply the Y rotation to a mouse drag event, what are you going to do with the other 5 axes?
Do you truly have only a 2 degree of freedom problem that you are trying to apply the SpaceTraveler to?
I thought you were trying to move a 3D item with a mouse and a SpaceTraveler at the same time. Those would involve different mathematics. They should work simultaneously without any problem.
Jim
3Dx Software Development
Hi Jim!
I have to say that the biggest problem is my poor english and the problems I have to explain what I want to do so... I'm gonna try it.
I have a 3D world. In this world I have captured MouseEvents so if I drag the mouse, my world will move (I mean panning), if I make a double click on any object, I will get information about that object (Mouse picking report). As well if I receive a MOUSE_WHEEL event, my world will perform a zoom in or zoom out.
I also have captured the keyboard events to simulate the rest of the navigation. I mean that if I push the left key or the right key, my world will rotate on one of the axis (for example Y axis) and if I push the up key or the down key, my world will rotate on the X axis.
Like this I have my six axis implemented with the keyborad and a conventional mouse.
What I want to do is to handle the navigation with the SpaceNavigator and I want the mouse drag to help the SpaceNavigator. I mean keep the functionality of the SpaceNavigator that lets objects rotate in one axis and use the mouse drag to travel around 'my world'.
In order to give you a visual example, is the same movement that Google Earth provides if you handle it with your SpaceNavigator plus your Mouse.
I don't know if I have explained it right. But I don't know how to do that...
I have tried solutions like catching all the events produced by the mouse events and if that events are the events I want, do the corresponding modifications to the TransformGroups. But my problem here is that I need to add the input device to get its events. I need to write the code line u.getViewer().getPhysicalEnvironment().addInputDevice( SmDev ); Ok, that's right, BUT the mouse doesn't works unless a SpaceNavigator event is received and that's what I don't want to happen...
Tell me if you understand my problem or if I have to go to another Thread of the forum because it is really important.
Thank you for your attention.
I have to say that the biggest problem is my poor english and the problems I have to explain what I want to do so... I'm gonna try it.
I have a 3D world. In this world I have captured MouseEvents so if I drag the mouse, my world will move (I mean panning), if I make a double click on any object, I will get information about that object (Mouse picking report). As well if I receive a MOUSE_WHEEL event, my world will perform a zoom in or zoom out.
I also have captured the keyboard events to simulate the rest of the navigation. I mean that if I push the left key or the right key, my world will rotate on one of the axis (for example Y axis) and if I push the up key or the down key, my world will rotate on the X axis.
Like this I have my six axis implemented with the keyborad and a conventional mouse.
What I want to do is to handle the navigation with the SpaceNavigator and I want the mouse drag to help the SpaceNavigator. I mean keep the functionality of the SpaceNavigator that lets objects rotate in one axis and use the mouse drag to travel around 'my world'.
In order to give you a visual example, is the same movement that Google Earth provides if you handle it with your SpaceNavigator plus your Mouse.
I don't know if I have explained it right. But I don't know how to do that...
I have tried solutions like catching all the events produced by the mouse events and if that events are the events I want, do the corresponding modifications to the TransformGroups. But my problem here is that I need to add the input device to get its events. I need to write the code line u.getViewer().getPhysicalEnvironment().addInputDevice( SmDev ); Ok, that's right, BUT the mouse doesn't works unless a SpaceNavigator event is received and that's what I don't want to happen...
Tell me if you understand my problem or if I have to go to another Thread of the forum because it is really important.
Thank you for your attention.