Hi Katja,

You might want to check out the Java3D Scene Graph Editor and the latest
version of Java3D Fly Through, both of which are available from
java3d.netbeans.org (under the files tab).

The Editor will let you construct a scene, using your favourite loaders,
you can then add a KBSplineBeahvior and using the Position Editor you can
create a path by moving around the world and selecting points. YOu can also
change the path by dragging the knots of the spline, or editing the knots
in a table. The interface for editing the splines is a little clunky at
the moment, so if you get stuck drop me an email and I'll talk you through it.

Once you've created the spline you can dump it to a file which both the editor
and j3dfly can read ( a kbsp file).

Rgds

Paul

----------------------------------------------------------
Paul Byrne                      Email : [EMAIL PROTECTED]
Sun Microsystems                Phone : (650) 786 9926
Visualization Software Group    Fax   : (650) 786 5852
----------------------------------------------------------

>Date: Wed, 31 Jul 2002 21:32:55 +0200
>From: Katja Loescher <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] choosing path
>To: [EMAIL PROTECTED]
>MIME-version: 1.0
>Content-transfer-encoding: 7bit
>X-Priority: 3 (Normal)
>Delivered-to: [EMAIL PROTECTED]
>X-Authenticated-Sender: #[EMAIL PROTECTED]
>X-Authenticated-IP: [217.81.191.131]
>X-Flags: 0001
>
>Hi Georg,
>
>Sorry to bug you again about such a simple question. I am a Java3D beginner
>and don't know all the possibilities that Java3D offers.
>
>The purpose of my program is to take any virtual world, open it with my
>application, and allow the user to click on several points.  After these points
>are chosen, I want to show a "fly-through" hitting all of the points the user
>has chosen.  To do this, I first open the virtual world (without a loader or
>scene graph io), edit (with FileReader and FileWriter), and recompile with a
>picking plane.  Are you suggesting that I add in 50 or so spheres switched
>off, and as the user clicks, transform them to the coordinates they selected
>and turn it on?  This would still require me to recompile the entire virtual
>world file (by my application) with the picking plane and the spheres.  At this
>point, I would recompile the same virtual world again (2nd time) after I
>removed the spheres, picking plane, and added in the coordinates and transforms
>for my fly-through.
>
>If so, could you please point me in the right direction for adding in these
>spheres with switches, turning them on/off and transforming them (after I
>added them)?
>
>I am also confused about "loaders".  I thought loaders were designed to take
>another type of file and convert them into java 3d files.  Is it possible to
>import a java3d scenegraph from another file, change the scenegraph and
>display it in a new window without recompiling the file? If so, please explain
>the rough outline. What is the scene graph io that you mentioned? I found a
>class called SceneGraphIO in the J3dFlyThrough package, but I think that it
only
>loads .j3f-files.
>
>Thank you very much for your help!!!!
>
>Katja
>
>> Dear Katja,
>>
>> > My problem is that I want the user to be able to open ANY j3d file e.g.
>> some
>> > downloaded or self programed virtual world. That means there is no
>> switch
>> > group in that file. All functionality has to build into my application
>> (main
>> > window). Unfortunately I can't come up with anything but recompilation
>> (I don't
>> > like that either) after I put in the spheres. Is there any other way? Is
>> > there any possibility of changing parts of the scenegraph without
>> recompilation
>> > from the main application?
>>
>> I'm not 100% sure if I really understand, what you want to do,
>> but I interpret: after loading (via some loader or via scene
>> graph io) you have a scene graph to show, you are able to add
>> a sphere to your overall scene graph and by recompilation you mean
>> BranchGroup.compile(). If so, it still would make sense to only
>> once add the proposed switch with enough tgs/spheres. That avoids
>> frequent restructuring of the scene graph on every pick/selection
>> change.
>>
>> When you use a loader you get the scene graph via Scene.getSceneGroup()
>> and have to attach that to your locale anyway. So you could have:
>>
>> + locale
>>   |
>>   + bgRoot
>>     |
>>     + aSwitch
>>     | |
>>     | + tg1
>>     | | |
>>     | | + sphere1
>>     | |
>>     | + tg2
>>     | | |
>>     | | + sphere2
>>     | .
>>     |
>>     + bgLoaded (as gotten by Scene.getSceneGroup())
>>       |
>>       .
>>
>> bgRoot has capabilities to allow child addition/removal, all
>> down to bgLoaded is constructed on app startup and never changes
>> again (except switching spheres on/off and tranforming them), on
>> every load you de/attach bgLoaded.
>>
>> And if the problem were, that the BranchGroup gotten from
>> Scene.getSceneGroup() has the capability ALLOW_DETACH not
>> set (the loader docs seem to not enforce that) and that capability
>> is not settable (because bgLoaded is compiled already), you could
>> have:
>>
>>     | | |
>>     | | + sphere2
>>     | .
>>     |
>>     + bgDetachable
>>       |
>>       + bgLoaded (as gotten by Scene.getSceneGroup())
>>         |
>>         .
>>
>> where bgDetachable is created by you and has ALLOW_DETACH. Then
>> you can, at load time, detach bgDetachable, get rid of the current
>> bgLoaded (as bgDetachable now isn't live any more), add the new
>> loaded scene to it and reattach bgDetachable.
>>
>> Does this make sense? Regards
>>
>> Georg
>>  ___   ___
>> | + | |__    Georg Rehfeld      Woltmanstr. 12     20097 Hamburg
>> |_|_\ |___   [EMAIL PROTECTED]           +49 (40) 23 53 27 10
>>
>>
>===========================================================================
>> 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".
>>
>
>--
>GMX - Die Kommunikationsplattform im Internet.
>http://www.gmx.net
>
>===========================================================================
>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".

===========================================================================
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".

Reply via email to