Hi, Andreas: I am now programming in J3D, and want to save the changes of a loaded scenegraph as well. I found this message quite useful, but I am using VirtualUniverse, not SimpleUniverse (for stereo view purposes). Can I use SceneGraphFileReader and SceneGraphFileWriter for saving and loading scenegraph? Any new updates on this?
Thank you for your help. Yi On Tue, 15 Oct 2002 10:02:11 +0200, Andreas Moessner <[EMAIL PROTECTED]> wrote: >Hi Katja, > >Yes, I'm talking about the classes SceneGraphFileReader and >SceneGraphFileWriter. With the SceneGraphFileWriter class you can virtually >save any kind of scenegraph to your harddisk. It doesn't matter if your >scenegraph is handcoded or loaded with a loader, >as long as you use SimpleUniverse, you can store the whole scenegraph or >parts of it to disk as a j3f file. >With the SceneGraphFileReader you can read your scenegraph or parts of >it back into your program. >Lets say you have a handcoded scene or you have a scene loaded through a >vrml loader. >You should be able to let the user pick some points in the scene (you >add pathInterpolator, etc), save the scene with SceneGraphFileWriter and >load it again with the above mentioned changes with SceneGraphFileReader. > >regards > >andreas > >Katja Loescher wrote: > >>Hi Andreas, >> >>Thanks for your answer! >>Are you talking about the classes SceneGraphFileReader and >>SceneGraphFileWriter? >>It is required that the loaded file can be coded manually or generated by an >>editor. That means that I have to load a .class file (and not a .j3f). I >>thought this is not possible with those classes, isn't it? >> >>Katja >> >> >> >>>Hi Katja, >>>You might want to have a look at the J3D Flytrough utils: >>> >>>http://java.sun.com/products/java-media/3D/flythrough.html >>> >>>The IO classes in the j3dfly-utils.jar provide a convenient way to save >>>and load your scenegraph. >>>HTH >>> >>>andreas >>> >>>Katja Loescher wrote: >>> >>> >>> >>>>Hi! >>>> >>>>I am programming an application that is supposed to open any .class file >>>>during runtime (with the JFileChooser). I then get out the branchgraphs >>>> >>>> >>>of the >>> >>> >>>>file and import them into my universe. I will then add an path >>>> >>>> >>>interpolator >>> >>> >>>>which will be attached to a "camera". The user is allowed to choose >>>> >>>> >>>points >>> >>> >>>>which will be displayed in a table. (The points are being recorded so >>>> >>>> >>>that a >>> >>> >>>>"movie" of the camera moving from point to point as the user has defined >>>> >>>> >>>will be >>> >>> >>>>created.) The file can then be saved. The saved file has to be a .class >>>> >>>> >>>at >>> >>> >>>>the end, so it can be run as an applet. I was thinking about creating a >>>> >>>> >>>.java >>> >>> >>>>and then compile it. (I won't get into why, but it must be an applet). >>>> >>>> >>>There >>> >>> >>>>also has to be the possibility to open an already edited file again and >>>> >>>> >>>get >>> >>> >>>>the points of that user defined path that I entered into the behavior >>>> >>>> >>>that is >>> >>> >>>>included in the scene graph, and change the path. My idea was to put the >>>>points into a text file. >>>> >>>>I tried to open the file via the Class object that Java offers. I created >>>> >>>> >>>a >>> >>> >>>>new instance of the loaded class and get the branchgraphs out to put them >>>>into my own universe. I did not use the universe in the loaded file >>>> >>>> >>>because I >>> >>> >>>>did not know the names of the variables I have to reference for the >>>> >>>> >>>behavior >>> >>> >>>>etc. >>>> >>>>A problem occured when I tried to load a .class file that calls a method >>>> >>>> >>>to >>> >>> >>>>load the texture. I could not see the texture after the loading done as >>>>described above. How can I preserve the texture if I load it the way I >>>> >>>> >>>was trying >>> >>> >>>>to? >>>> >>>>Is this the best way to load the file or is there a better way? >>>> >>>>I planned on saving the file with a FileWriter. How do I find out which >>>>import statements to include when I do this? >>>> >>>>I asked a similiar question before, but not in this context, so sorry to >>>>bother you again! >>>> >>>>I highly appreciate any help! Thanks in advance! >>>> >>>>Regards, >>>>Katja >>>> >>>>-- >>>>+++ GMX - Mail, Messaging & more http://www.gmx.net +++ >>>>NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen! >>>> >>>> >>>> >>>=========================================================================== >>> >>> >>>>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". >>>> >>>> >>>> >>>> >>>> >>>-- >>> >>> Andreas Moessner, Software Developer, IFAD A/S >>> Forskerparken 10, DK-5230 Odense M, Denmark >>> >>> Phone: +45 6315 7131, Fax: +45 6593 2999 >>> >>> Email: [EMAIL PROTECTED] >>> WWW: http://www.ifad.dk >>> >>> >>> >>> >>=========================================================================== >> >> >>>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 - Mail, Messaging & more http://www.gmx.net +++ >>NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen! >> >>=========================================================================== >>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". >> >> >> > > >-- > > Andreas Moessner, Software Developer, IFAD A/S > Forskerparken 10, DK-5230 Odense M, Denmark > > Phone: +45 6315 7131, Fax: +45 6593 2999 > > Email: [EMAIL PROTECTED] > WWW: http://www.ifad.dk > > ========================================================================== >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".
