Dear friends.

I tried to use j3dfly externalization framework to
save some of my
scene. I get stumbled on these 2 issues.

1. The way Sun envision j3d externalization is to
implement the
following method in any custom object that extends a
SceneGraphObject

public void writeSceneGraphObject( java.io.DataOutput
out ) throws
IOException;

You can store any primitive type members of this
custom object and
there is a clever procedure to store unwarranted
SceneGraphObject
references.
My trivial question is how to store a simple
serializable object
members. The only way I see it right now is to
serialize these objects into
ByteArrayOutputStream. Count the number of bytes
resulting from this
procedure, say NBytes. Then, write NBytes into a
DataOutput and then write
byte_array representing serializable objects. Is this
awkward procedure
is the write way to save my costom sceneGraphObjects?
Why
writeSceneGraphObject() does not take ObjectData
instead? Everything would be much
easier.

2. The first thing I did with externalization
functionality of j3dfly
is the following simple test.
I took a simple but large VRML file of size 700K.
Loaded into the
j3dfly and saved resulting scene. The result had size
= 2.2M. It is an
enormous memory waste if you consider that
corresponding 3ds file has size
only 140K. Am I doing something wrong here? I naively
thought that .flt
files should be of the same size as 3ds files since
internally they
represent data in a binary format (unlike VRML files).

Any insight into these issue will be greately
appreciated.

Thank you

Boris


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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