6._Como agrupar dos figuras

6._Como agrupar dos figuras para que se vea como una sola 

Con el nodo Group podemos agregar dos figuras totalmente distintas y con este nodo hacer que se vean como una sola, a continuacion les mostrare la sintaxis de el nodo Group

#VRML V2.0 utf8
Group{
children[


Transform{
translation 0 1 -10.35
rotation 0 0 0 0
children[


Shape { 
              appearance Appearance{texture ImageTexture {
                url ["http://www.decorablog.com/wp-content/2009/07/madera_roble.jpg"]
}
}

geometry Box { 
                 size 5 5 5 
             } 
         }
  ]
}   


Transform{
translation 0 5 -10.35
rotation 0 0 0 0
children[

Shape{
appearance Appearance{
  material Material{
    diffuseColor 1 0 0
   }
}
geometry Cylinder{
    height 2.5
    radius 1
  }
}

]
}

]
}

Group{
children[


Transform{
translation 10 1 -10.35
rotation 0 0 0 0
children[

Shape{
appearance Appearance{
  material Material{
    diffuseColor 0 0 1
   }
}
geometry Cone{
    height 4
    bottomRadius 1.5
  }
}

]
}

Transform{
translation 10 3 -10.35
rotation 0 0 0 0
children[

Shape{
appearance Appearance{
  material Material{
    diffuseColor 0 1 1
   }
}
geometry Sphere{
    radius 1.5
  }
}

]
}

]
}


El resultado de este codigo , la sintaxis es el siguiente:


Regresar al Indice...

No hay comentarios.:

Publicar un comentario