#VRML V2.0 utf8 # #
## Towers of Hanoi Example DEF CAM1 Viewpoint { position 0 1 15 description "Camera 1" } DEF CAM2 Viewpoint { position 0 1 20 description "Camera 2" } DEF CAM3 Viewpoint { position 0 1 25 description "Camera 3" } NavigationInfo { type "EXAMINE" } 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 ] } PROTO BoxTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 exposedField SFColor diffuseColor 1.0 1.0 1.0 exposedField SFVec3f size 2.0 2.0 2.0 ] { Transform { rotation IS rotation translation IS translation children [ Shape { appearance Appearance { material Material { diffuseColor IS diffuseColor } } geometry Box { size IS size } } ] } } PROTO ConeTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 exposedField SFColor diffuseColor 1.0 1.0 1.0 exposedField SFFloat radius 0.2 exposedField SFFloat height 2.0 ] { Transform { rotation IS rotation translation IS translation children [ Shape { appearance Appearance { material Material { diffuseColor IS diffuseColor } } geometry Cone { bottomRadius IS radius height IS height } } ] } } PROTO CylinderTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 field SFColor diffuseColor 1 1 1 field SFFloat radius 0.5 field SFFloat height 2.0 ] { Transform { rotation IS rotation translation IS translation children [ Shape { appearance Appearance { material Material { diffuseColor IS diffuseColor } } geometry Cylinder { radius IS radius height IS height } } ] } } PROTO TextTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 exposedField MFString text [ "undefined", "text" ] ] { Transform { rotation IS rotation translation IS translation scale 0.5 0.5 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1.0 1.0 1.0 } } geometry Text { string IS text fontStyle FontStyle { family "SERIF" style "BOLD" justify "MIDDLE" } } } ] } } PROTO BoardTransform [ exposedField MFString text [ "Please", "wait", "...." ] exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 ] { Transform { rotation IS rotation translation IS translation children [ Billboard { axisOfRotation 0 1 0 children [ BoxTransform { diffuseColor 0.8 0.8 0.0 translation 0.0 0.0 -0.2 size 4 3 0.1 } TextTransform { text IS text } ] } ] } } Transform { rotation 0 0 0 0.0 translation 0.0 0.0 0.0 children [ # define message billboard: DEF bboard BoardTransform { translation -8.0 2.0 -4.0 } DEF box BoxTransform { size 10 0.05 4.0 diffuseColor 0.8 0.8 0.0 } DEF peg1 ConeTransform { height 2.4 radius 0.4 translation -4.0 1.2 0.0 diffuseColor 0.8 0.2 0.2 } DEF peg2 ConeTransform { height 2.4 radius 0.4 translation 0.0 1.2 0.0 diffuseColor 0.8 0.8 0.8 } DEF peg3 ConeTransform { height 2.4 radius 0.4 translation 4.0 1.2 0.0 diffuseColor 0.2 0.2 0.8 } DEF disk1 CylinderTransform { height 0.2 radius 0.4 translation -4.0 1.6 0.0 diffuseColor 0.8 0.2 0.2 } DEF disk2 CylinderTransform { height 0.2 radius 0.6 translation -4.0 1.2 0.0 diffuseColor 0.8 0.8 0.8 } DEF disk3 CylinderTransform { height 0.2 radius 0.8 translation -4.0 0.8 0.0 diffuseColor 0.2 0.2 0.8 } DEF disk4 CylinderTransform { height 0.2 radius 1.0 translation -4.0 0.4 0.0 diffuseColor 0.8 0.8 0.8 } ] } ## #