Indice Generale Struttura Gerarchica


"Viaggio nel Sistema Solare"

MAR_SAT.WRL
Il file MAR_SAT.WRL definisce la struttura gerarchica dei satelliti, anche se le strutture vere e proprie sono memorizzate all'interno dei files PHOBOS.WRL, DEIMOS.WRL ai quali si rimanda. Tali strutture vengono importate al livello attuale tramite i nodi Inline. I moti di rivoluzione attorno a Marte vengono simulati per mezzo dei nodi OrientationInterpolator ai quali vengono forniti tramite le dichiarazioni di ROUTE degli eventi generati dai nodi TimeSensor preventivamente programmati, come ad esempio i set_rotation.

#VRML V2.0 utf8

#File MAR_SAT.WRL

DEF Phobos Transform { 
  children [
    Inline {
      url "phobos.wrl"
    }
  ]
} 

DEF Deimos Transform { 
  children [
    Inline {
      url "deimos.wrl"
    }
  ]
} 

DEF PhobosTime TimeSensor {
  cycleInterval 5
  loop TRUE
  stopTime -1
}

DEF DeimosTime TimeSensor {
  cycleInterval 10
  loop TRUE
  stopTime -1
}

DEF PhobosRotation OrientationInterpolator {
  key [0, 0.25, 0.5, 0.75, 1]
  keyValue [
    0.4 -0.91 0.0 0.0,
    0.4 -0.91 0.0 1.57,
    0.4 -0.91 0.0 3.14,
    0.4 -0.91 0.0 4.71,
    0.05 -0.99 0.0 6.28
  ]
}

DEF DeimosRotation OrientationInterpolator {
  key [0, 0.25, 0.5, 0.75, 1]
  keyValue [
    0.4 -0.91 0.0 0.0,
    0.4 -0.91 0.0 1.57,
    0.4 -0.91 0.0 3.14,
    0.4 -0.91 0.0 4.71,
    0.4 -0.91 0.0 6.28
  ]
}

ROUTE PhobosTime.fraction_changed  TO PhobosRotation.set_fraction
ROUTE PhobosRotation.value_changed TO Phobos.set_rotation
ROUTE DeimosTime.fraction_changed  TO DeimosRotation.set_fraction
ROUTE DeimosRotation.value_changed TO Deimos.set_rotation