Vous êtes sur la page 1sur 11

FORMAS PRIMITIVAS Shape { Box

geometry Box { size 2.0 2.0 2.0 } appearance Appearance { material Material { } }

Sphere

Cylinder

Cone

Text

} Shape { geometry Sphere { radius 1.0 } appearance Appearance { material Material { } } } Shape { geometry Cylinder { height 2.0 radius 1.0 bottom TRUE top TRUE side TRUE } appearance Appearance { material Material { } } } Shape { geometry Cone { height 2.0 bottomRadius 1.0 bottom TRUE side TRUE } appearance Appearance { material Material { } } } Shape { geometry Text { string [ "Shape:", "Texto"] fontStyle FontStyle { style "BOLD" family "SERIF" justify "FIRST" size 2.0 spacing 3.0 }

} appearance Appearance { material Material { } } }

Tabla de colores
Color blanco rojo amarillo celeste marrn Red 1.0 1.0 1.0 0.0 0.5 Green 1.0 0.0 1.0 1.0 0.2 Blue 1.0 0.0 0.0 1.0 0.0

Uso de DEF-USE
Shape { appearance DEF oro Appearance { material Material { ambientIntensity 0.4 diffuseColor 0.22 0.15 0.0 specularColor 0.71 0.7 0.56 shininess 0.16 } } geometry Box { size 1.0 1.0 1.0 } } Shape { appearance USE oro geometry Sphere { radius 0.7 } }

AGRUPAMIENTO Transform

Group

