To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.partsOpen lugnet.cad.dat.parts in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Parts / 3291
3290  |  3292
Subject: 
Re: JAVA - Viewer for dat-Files
Newsgroups: 
lugnet.cad, lugnet.cad.dat.parts
Date: 
Mon, 28 Jan 2002 19:04:56 GMT
Viewed: 
292 times
  
Bernd Broich wrote:

> "Kyle McDonald" <kmcdonald@bigfoot.com> schrieb im Newsbeitrag
news:3C519D02.2040901@bigfoot.com...
> Hi,
> for how I'm doing the internal creating:

>
> I did a depth search with hashing the files, create two shapes for
> all lines, quads, triangles, each partitioned in solid and transparent.
> So I got finally one Branchgroup with six shapes and two appearances.
>

I started to look into your source over the weekend. I didn't get
very far though. I couldn't concentrate. (There was this football
(american style) game on TV between a teem called the 'Steelers'
and a team called the 'Patriots' - It was a little distracting...;^)


>>I found it easy to do just what you describe. The J3D Scenegraph allows
>>it's 'Shape3D' nodes to share 'Geometry'. By using a HashTable of the
>>file already read in, it's relatively easy to attach the same geometry
>>over and over in the scene. This saves *alot* of memory (and makes
>>processing the files alot faster also.)
>>
>
> I tried this out, and you can do it too: I added some code, that
shares the
> geometries, and the appearances as far as possible.
> Just change in the Show-class every 'SubFile' to 'Element'. The coloring
> doesn't work fine at the moment, but this doesn't matter to the problem
> above.


Ahh. I wondered why Element wasn't used anywhere. :)


>
> The fact is: Loading is a little bit faster, but memory is used much more
> and the drawing/rotating speed gets low.
>

Your's did seem to rotate pretty well, I'm curious though, When you
rotate the model, can you see it while it's rotating? For me the screen
stays still while I drag the mouse, and then after a noticable pause,
it finally redraws. At first I thought dragging the mouse wasn't doing
anything. Then the picture changed and I wasn't sure what I did.

I've since looked at the source, and I understand how it's supposed
to work. Maybe my Laptop is just too slow. What hardware do you use?


> The memory you save with the sharing of geometries get exhausted by the
> memory that the shapes, the transformgroups and the appearances need.
>


I'm not sure what you mean by this. I share one Shape3D and one
Appearence object for each reference to a DAT file. Then I share one
set of Geometry among all the references to the same DAT file.

I remember that when I made this change the memory usage dropped
significantly.


I'm hoping that using strips will reduce it further. Though I expect
it to increase at first - untill i can go through and figure out
what I don't need now that I have strips.

So far, I've been surprised how similiar the DAT file structure, and
the J3D Scenegraph really are. :)

-Kyle


--
   _
-------------------------------ooO( )Ooo-------------------------------
Kyle J. McDonald (o o)        Systems Support Engineer
Sun Microsystems Inc. |||||
High End Server Engineering   Kyle.McDonald@Sun.COM
1 Network Drive BURL03-403 \\\//         voice:   (781) 442-2184
Burlington, MA 01803 (o o)            fax:   (781) 442-1646
-------------------------------ooO(_)Ooo-------------------------------



Message is in Reply To:
  Re: JAVA - Viewer for dat-Files
 
"Kyle McDonald" <kmcdonald@bigfoot.com> schrieb im Newsbeitrag news:3C519D02.204090...oot.com... Hi, for how I'm doing the internal creating: I did a depth search with hashing the files, create two shapes for all lines, quads, triangles, each (...) (23 years ago, 26-Jan-02, to lugnet.cad, lugnet.cad.dat.parts)

20 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR