3.8. WWWBasePath property

This is a string property that specifies base URL of each node. Actually, for now our engine doesn't support downloading data using any network protocol, so this is always treated just like an absolute path on local file-system. It is always set to the directory of VRML file from which given node was read. It's used by nodes that reference any external file, like Inline or ImageTexture. Thanks to this field, all such nodes can always resolve their url fields with respect to the directory of their file.

For example, assume that inside some directory you have a main VRML file main.wrl and two subdirectories: textures and inline. Inside textures you have a file my_texture.png and inside inline you have VRML file textured_box.wrl. Finally, let's say that you want to include textured box in main.wrl file, so you write

Inline { url "inline/textured_box.wrl" }

Now inside textured_box.wrl you should reference the texture like

ImageTexture { url "../textures/texture.png" }

and everything will work when you open main.wrl VRML file. Moreover, textured_box.wrl is able to stand on it's own too, which means that you can open only textured_box.wrl and texture will still be properly read.

This is similar to xml:base attribute in XML, that was needed to make including XML files by XInclude and referencing external files from various elements (like DocBook's imagedata) to cooperate seamlessly.