To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10441
10440  |  10442
Subject: 
Re: MPD file loading search order
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 25 Jul 2006 20:28:18 GMT
Viewed: 
2175 times
  
Travis Cobbs wrote:
As you have pointed out, the spec is indeed ambiguous.  Consequently, there's
probably no correct answer as to how things {should} work.  However, I can tell
you what I do in LDView, so that you have an idea of how at least one
MPD-compatible program {does} work.

Snip, very thourho explanation, thanks!

--Travis

I was thinking of doing the local scope approach mentioned by Steve. But
maybe I keep it optional realizing I always end up disappointing some
people with ether approach.

I was planning to create an LDraw class which handles a single .dat/.ldr
content. a Model class whom will keep the toplevel information (all
recursive OpenGL ready rendering primitives etc) for the directly
requested file.
and a Library class which will manage all currently loaded LDraw and
model instances.

MPD's will be separated in multiple ldraw objects and a single model
object, much like you are describing.

The ldraw objects will determine a absolute filename for type 1 lines
and ask the library to load that file into a new Ldraw object (the
recursion). The library can then determine if it's already loaded or
needs a reload (e.g. file's date changed).

This way every file on disk will be at most once loaded, but different
rendering information can be calculated for it by the higher model classes.

I need this kind of approach because there will be lots of models loaded
at once. In theory it could go in the hundreds of models, because I'm
writing this for the succeeder of my LD4DModeler software.

Any serious animation will have an explosion of used models. I realize
rendering all of them is quite insane :) but I'm not planning of doing
that anyway.

I am only hoping memory usage and loading time won't go insane too. If
this is the case I consider caching all ldraw and model objects to disk
for next sessions.



Thanks for you're insight.

Roland



Message has 1 Reply:
  Re: MPD file loading search order
 
(...) You're welcome. (...) I think local scope is the "correct" thing to do as long as local scope means that only files inside an MPD file can access other files inside the MDP file. Files stored external to the MPD shouldn't, in theory, be able (...) (18 years ago, 26-Jul-06, to lugnet.cad.dev)

Message is in Reply To:
  Re: MPD file loading search order
 
As you have pointed out, the spec is indeed ambiguous. Consequently, there's probably no correct answer as to how things should work. However, I can tell you what I do in LDView, so that you have an idea of how at least one MPD-compatible program (...) (18 years ago, 25-Jul-06, to lugnet.cad.dev, FTX)

29 Messages in This Thread:








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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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