Yes, of course!
Look at the package com.sun.j3d.utils.scenegraph.io. It has methods for
you want.

Regards.

RWGRAY wrote:

> I am now going to write a Java 3d program in which I can save a scene to a
> file and read it back again latter.
>
> So, I define my root sceneObject class to implement Serializable.
>
> I extend sceneObject to define a class (objectPositionable) of all objects
> in the scene that is positionable (can move, spin).  This class has a method
> and variables to build and return a BranchGroup having the TransformGroups
> attached to do this motion.
>
> I then extend this objectPositionable class to include objects that are
> scalable, that can change size (objectSizable).  This has a method and
> variables  to return a BG with a scale transform group attached.
>
> And I extend this objectSizable class to define, for example, mySphere,
> myCube, or other geometry objects to be displayed.
>
> Now, the BranchGroups, etc. at each class level are defined with transient.
>
> If I write out the mySphere class how do I handle reading it back in?
>
> Is there a way to call all the constructor methods of all the parent classes
> for the mySphere class?  Does this happen automatically? (I don't think
> reading a serialized class back into Java calls any of the class'
> constructor methods does it?)
>
> Is there another structure that would be better to use for saving and
> retrieving Java 3D scenes?
>
> Should I have a method *in each* of these classes to rebuild the
> BranchGroups and other transient variables? Something like
>
> public void rebuild()
> {
>   super.rebuild(); // To allocate parent class transient variables.
>
>   // allocate transient variables (BranchGroup, etc) for this class level.
>
>   // attach this BranchGroup to the parent BranchGroup
> }
>
> I would be interested in learning how others are doing this setup/allocation
> of transient variables after reading a class back in.
>
> Cheers,
> Bob Gray
>
> ===========================================================================
> 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".
>
>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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