media @ VU
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

web3d-clock.vr

web3d-clock.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]

Web3D/VR

clock

NavigationInfo { type [ "NONE" ] headlight FALSE } Viewpoint { position 0 0 3 description " .die:zeit. " } EXTERNPROTO ClockMechanism [ eventIn SFInt32 set_hour eventIn SFInt32 set_minute eventIn SFInt32 set_second field SFBool autoClock field SFInt32 hour field SFInt32 minute field SFInt32 second field SFVec3f hourHandAxis field SFVec3f minuteHandAxis field SFVec3f secondHandAxis field SFBool twentyFourHours eventOut SFInt32 hour_changed eventOut SFInt32 minute_changed eventOut SFInt32 second_changed eventOut SFRotation hourHand_changed eventOut SFRotation minuteHand_changed eventOut SFRotation secondHand_changed ] "@vr-proto-clock.wrl" Group { children [ # Outer Rim DEF CIRCLE_open Shape { appearance Appearance { material Material { emissiveColor 1 1 1 } } geometry IndexedLineSet { coord DEF CIRCLE_coords Coordinate { point [ 1.04 0 0, 1.027 .163 0, .989 .321 0, .927 .472 0, .841 .611 0, .735 .735 0, .611 .841 0, .472 .927 0, .321 .989 0, .163 1.027 0, 0 1.04 0, -.163 1.027 0, -.321 .989 0, -.472 .927 0, -.611 .841 0, -.735 .735 0, -.841 .611 0, -.927 .472 0, -.989 .321 0, -1.027 .163 0, -1.04 0 0, -1.027 -.163 0, -.989 -.321 0, -.927 -.472 0, -.841 -.611 0, -.735 -.735 0, -.611 -.841 0, -.472 -.927 0, -.321 -.989 0, -.163 -1.027 0, 0 -1.04 0, .163 -1.027 0, .321 -.989 0, .472 -.927 0, .611 -.841 0, .735 -.735 0, .841 -.611 0, .927 -.472 0, .989 -.321 0, 1.027 -.163 0, ] } coordIndex [ 0 1 2 3 4 5 6 7 8 -1, 8 9 10 11 12 13 14 15 16 -1, 16 17 18 19 20 21 22 23 24 -1, 24 25 26 27 28 29 30 31 32 -1, 32 33 34 35 36 37 38 39 0 -1 ] } } #Inner Rim Transform { scale .95 .95 1 children USE CIRCLE_open } #Face Backplate Shape { appearance Appearance { material Material { emissiveColor 0 0 0 transparency .8 } } geometry IndexedFaceSet { coord USE CIRCLE_coords coordIndex [ 0 1 2 3 0 -1 0 3 4 5 0 -1 0 5 6 7 0 -1 0 7 8 9 0 -1 0 9 10 11 0 -1 0 11 12 13 0 -1 0 13 14 15 0 -1 0 15 16 17 0 -1 0 17 18 19 0 -1 0 19 20 21 0 -1 0 21 22 23 0 -1 0 23 24 25 0 -1 0 25 26 27 0 -1 0 27 28 29 0 -1 0 29 30 31 0 -1 0 31 32 33 0 -1 0 33 34 35 0 -1 0 35 36 37 0 -1 0 37 38 39 0 -1 ] } }

numerics


  
        Switch {
           choice [
              DEF ONE Transform {
                 scale .024 .024 1
                 children [
                    USE CIRCLE_open
                 ]
              }
              DEF FIVE Transform {
                 scale .048 .048 1
                 children [
                    USE CIRCLE_open
                 ]
              }
              DEF TEN Group {
                 children [
                    USE FIVE
                    Transform {
                       scale .034 .034 1
                       children [
                          USE CIRCLE_open
                       ]
                    }
                 ]
              }
           ]
        }
        #One
        Transform {
           translation .43 .745 0
           children [ USE ONE ]
        }
        #Two
        Transform {
           translation .744 .468 0
           children [ USE ONE ]
        }
        Transform {
           translation .744 .398 0
           children [ USE ONE ]
        }
        #Three
        Transform {
           translation .807 .034 0
           children [ USE ONE ]
        }
        Transform {
           translation .807 -.036 0
           children [ USE ONE ]
        }
        Transform {
           translation .897 0 0
           children [ USE FIVE ]
        }
        #Four
        Transform {
           translation .686 -.43 0
           children [ USE ONE ]
        }
        Transform {
           translation .776 -.43 0
           children [ USE FIVE ]
        }
        #Five
        Transform {
           translation .43 -.745 0
           children [ USE FIVE ]
        }
        #Six
        Transform {
           translation -.033 -.86 0
           children [ USE FIVE ]
        }
        Transform {
           translation .057 -.86 0
           children [ USE ONE ]
        }
        #Seven
        Transform {
           translation -.468 -.747 0
           children [ USE FIVE ]
        }
        Transform {
           translation -.378 -.711 0
           children [ USE ONE ]
        }
        Transform {
           translation -.378 -.781 0
           children [ USE ONE ]
        }
        #Eight
        Transform {
           translation -.798 -.396 0
           children [ USE ONE ]
        }
        Transform {
           translation -.798 -.466 0
           children [ USE ONE ]
        }
        Transform {
           translation -.708 -.43 0
           children [ USE TEN ]
        }
        #Nine
        Transform {
           translation -.918 0 0
           children [ USE ONE ]
        }
        Transform {
           translation -.828 0 0
           children [ USE TEN ]
        }
        #Ten
        Transform {
           translation -.745 .43 0
           children [ USE TEN ]
        }
        #Eleven
        Transform {
           translation -.46 .743 0
           children [ USE TEN ]
        }
        Transform {
           translation -.37 .744 0
           children [ USE ONE ]
        }
        #Twelve
        Transform {
           translation -.038 .86 0
           children [ USE TEN ]
        }
        Transform {
           translation .052 .896 0
           children [ USE ONE ]
        }
        Transform {
           translation .052 .826 0
           children [ USE ONE ]
        }
     ]
  }
  
  