Transform { translation 0.0 2.5 0.0 rotation 0.0 1.0 0.0 0.0 scale 0.375 0.375 0.375 children [ Shape { appearance Appearance { material Material {...} } geometry Box { } } ] } Group { children [ # hijo 1: puerta Shape {

geometry Box { size 3.0 6.0 0.2 } .... }, # hijo 2: picaporte Transform { translation 1.18 -0.0 0.2 children [ Shape { geometry Sphere { radius 0.15 } .... } ] } ] } Switch { whichChoice 0 choice [ # 0, rojo ..... Shape { geometry Sphere {} appearance Appearance { material Material { diffuseColor 1.0 0.0 0.0 } } } # 1, amarillo ... Shape { geometry Sphere {} appearance ...(amarillo) } # 2 .... Shape { geometry Sphere {} appearance ...(verde) } ] } Billboard { # Rota alrededor del eje Y axisOfRotation 0.0 1.0 0.0 children [ . . .cabeza del robot ] }

Switch

Billboard

Anchor

Inline Colission

Lod

Anchor { url "temple.wrl" description "vrml" children [...] } Inline { url "table.wrl" } DEF Collide Collision { collide TRUE proxy Shape { geometry Box { . . . } } children [ . . . ] } LOD { center 0.0 0.0 0.0 range [ 7.0, 10.0 ] level [ # detalle alto Inline {url "torch1.wrl"}, # detalle medio Inline {url "torch2.wrl"}, # detalle bajo Inline {url "torch3.wrl" } ] }

FORMAS AVANZADAS Coordinate (NODO APOYO PARA LOS 3 SIGUIENTES) Coordinate { point [ # X Y Z 2.0 1.0 3.0, 4.0 2.5 5.3, ... ] } Shape { appearance Appearance { material Material{...} } geometry PointSet { coord Coordinate { point [ 1.0 1.0 0.0, 2.0 4.0 0.0, ... ] } ... } } Shape { appearance Appearance { material Material{...}

PointSet

IndexedLineSet

} geometry IndexedLineSet { coord Coordinate { point [ 1.0 1.0 0.0, 2.0 4.0 0.0, . . .] } coordIndex [0, 1, 2,-1, 3, ..., -1,] } IndexedFaceSet } Shape { appearance Appearance { material Material{...} } geometry IndexedFaceSet { coord Coordinate { point [ 0.0 0.0 0.0, 5.5 5.0 0.88, . . .] } coordIndex [0, 1,..., -1, 0, 12,..., 7, -1, .... ] solid TRUE ccw TRUE convex FALSE } } Shape { appearance Appearance { material Material{...} } geometry ElevationGrid { xDimension 128 zDimension 128 xSpacing 0.02 zSpacing 0.02 solid TRUE height [ 0.019608, 0.015686, ...] solid TRUE ccw TRUE } } Shape { appearance Appearance {

ElevationGrid

Extrusion

material Material{...} } geometry Extrusion { crossSection [ 0.75 0.00, 0.69 -0.285,...] spine [ 2.00 0.00 -0.00, 1.85 0.12 -0.77,...] scale [ 0.1 0.1, 0.15 0.11,...] endCap TRUE beginCap FALSE solid FALSE } }

COLOR EN LAS FORMAS AVANZADAS Coordinate (NODO APOYO PARA LOS 3 SIGUIENTES) Coordinate { point [ # X Y Z 2.0 1.0 3.0, 4.0 2.5 5.3, ... ] } Shape { appearance Appearance { material Material{...} } geometry PointSet { coord Coordinate { point [ 1.0 1.0 0.0, 2.0 4.0 0.0, ... ] } color Color { color [ 0.0 1.0 0.0, 1.0 1.0 0.0, ...] } } } Shape { geometry IndexedLineSet { coord Coordinate { . .} coordIndex [ N ndices ] color Color { color [...] } colorindex[ N ndices ] colorPerVertex TRUE

PointSet + color

IndexedLineSet

IndexedFaceSet

} } Shape { geometry IndexedFaceSet { coord Coordinate {... } coordIndex [ N ndices ] color Color { color [...] } colorIndex[ N ndices ] colorPerVertex TRUE } }

SOMBRAS CreaseAngle ( PARA IndexedFaceSet , ElevationGrid Y Extrusion) Shape { appearance Appearance {...} geometry IndexedFaceSet { coord Coordinate {...} coordIndex [...] creaseAngle 1.5 } } Shape { appearance Appearance { . . . } geometry IndexedFaceSet { coord Coordinate {... } coordIndex [N ndices] normal Normal { . . . } normalIndex [ N ndices ] normalPerVertex TRUE } }

Normal

TEXTURAS ImageTexture Shape { appearance DEF Brick Appearance { texture ImageTexture { url "brick.jpg" } } geometry IndexedFaceSet {. . . } } Shape { appearance Appearance { texture PixelTexture { image 3 1 3 0xFF0000 0x00FF00 0x0000FF }

PixelTexture

} geometry Cylinder { height 2.7 } MovieTexture } Shape { appearance Appearance { texture MovieTexture { url "t-rex.mpg" loop TRUE speed 1.0 startTime 0.0 stopTime 0.0 } } geometry Cylinder { height 2.7 } }

TRANSFORMACION DE TEXTURAS TextureTransform Shape { appearance Appearance { texture ImageTexture { url "cookie.jpg" } textureTransform TextureTransform { translation 0.0 0.0 rotation 0 scale 1.0 1.0 } } geometry IndexedFaceSet { coord Coordinate {... } coordIndex [ N1 ndices porcin, -1, N2 ndices porcin, -1,] texCoord TextureCoordinate { point [...] } texCoordIndex[ N1 ndices porcin, -1, N2 ndices porcin, -1, ] } }

LUCES PointLight PointLight { location 0.0 0.0 0.0 radius 12.0 attenuation 1 0 0

ambientIntensity 1 color 1.0 0.0 0.0 intensity 2 on TRUE } Inline { url "spheres.wrl" } DirectionalLight { direction -1.0 0.0 0.0 ambientIntensity 1 color 0.0 1.0 0.5 intensity 2 on TRUE } Inline { url "spheres.wrl" bboxCenter 0.0 0.0 0.0 bboxSize 16.0 16.0 1.0 } SpotLight { cutOffAngle 0.785 beamWidth 0.52 location 0.0 0.0 0.0 radius 12.0 attenuation 1 0 0 direction -1.0 0.0 0.0 attenuation 1 0 0 ambientIntensity 1 color 0.2 0.4 1.0 intensity 2 on TRUE } Inline { url "spheres.wrl" bboxCenter 0.0 0.0 0.0 bboxSize 16.0 16.0 1.0 }

DirectionalLight

SpotLight

NODOS BINDABLES Background Background { skyColor [ 0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0 ] skyAngle [ 1.309, 1.571 ] groundColor [ 0.1 0.10 0.0, 0.4 0.25 0.2,

0.6 0.60 0.6, ] groundAngle [ 1.309, 1.571 ] frontUrl "mountns.png" backUrl "mountns.png" leftUrl "mountns.png" rightUrl "mountns.png" Fog (fogType selecciona entre reduccin de visibilidad LINEAR o EXPONENTIAL) } Fog { color 0.8 0.8 1.0 fogType "LINEAR" visibilityRange 30.0 } NavigationInfo { type [ "WALK", "ANY" ] avatarSize [ 0.25, 1.6, 0.75] speed 1.0 headlight TRUE } Viewpoint { position 0.0 1.65 35.0 orientation 1.0 0.0 0.0 0.2 description "Entry View" } Viewpoint { position 0.0 1.65 15.0 orientation 1.0 0.0 0.0 0.5 description "Close-up" } Viewpoint { position 7.05 1.65 7.05 orientation 0.0 1.0 0.0 0.785 description "Front door" } Viewpoint { position 35.0 1.65 -35.0 orientation 0.0 1.0 0.0 2.356 description "Far away" } Viewpoint { position 0.0 14.43 2.0 orientation 0.00128 0.959 0.282 3.1503 description "Roof top" } WorldInfo { title "Curso Creacin de Mundos Virtuales mediante VRML" info [ "RIO'2001. " ] }

NavigationInfo

Viewpoint

WorldInfo

ANIMACIONES TimeSensor TimeSensor { cycleInterval 1.0 loop FALSE startTime 0.0 stopTime 0.0 }

PositionInterpolator (aplica traslacin, scala y centreo) OrientationInterpolator (aplica rotacin y escalarotacion) ColorInterpolator (aplica para diffusecolor, emisivecolor y specularcolor) ScalarInterpolator (aplica para intensity y ambientintensity) CoordinateInterpolator (aplica para point o cambio de forma) NormalInterpolator (aplica para hacer parpadear,vector)

VALORES DE Nro 1 2 3 4 5 6 7 8 ANGULO 45 90 135 180 225 270 315 360 VALOR 0.78 1.57 2.35 3.14 3.92 4.71 5.49 6.28

NOTAS Se puede usar DEF-USE para los campos geometry y material o appereance

Vous aimerez peut-être aussi