Hi Justin,

If the Node.useData object is serializable then it will be serialized to the
output file using standard java.io.Serialization. If you want some of
your VRML loader data to be stored, but not all of it you should either
make some of the data fields transient or write your own readObject and
writeObject methods.

Rgds

Paul

>X-Accept-Language: en
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Date: Sun, 6 May 2001 09:41:17 +1000
>From: Justin Couch <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] j3dfly "serialization"
>To: [EMAIL PROTECTED]
>
>Paul Byrne wrote:
>>
>> the j3f file includes every piece of data from the Java3D
>> scenegraph. So the size sill depend on what the VRML loader added to the
>> data when it was loaded.
>
>I'm interested in this little piece - does this include the userData
>field? We make use of the userData field to store back references to the
>VRML node definitions for picking purposes. For instance, the
>TouchSensor gets stored in the Group node that it's connected to. If you
>did the serialisation of a VRML scene, we might end up with parts of the
>VRML structures taken with it, which isn't an ideal situation. For
>example we have two levels of sensors:
>
>  root
>   +-------------------+
>   TouchSensor        group
>                       +--------------+
>                      DragSensor    Geometry
>
>If you don't check the stream, we'll get the 2nd level nodes included
>twice as the top level VRML structures retain references to the lower
>level ones (which also contain references to the j3d implementations
>themselves). At least for the VRML structure, I can see bad things
>happening and huge bloat of the files.
>
>--
>Justin Couch                         http://www.vlc.com.au/~justin/
>Freelance Java Consultant                  http://www.yumetech.com/
>Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
>-------------------------------------------------------------------
>"Humanism is dead. Animals think, feel; so do machines now.
>Neither man nor woman is the measure of all things. Every organism
>processes data according to its domain, its environment; you, with
>all your brains, would be useless in a mouse's universe..."
>                                              - Greg Bear, Slant
>-------------------------------------------------------------------
>
>===========================================================================
>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".

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

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