#VRML V2.0 utf8 # Let's have 3 viewpoints, 1 entry view, and 2 for jumping to a LOD level. DEF Cameras Group { children [ DEF Origin Viewpoint { position 0 0.5 20 description "Origin" } # a viewpoint for Tecfa as agroup DEF Details1 Viewpoint { position 0 0.5 10 description "Tecfa People in a box" } # a viewpoint for Details DEF Details2 Viewpoint { position 0 0.5 5 description "Details of Tecfa People" } ] } # This LOD has 3 levels, the most detailed one comes first # "center" field: The Center of this object is a 0 0 0 # "range" field: # We we start seeing it (the default view) at z=20 we just draw a grey box # At 15 meters distance we draw a anchored box with a gif texture # At 10 meters distance we draw 4 objects. DEF TecfaFolks Group { children LOD { center 0.0 0.0 0.0 range [10, 15] level [ # LEVEL III: Detail Inline { url "frame-2-vrml2.wrl" } # LEVEL II: The bunch as a whole Anchor { url "http://tecfa.unige.ch/tecfa-people/tecfa-people.html" description "A link to Tecfa People" parameter "target=contents" children [ Transform { rotation 0 1 0 0.1 children Shape { appearance Appearance { texture ImageTexture { url "tecfa/tecfa.gif" } textureTransform TextureTransform { scale 4 1 } } geometry Box { size 4 1 1 } } # Shape } ] } # LEVEL I # LEVEL III: A simple box Transform { rotation 0 1 0 0.1 children Shape { appearance Appearance { material Material { diffuseColor 0.8 0.8 0.8 } } geometry Box { size 4 1 1 } } # Shape } ] } } # Our objects use default size # (0.5 up/down, right/lifet, back/fwd from 0 0 0) # Therefore, we put the center of the road 0.6 down and 11 forward DEF RoadtoTECFA Transform { translation 0 -0.6 10 children Shape { appearance Appearance { material Material { diffuseColor 0.7 0.7 0.7 } } geometry Box { size 6 0.1 21 } } # Shape }