#VRML V2.0 utf8 # définition d'un objet avec trois niveaux de détails LOD { range [ 20,50 ] level [ Transform { # de 0 à 20 on affiche un objet complet children [ Transform { children Shape { geometry Cylinder { height 5 radius 1.8 } appearance DEF ApCyl Appearance { material Material { diffuseColor 1 0 0 } } } } Transform { translation 0 2 0 children Shape { geometry Cylinder { height .5 radius 2 } appearance USE ApCyl } } Transform { translation 0 0 0 children Shape { geometry Cylinder { height .5 radius 2 } appearance USE ApCyl } } Transform { translation 0 -2 0 children Shape { geometry Cylinder { height .5 radius 2 } appearance USE ApCyl } } ] } # de 20 à 50 un supprime les détails, on n'affiche plus qu'un cylindre Shape { geometry Cylinder { height 5 radius 1.8 } appearance Appearance { material Material { diffuseColor 1 0 0 } } } # de 50 à l'infini, on affiche juste une face pour remplacer le cylindre # le Billboard permet de garder la face droite, quelque soit l'orientation de l'utilisateur. # c'est idéal pour simplifier un cylindre Transform { children Billboard { children Shape { appearance USE ApCyl geometry IndexedFaceSet { coord Coordinate { point [ -1.8 -2.5 0, 1.8 -2.5 0, 1.8 2.5 0, -1.8 2.5 0 ] } coordIndex [ 0, 1, 2, 3, -1 ] } } axisOfRotation 0 1 0 } } ] }