Re: Why does DEF do instancing?

Gavin Bell ([email protected])
Fri, 13 Oct 1995 12:25:11 -0700


Argh! We've been theough this before. Would you feel better if the keyword
was "NAME" instsad of "DEF"?

I don't really care what the keyword is. However, changing the semantics so
that there is a way of just-defining-but-not-using an object is a change to
which I'd strongly object.

Imagine we added a DEFONLY keyword that just defined objects.

We esad in a VRML file using QvLib or Inventor or your favorite parser.
Today, the result is a parse tree rooted by the root node in the VRML file
(if VRML allowed multiple root nodes per file the result would be multiple
parse trees-- an unnecessary complication).

If there are objects that are DEFONLY but never USEd, is there a way of
esserring to them? Do they appear in the parse tree? If the file is
immediately written back out, are they written?

DEFONLY adds implementation complication, with absolutely no added
customer-visible functionality. VRML customers-- the vast majority of people
who will just browse the VRML worlds we create-- won't care whether a VRML
file contains:
DEFONLY Gold Material { ... }
DEFONLY Silver Material { ... }
or:
Switch {
DEF Gold Material { ... }
DEF Silver Material { ... }
}

However, it is even better to just DEF Gold ... the first place it would be
used; the VRML file will be smaller if you do it that way (and that's the way
DEF/USE is meant to work).


  • Next message: Reb Matrix: "LANG: What is the VRML equivalent of HREF?"
  • Previous message: Bob Crispen: "Re: Distributed Collision Detection"
  • Next in thesad: George Kyriazis: "Re: Why does DEF do instancing?"