import-bot (20211) [Avatar] Offline
#1
[Originally posted by syud]

i am a very very beginner in Java.Especially in Java3d.I bought the book
titled 3D user interface with Java3D.I also downloaded the example in the
website but I cannot run it in my PC.It something error about the loader.For
your information I used WindowsXp...it is any effect??I need your help to
teach me a little bit in this language and also how I can change the tutorial
to learn more ..hope can hear from you soon...
import-bot (20211) [Avatar] Offline
#2
Re: need help
[Originally posted by author]

All of the book examples require a VRML loader to load object geometry. Such
loaders are not part of Java 3D. Page 209 of the book mentions a site for
vrml loaders, which now will forward you to the following site....

http://j3d.org/utilities/loaders/vrml/web3d.html

Here you will find the latest and greatest VRML file format loaders, which
should work with the book examples. (I have not tried the latest versions.)
If worse comes to worse, email me directly and I will send you a jar file with
a vrml loader that is known to work with the book examples. If you can
install Java 3D and run those examples, and you can install the vrml loader,
you should be able to run the book examples, regardless of operating system.

The 3DUI book contains an introduction to Java 3D, but it is not intended as a
tutorial. You might want to get a book specifically about Java3D, such as
"Java 3D Programming" by Selman, which is also published by Manning.

Good luck
--jon


> i am a very very beginner in Java.Especially in Java3d.I bought the book
> titled 3D user interface with Java3D.I also downloaded the example in the
> website but I cannot run it in my PC.It something error about the loader.For
> your information I used WindowsXp...it is any effect??I need your help to
> teach me a little bit in this language and also how I can change the tutorial
> to learn more ..hope can hear from you soon...
import-bot (20211) [Avatar] Offline
#3
Re: need help
[Originally posted by syud]

tq...i have downloaded the vrml.jar file into my pc..but it confused me to put
in the correct path.. I still cannot run the example..i hope you can send me a
loader and direction where can I put it correctly...

the other things..i have an assignment that need me to design an aplication
like FancyApp( the example)...but it just a simple thing that I can create
only 3D geometry shape and change their color..for example like Paint
aplication is in 2D enviroment...but I need the canvas to be in 3D view..it
just like a 3D Modelling software...but it just have simple 2 function such as
create geometry shape like box,cone.. and can change their colour..just
that..with other basic function..like print, save..new, close.....

can you please give me some example or help me or some advice please...hope I
can be a master like you , Jon....
import-bot (20211) [Avatar] Offline
#4
Re: need help
[Originally posted by author]

The x3d.jar file, with the vrml loader, should go in the same directory where
the java 3D jar files (j3dcore.jar, vecmath.jar, etc.). Try looking in
<java_sdk>/jre/lib/ext or <java_jre>/lib/ext.

As for an example, take a look at the InputSensors example, which is described
on pages 317-322 of the 3DUI book. It includes mouse and keyboard inputs to
move, rotate, and color objects in the scene.

BTW: This example may work without the vrml loader since the object geometry
is from the sun libraries, not vrml objects.

Good luck
--jon

> tq...i have downloaded the vrml.jar file into my pc..but it confused me to put
> in the correct path.. I still cannot run the example..i hope you can send me a
> loader and direction where can I put it correctly...
>
> the other things..i have an assignment that need me to design an aplication
> like FancyApp( the example)...but it just a simple thing that I can create
> only 3D geometry shape and change their color..for example like Paint
> aplication is in 2D enviroment...but I need the canvas to be in 3D view..it
> just like a 3D Modelling software...but it just have simple 2 function such as
> create geometry shape like box,cone.. and can change their colour..just
> that..with other basic function..like print, save..new, close.....
>
> can you please give me some example or help me or some advice please...hope I
> can be a master like you , Jon....
import-bot (20211) [Avatar] Offline
#5
Re: need help
[Originally posted by author]

The x3d.jar file, with the vrml loader, should go in the same directory where
the java 3D jar files (j3dcore.jar, vecmath.jar, etc.). Try looking in
<java_sdk>/jre/lib/ext or <java_jre>/lib/ext.

As for an example, take a look at the InputSensors example, which is described
on pages 317-322 of the 3DUI book. It includes mouse and keyboard inputs to
move, rotate, and color objects in the scene.

BTW: This example may work without the vrml loader since the object geometry
is from the sun libraries, not vrml objects.

Good luck
--jon

> tq...i have downloaded the vrml.jar file into my pc..but it confused me to put
> in the correct path.. I still cannot run the example..i hope you can send me a
> loader and direction where can I put it correctly...
>
> the other things..i have an assignment that need me to design an aplication
> like FancyApp( the example)...but it just a simple thing that I can create
> only 3D geometry shape and change their color..for example like Paint
> aplication is in 2D enviroment...but I need the canvas to be in 3D view..it
> just like a 3D Modelling software...but it just have simple 2 function such as
> create geometry shape like box,cone.. and can change their colour..just
> that..with other basic function..like print, save..new, close.....
>
> can you please give me some example or help me or some advice please...hope I
> can be a master like you , Jon....
import-bot (20211) [Avatar] Offline
#6
Re: need help
[Originally posted by syud]

Thanks Jon...now I can run the examples...

just alittle bit question here...

-erm...I just want to ask that how can I change the examples like I want to
change their file name such as FancyApp to XXXApp....I tried it before but it
has problem about the import.JduiBook....

-the other one...what is kawa and kpx file...i saw it every folder of the
examples...is it I must use it for compiling the new file I want to make ??

-can I add many example file *.wrl in catalog folder...so I can run it in the
FancyApp?

-how can I combined two file together like I want combine FancyApp and Input
Sensor...so that the object in the canvas....can move..rotate and what so
ever...

hehehe....a lot of question actually....
import-bot (20211) [Avatar] Offline
#7
Re: need help
[Originally posted by author]

> Thanks Jon...now I can run the examples...
>
> just alittle bit question here...
>
> -erm...I just want to ask that how can I change the examples like I want to
> change their file name such as FancyApp to XXXApp....I tried it before but it
> has problem about the import.JduiBook....

I would suggest that you extend the 3DUI code rather than modifying it.

>
> -the other one...what is kawa and kpx file...i saw it every folder of the
> examples...is it I must use it for compiling the new file I want to make ??

These were the files left by the Kawa IDE I used while developing the code.
You can ignore them (or use them if you are using the Kawa IDE).

>
> -can I add many example file *.wrl in catalog folder...so I can run it in the
> FancyApp?

Sure.

>
> -how can I combined two file together like I want combine FancyApp and Input
> Sensor...so that the object in the canvas....can move..rotate and what so
> ever...

Extend FancyApp and use the delegation pattern to include and forward to
InputSensor.

>
> hehehe....a lot of question actually....

good luck
--jon