Re: On creating a new node from an existing node,

Jean-Francis Balaguer (balaguer@artemedia.ch)
Mon, 26 May 1997 09:12:44 +0200

Park SungWoo wrote:
> Consider the following example.
>
> DEF X ...
> DEF X1 USE X
> DEF X2 USE X
>
> What do you think of 'creating a new node from an existing node' ?
> In the above example, nodes X1 and X2 share many common fields.
> We may want X1 and X2 to be independent nodes.
> Amulet employs this idea, right ??? (I'm not sure.)
>
> Probably, we may write as:
>
> DEF X ...
> DEF X1 X { A 1. 1. 1. # overrides A in X
> ...
> }
> DEF X2 X { B 0. 0. 0. # overrides B in X
> ...
> }

Amulet by itself do not offer this. However, it offers mechanism to
build something like this. I have been doing it the VRML2 implementation
of i3d.

Here is the extract of a previous mail related to this

Well, as I mentioned in a previous mail, I solved this problem
in i3D using sharing and delegation. in i3D, multiple instances
are created with different objects that shares the value of
the VRML fields. Objects behaves as shared VRML nodes. Sharing also
make an optimal use of memory space. That way, we can answer context
sensitive queries like parent, global_transform.... since individual
objects maintains their own value for these fields....