Hi Artur,

You can store 'normal' java serialized objects in the userData structure
of scene graph nodes or in the BranchGraph user data or in
the file user data so you should be able to achieve what you want.

Rgds

Paul

>Date: Thu, 02 May 2002 01:02:02 +0200
>From: Artur Biesiadowski <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] Scenegraph IO
>To: [EMAIL PROTECTED]
>MIME-version: 1.0
>Content-transfer-encoding: 7bit
>X-Accept-Language: en-us, en
>Delivered-to: [EMAIL PROTECTED]
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.9)
Gecko/20020311
>
>Ok, then I have another question about serializing objects. I understand
>that if I refer to other scenegraph objects, I need to use
>SceneGraphObjectReferenceControl. This is more or less obvious. But it
>works only with subclasses of javax.media.j3d.SceneGraphObject.
>
>I have an animation behavior. Currently I use only one behavior per
>scene, but in future, I'll have more of them - probably one per model.
>Some of the animation data (by own defined classes) will be shared.
>
>Now if I just serialize/write them to stream, they will be duplicated.
>With normal serialization this would be very simple - just write object
>and if it already has been serialized, only backreference will be send.
>Then during deserialization, both places will point to same object.
>
>Only solution I see now is to implement de-sharing utility myself. I
>would read everything from file, duplicated, then make deep-equal check
>for each animation and if it exactly the same as one already existing in
>system, I can use previous reference.
>
>In current system, composite animation name is unique and same for same
>animations. But if people would play with outside editors, merge various
>j3d files etc, it will not longer be true.
>
>Back to question - is there any way to automate this task (serializing
>many instances of same object to SceneGraphIO across many objects) or
>should I implement workaround ?
>
>
>Artur
>
>===========================================================================
>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