#X3D V3.0 utf8 PROFILE Immersive # [X3D] version=3.0 # [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.0.xsd # X3D-to-ClassicVRML XSL translation autogenerated by X3dToClassicVrmlEncoding.xslt and X3dToVrml97.xslt # https://www.web3d.org/x3d/content/X3dToClassicVrmlEncoding.xslt # https://www.web3d.org/x3d/content/X3dToVrml97.xslt # Transformation using XSLT processor: Saxonica # head META "title" "RapierMissileSystemPrototype.x3d" META "creator" "Oliver Tan" META "created" "28 January 2004" META "modified" "28 November 2019" META "warning" "check whether size is to scale" META "description" "Rapier missile system prototype." META "identifier" "https://savage.nps.edu/Savage/Weapons/Missiles/RapierMissileSystemPrototype.x3d" META "generator" "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit" META "reference" "http://www.army-technology.com/projects/jernas/jernas1.html" META "subject" "Rapier, Rapier missile, missile" META "license" "../../license.html" # [Scene] ========== ========== ========== # This is only a representational model. It is not created to scale. WorldInfo { title "RapierMissileSystemPrototype.x3d" } EXTERNPROTO RapierMissile [ initializeOnly SFNode rocketAppearance ][ "RapierMissilePrototype.x3d#RapierMissile" "https://savage.nps.edu/Savage/Weapons/Missiles/RapierMissilePrototype.x3d#RapierMissile" "RapierMissilePrototype.wrl#RapierMissile" "https://savage.nps.edu/Savage/Weapons/Missiles/RapierMissilePrototype.wrl#RapierMissile" ] PROTO RapierMissileSystem [ # This is only a representational model. It is not created to scale. initializeOnly SFNode material Material { diffuseColor .3 .6 .9 } initializeOnly SFNode imageTexture ImageTexture { url [ "cammie1.jpg" "https://savage.nps.edu/Savage/AircraftFixedWing/AV8bHarrierUnitedStates/cammie1.jpg" ] } ] { ### Warning: ProtoBody child (or descendant) Shape following first child will not be rendered, since the first child determines node type of this prototype. (Authors can silence this warning by placing a comment as second child.) Viewpoint { description "Rapier Missile System" position 0 0 3 } Viewpoint { description "Rapier Missile System Oblique" orientation 0 1 0 -1.571 position -3 0.5 0 } Transform { rotation 0 1 0 1.57 children [ Transform { rotation 0 0 1 -1.571 children [ Shape { appearance DEF LauncherSkin Appearance { material IS material texture IS imageTexture } } DEF MissileSystem Transform { children [ Transform { rotation 0 0 1 1.571 children [ Transform { translation 0 -0.075 0.25 children [ Transform { scale 0.5 0.5 0.5 children [ Transform { rotation 0 0 1 -1.571 translation -0.05 0.1 0 children [ Transform { children [ Shape { appearance USE LauncherSkin geometry Extrusion { creaseAngle 3.14 crossSection [ -0.2 -1.4 -0.2 -0.3 0.05 0.2 0.1 0.2 0.1 -1.4 -0.2 -1.4 ] solid FALSE spine [ 0 0 0 0 0.1 0 ] } } Transform { translation -0.05 0.05 -0.75 children [ Shape { appearance USE LauncherSkin geometry Cylinder { height 0.2 radius 0.15 } } ] } Transform { translation -0.05 0.05 -1.4 children [ Shape { appearance USE LauncherSkin geometry Cylinder { height 0.2 radius 0.15 } } ] } Transform { translation -0.05 0.05 -0.5 children [ Shape { appearance USE LauncherSkin geometry Cylinder { height 0.2 radius 0.05 } } ] } ] } ] } Transform { translation 0 0.1 -0.55 children [ DEF MissileGripPair Transform { children [ Transform { scale 0.49 1 0.8 children [ Transform { translation 0 0.15 -0.3 children [ DEF MissileGrip Transform { translation 0.2 0 0 children [ Transform { rotation 0 1 0 1.571 children [ Transform { scale 0.04 0.04 0.04 children [ Transform { children [ Transform { rotation 1 0 0 1.571 children [ DEF U1 Transform { children [ Shape { appearance USE LauncherSkin geometry Cylinder { height 8 } } Transform { translation 0 4 0 children [ Shape { geometry Sphere { } appearance USE LauncherSkin } ] } Transform { translation 0 -4 0 children [ Shape { geometry Sphere { } appearance USE LauncherSkin } ] } ] } ] } Transform { translation 0 0 4 children [ Transform { rotation 0 0 1 -0.7 children [ Transform { translation 0 5 0 children [ Transform { children [ Shape { appearance USE LauncherSkin geometry Cylinder { height 10 } } Transform { translation 0 5 0 children [ Shape { geometry Sphere { } appearance USE LauncherSkin } ] } Transform { translation 0 -5 0 children [ Shape { geometry Sphere { } appearance USE LauncherSkin } ] } ] } ] } Transform { translation 0 10 0 children [ Transform { translation 0 0 -4 children [ Transform { rotation 1 0 0 1.571 children [ Transform { scale 1 0.8 1 translation 0 0.2 0 children [ USE U1 ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } Transform { rotation 1 0 0 -1.4 translation 0 0.15 -0.3 children [ Transform { rotation 0 1 0 3.142 children [ USE MissileGrip ] } ] } ] } ] } ] } Transform { translation 0 0.1 -1.2 children [ USE MissileGripPair ] } Transform { rotation 1 0 0 -3.142 translation 0 0.2 -0.95 children [ USE MissileGripPair ] } Transform { rotation 1 0 0 -3.142 translation 0 0.2 -1.6 children [ USE MissileGripPair ] } ] } Transform { children [ DEF TopMissile Transform { children [ Transform { rotation 0 1 0 -1.57 scale 0.1 0.1 0.1 translation 0 0.2 -0.2 children [ Transform { children [ RapierMissile { rocketAppearance USE LauncherSkin } ] } ] } DEF shootTopMissile TouchSensor { description "touch missile to launch it" } DEF topMissilePathInterpolator PositionInterpolator { key [ 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 ] keyValue [ 0 0 1 0 0.05 2 0 0.1 3 0 0.15 4 0 0.2 5 0 0.25 6 0 0.3 7 0 0.35 8 0 0.4 9 0 0.45 10 0 0.5 11 ] } DEF topMissileClock TimeSensor { cycleInterval 10 } ] ROUTE topMissileClock.fraction_changed TO topMissilePathInterpolator.set_fraction ROUTE topMissilePathInterpolator.value_changed TO TopMissile.set_translation ROUTE shootTopMissile.touchTime TO topMissileClock.set_startTime } ] } DEF BottomMissile Transform { children [ Transform { rotation 0 1 0 -1.57 scale 0.1 0.1 0.1 translation 0 -0.05 -0.15 children [ Transform { children [ RapierMissile { rocketAppearance USE LauncherSkin } ] } ] } DEF shootBottomMissile TouchSensor { description "touch missile to launch it" } DEF bottomMissilePathInterpolator PositionInterpolator { key [ 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 ] keyValue [ 0 0 1 0 0.05 2 0 0.1 3 0 0.15 4 0 0.2 5 0 0.25 6 0 0.3 7 0 0.35 8 0 0.4 9 0 0.45 10 0 0.5 11 ] } DEF bottomMissileClock TimeSensor { cycleInterval 10 } ] ROUTE bottomMissileClock.fraction_changed TO bottomMissilePathInterpolator.set_fraction ROUTE bottomMissilePathInterpolator.value_changed TO BottomMissile.set_translation ROUTE shootBottomMissile.touchTime TO bottomMissileClock.set_startTime } ] } ] } DEF MissileSystemRotation CylinderSensor { description "Rotate the missile system." maxAngle 0 minAngle -1.3 } ] ROUTE MissileSystemRotation.rotation_changed TO MissileSystem.rotation } ] } ] } } Anchor { description "RapierMissileSystemExample" url [ "RapierMissileSystemExample.x3d" "https://savage.nps.edu/Savage/Weapons/Missiles/RapierMissileSystemExample.x3d" "RapierMissileSystemExample.wrl" "https://savage.nps.edu/Savage/Weapons/Missiles/RapierMissileSystemExample.wrl" ] children [ Shape { geometry Text { string [ "Rapier Missile System Prototype" "contains prototype definitions" "" "Click on text to see these Appearances in" "RapierMissileSystemExample" ] fontStyle FontStyle { justify [ "MIDDLE" "MIDDLE" ] size 0.5 } } appearance Appearance { material Material { diffuseColor 0 0.6 0.6 } } } ] }