transform(s)


  
  DEF H Transform {
     children [
        Shape {
           appearance Appearance {
              material Material {
                 emissiveColor 1 1 1
              }
           }
           geometry IndexedLineSet {
              coord Coordinate {
                 point [
                    -.099 .485 0, -.094 .515 0, -.08 .543 0, -.058 .565 0, -.03 .579 0,
                    0 .584 0, .03 .579 0, .058 .565 0, .08 .543 0, .094 .515 0,
                    .099 .485 0, .099 .025 0, .094 -.015 0, .08 -.043 0, .058 -.065 0,
                    .03 -.079 0, 0 -.084 0, -.03 -.079 0, -.058 -.065 0, -.08 -.043 0,
                    -.094 -.015 0, -.099 .025 0,
                 ]
              }
              coordIndex [
                 0  1  2  3  4  5  6  7  -1
                 7  8  9  10 11 12 13 14 -1, 
                 14 15 16 17 18 19 20 21 0 -1,
              ]
           }
        }
     ]
  }
  DEF M Transform {
     children [
        Shape {
           appearance Appearance {
              material Material {
                 emissiveColor 1 1 1
              }
           }
           geometry IndexedLineSet {
              coord Coordinate {
                 point [
                    -.056 .62 .02, -.053 .637 .02, -.045 .653 .02, -.033 .665 .02,
                    -.017 .673 .02, 0 .676 .02, .017 .673 .02, .033 .665 .02,
                    .045 .653 .02, .053 .637 .02, .056 .62 .02, .056 0 .02, .053 -.017 .02,
                    .045 -.033 .02, .033 -.045 .02, .017 -.053 .02, 0 -.056 .02,
                    -.017 -.053 .02, -.033 -.045 .02, -.045 -.033 .02, -.053 -.017 .02,
                    -.056 0 .02,
                 ]
              }
              coordIndex [
                 0  1  2  3  4  5  6  7  -1
                 7  8  9  10 11 12 13 14 -1, 
                 14 15 16 17 18 19 20 21 0 -1,
              ]
           }
        }
     ]
  }
  DEF S Transform {
     children [
        Shape {
           appearance Appearance {
              material Material {
                 emissiveColor 1 1 1
              }
           }
           geometry IndexedLineSet {
              coord Coordinate {
                 point [
                    -.02 .705 .04, -.019 .711 .04, -.016 .716 .04, -.012 .721 .04,
                    -.006 .723 .04, 0 .724 .04, .006 .723 .04, .012 .721 .04,
                    .016 .716 .04, .019 .711 .04, .02 .705 .04, .02 -.005 .04,
                    .019 -.011 .04, .016 -.016 .04, .012 -.021 .04, .006 -.023 .04,
                    0 -.024 .04, -.003 -.023 .04, -.012 -.021 .04, -.016 -.016 .04,
                    -.019 -.011 .04, -.02 -.005 .04,
                 ]
              }
              coordIndex [
                 0  1  2  3  4  5  6  7  -1
                 7  8  9  10 11 12 13 14 -1, 
                 14 15 16 17 18 19 20 21 0 -1,
              ]
           }
        }
     ]
  }
  
  

mechanism


  DEF C ClockMechanism {}
  
  

route(s)


  ROUTE C.hourHand_changed   TO H.set_rotation
  ROUTE C.minuteHand_changed TO M.set_rotation
  ROUTE C.secondHand_changed TO S.set_rotation
  
  


(C) A. Eliëns 2/9/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2780434-1"; urchinTracker(); </script>