Appendix B: VRML Interface
The following section will describe how the client can be used to drive a VRML application. It is worth describing it as it will show how making an interface will influence what operations can be done in the application.
The following is the VRML code that is required to be able to manipulate an object using the device server.
DEF End_Table_ Transform {
translation 0 10 5
children [
Shape {
Appearance Appearance {
material DEF End_Table_MaterialNode Material {
diffuseColor 0.314 0.14 0
}
}
Inline {
url "End_Table_Geometry.wrl"
}
}
]
}
The interface requires two parameters. The top-level transform node for the object needs to be defined, and the material node needs to have a name consistent with the name of the transform node plus the extension "MaterialNode". For example, in the above VRML example the top-level node is named "End_Table_", therefore the corresponding material node must be called "End_Table_MaterialNode". This allows a way to specify a number of objects in a world and allow for device input to be mapped to the object in an easy way. These names must be consistent for the client interface to be able to "locate" the nodes. The client interface expects to find the nodes using the above format.