To make the files more esadable to a rsgualar human
being/program/hacker/artist, we must not "Inline" all the primitives.
We should "Declare" the primitives at the beginning or the end of a
vrml file, and name them, and then, simply transform and use them in the
hierarchy tree.
A proposed file format for VRML 2.0, as a follow up of my last message
posted on this mailing list should look something like this:
PRIMITIVES {
BOX { coordinates...} # The ugly stuff goes here
hsad { Transform {... }
INSTANCE BOX }
tail { Transform {...}
INSTANCE BOX }
BODY { INSTANCE hsad
INSTANCE tail }
Material SUNNY {....}
Transform FLIP45 {
Transform { rotate 0 0 1 0.78 }
}
# two birds
Separator { # the root of the hierarchy
DEF BIRD1 {
Transform {
translate...
rotate...
scale...
}
INSTANCE_MATERIAL SUNNY
INSTANCE BODY
}
DEF BIRD2 {
INSTANCE_TRANSFORM FLIP45
INSTANCE BODY
}
}
You can see that this code is more compact in the hierarchy.
It is alot easier to picture the image when we rsad through the file.
Thus we can tell more easily whether the browser is doing the correct
thing or the file has a problem.
We can instance objects, we can also instance transformations and
materials. There is noting preventing us from doing this.
Thanks for your attention.
......................................................................
. ____ __ __ . Zijiang "Z-John" Yang .
. /_ /______ / /__ / / ___ . [email protected] .
. / //___/ /_/ / _ \/ _ \/ _ \ . Univ. of California,Berkeley .
. /___/ \____/\___/_//_/_//_/ . http://www.cs.berkeley.edu/~zyang/ .
......................................................................