Separating a file into two parts,

Park SungWoo (gladius@compiler.kaist.ac.kr)
Sun, 8 Jun 1997 23:50:11 +0900 (KST)

Hi,

1)
In these days, one discussion topic of VRML mailing list has been 'where to
define named nodes which will be used later in several places ???'.
The discussion has the following title:
'Subject: Re: Where to DEF non-children nodes?'
This is related directly with the very problem which I've tried to solve.

All the messages from the VRML mailing list argues that 'you can do it
this way, that way, another way, in a special way, and so on.'.
In our viewpoint, the solution is 'just add such capability to our new
language'.

My thinking leads to separating the nodes in a world into two parts.
One is for just defining nodes, the other is for rendering the world.
For example, you may conjure up the following code:

# in the part for defining nodes
DEFINE DEF X1 Apperance {...}
DEFINE DEF X2 Apperance {...}

# for rendering
SomeNode {
..
USE X1
..
}

If you agree on the seriousness of this problem,
could you suggest any structure for this purpose, please ???

2)
Another serious problem we MUST solve before entering into writing our proposal
is that we should specify clearly the scope of node names.
After that, we should formulate the semantics of 'path'.
For example, suppose that we have a node named P.
Then, my question is 'whether we may use P's field or exposedField anywhere
in the VRML file.'.
Consider the following code.

DEF P ...

Transform {
children [
DEF Q ...
Transform {
children {
SomeNode {
someField1 IS P.fld01
someField2 IS Q.fld02
someField3 IS PARENT.PARENT.children[0].fld03
}
...
}

My solution is that 'destroying the scene graph'.
That is,

A {
children [
DEF B SomeNode {...}
]
}

is equivalent to

# in the part for defining nodes
DEF B SomeNode {...}

# for rendering
A {
children [
USE B
]
}

Hence, we don't have any scene graph (tree structure) at least with
respect to storing nodes. The situation is of course different for
rendering the world(traversing the nodes).
In summary, my second question is that we should specify 'whether accessing
fields or exposedFields of a named node while resolving a path
is allowed to other nodes' and 'Then, to what degree ???'

I did not explain my idea to details. Later, I will tell you the details.

Thank you very much.

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Sungwoo Park, (Castle-Help Naive)
	homepage : http://compiler.kaist.ac.kr/~gladius
 	e-mail : gladius@compiler.kaist.ac.kr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -