The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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

Hi there,

I'm a student and i'm currently working on a project that vizualizes machines
in J3D. I've already built the interface (SWING and J3D) , The interface
enables the user to zoom, pan, rotate on a machine (in .WRL) but now I wan't
to expand my project so the user will be enabled to add parts of his own to
the canvas3d. Because positioning 3d models in a 3d space is quite tricky , I
want to use 2 2d canvasses that represent (top or bottom and left or right).
So when the user DnD's a machine part on one of the 2d canvasses he wil be
able position the shape in 2d. Then automatically the J3D scene must be
adjusted

A nice example of this method of working are: Autocad and 3d studio wich also
devide the window in 4 views.

Now my question: Is there any Canvas2D object that can be attached on a scene
so that this proces goes automatically.

TNX a lot,

BTW: Any code concerning this subject is very very welcome
BTW: Great Book!!!!!(I use it all the time)
import-bot (20211) [Avatar] Offline
#2
Re: 2d canvas with a 3d scene
[Originally posted by author]

Of course there is Java2D, but what about using two (or more) Canvas3D's and
setting them for parallel (i.e. non-perspective) projection? That way, what
you see in these "2D" views will always be consistent with what you see in the
"3D" view because all views are looking at the same virtual world. This also
avoids any additional work to keep separate 2D and 3D worlds in sync, and
allows the user to DnD with the 2D and the 3D views. One drawback that I can
see, however, is that you have to be careful to set up your lighting so that
the subject is properly illuminated in all .

If you are using the book classes, look at the
j3dui.utils.AppView.setViewFov() method. Setting the FOV to zero results in
parallel projection. If not, look at the source code for the method.

I'm glad to hear you find the book useful.

good luck
--jon

> Hi there,
>
> I'm a student and i'm currently working on a project that vizualizes machines
> in J3D. I've already built the interface (SWING and J3D) , The interface
> enables the user to zoom, pan, rotate on a machine (in .WRL) but now I wan't
> to expand my project so the user will be enabled to add parts of his own to
> the canvas3d. Because positioning 3d models in a 3d space is quite tricky , I
> want to use 2 2d canvasses that represent (top or bottom and left or right).
> So when the user DnD's a machine part on one of the 2d canvasses he wil be
> able position the shape in 2d. Then automatically the J3D scene must be
> adjusted
>
> A nice example of this method of working are: Autocad and 3d studio wich also
> devide the window in 4 views.
>
> Now my question: Is there any Canvas2D object that can be attached on a scene
> so that this proces goes automatically.
>
> TNX a lot,
>
> BTW: Any code concerning this subject is very very welcome
> BTW: Great Book!!!!!(I use it all the time)