DEF/USE quibble

Linas Vepstas (
Tue, 11 Oct 1994 17:37:55 -0500

DEF/USE quibble

I think this is a quibble -- just some bad language in the
Inventor proposal.

Quoting out of the inventor proposal:
> Instancing
> A node may be the child of more than one group. This is called
> "instancing", short for "multiple instancing" (called "aliasing"
> or "multiple references" by other systems), and is accomplished
> by using the "USE" keyword.
> A node given a name using DEF may later be instanced by the reserved
> token USE followed by whitespace and the name of node. If several
> nodes were given the same name, then the last DEF encountered during
> parsing "wins". For example, rendering this scene will result in
> three spheres being drawn. Both of the spheres are named 'Joe';
> the second (smaller) sphere is drawn twice:
> Separator {
> DEF Joe Sphere { }
> Translation { translation 2 0 0 }
> DEF Joe Sphere { radius .2 }
> Translation { translation 2 0 0 }
> USE Joe
> }

Shouldn't the second paragraph read instead:

"The DEF keyword both defines a named node, AND creates a
single instance of it. The USE keyword indicates that the
most recently defined instance should be used. For example ...

"Implementation Note: The USE keyword creates a new instance
of a pointer to the previously defined named object. It does
NOT create a new instance of the object itself.

(I find the language about "multiple instances" to be confusing,
since in fact, there are NOT multiple instances of the object, but
rather, multiple instnaces of pointers to a single instance of
an object. In the example above, there are two spheres, and
three pointers to spheres.)