vr2-5-13.wrl
[ VRML source code ]
#VRML V2.0 utf8
#vr2-5-13.wrl
Shape {
appearance DEF Wood Appearance {
texture ImageTexture {
url "wood.gif"
}
}
geometry Box { size 5 1 1 }
}
Transform {
translation 0 1 -2
rotation 1 0 0 1.5708
children Shape {
appearance USE Wood
geometry Box { size 5 5 1 }
}
}
Group {
children [
DEF LongNail Transform {
translation -1.5 0 0
children [
Transform {
translation 0 4 0
children Shape {
appearance DEF Iron Appearance {
material Material { diffuseColor 0.75 0.75 0.75 }
}
geometry Cylinder {
height 3
radius 0.15
}
}
},
Transform {
translation 0 2.25 0
rotation 1 0 0 3.1415
children Shape {
appearance USE Iron
geometry Cone {
bottomRadius 0.15
height 0.5
}
}
},
Transform {
translation 0 5.65 0
scale 1 0.3 1
children Shape {
appearance USE Iron
geometry Sphere {
radius 0.5
}
}
}
]
},
DEF LongTrans PlaneSensor { }
]
}
Group {
children [
DEF ShortNail Transform {
translation 1.5 0 0
rotation 0 0 1 -0.2
children [
Transform {
translation 0 3 0
children Shape {
appearance DEF Iron Appearance {
material Material { diffuseColor 0.75 0.75 0.75 }
}
geometry Cylinder {
height 1.5
radius 0.15
}
}
},
Transform {
translation 0 2 0
rotation 1 0 0 3.1415
children Shape {
appearance USE Iron
geometry Cone {
bottomRadius 0.15
height 0.5
}
}
},
Transform {
translation 0 3.9 0
scale 1 0.3 1
children Shape {
appearance USE Iron
geometry Sphere {
radius 0.5
}
}
}
]
},
DEF ShortTrans PlaneSensor { }
]
}
ROUTE LongTrans.translation_changed TO LongNail.set_translation
ROUTE ShortTrans.translation_changed TO ShortNail.set_translation