VRML code can be inlined. The Inline node has three fields:
Here is a simple example that shows how to reuse several times the same object defined in an other file.
VRML: | ../examples/inter/inter-inline-2.wrl |
Source: | ../examples/inter/inter-inline-2.text |
Alternatively you can also look at the source code of the naming/rotation examples in section 2.1 above which imports an x, y and z axis.
#VRML V2.0 utf8 Inline { url "inter-inline-1.wrl" bboxSize 0.5 2.5 0.5 } Transform { translation 3 0 0 children [ Inline { url "inter-inline-1.wrl" bboxSize 0.5 2.5 0.5 } ] }Note: insted of a translation one could use the bboxCenter field.
You can also look at our version of the Castle Example created by Mike McCue at Paper Software, Inc. (Note that this example has disappeared from the Web, if you know where the original is, please mail me.)
VRML: | ../examples/castle/castle.wrl |
In addition it shows how to define multiple cameras and how to use GIFs for texturing. Note, that this example needs some polishing. In order to look at the files just cd to the ../examples/castle/castle.wrl directory and click on the *.text files. They are identical with the *.wrl files.