#X3D V3.3 utf8 PROFILE Immersive # [X3D] version=3.3 # [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.3.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" "BeamHemisphereExample.x3d" META "creator" "Don Brutzman" META "created" "29 January 2003" META "modified" "20 October 2019" META "description" "Produce wireframe or transparent beam hemispheres." META "identifier" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemisphereExample.x3d" META "generator" "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit" META "license" "../../license.html" # [Scene] ========== ========== ========== Background { groundAngle [ 1.57079 ] groundColor [ 0 0.15 0.25 0 0.15 0.25 ] skyColor [ 0 0.3 0.5 ] } WorldInfo { info [ "Produce wireframe or transparent beam hemisphere" ] title "BeamHemispherePrototype" } Viewpoint { description "BeamHemisphere example" } Viewpoint { description "BeamHemisphere example from above" orientation 1 0 0 -1.570796 position 0 10 0 } EXTERNPROTO BeamHemisphere [ # [appinfo] Produce wireframe or transparent beam hemisphere. Typical uses include sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: hemisphere with centroid at (0 0 0) and radius 1 atop x-z plane. initializeOnly SFString name # [appinfo] Assigning a name to a BeamHemisphere aids tracing inputOnly SFBool contact # [appinfo] (communications) is transmitted signal in contact with receiver or (sensor) is a target return detected? inputOnly SFFloat range # [appinfo] distance in meters along x axis initializeOnly SFFloat defaultRange # [appinfo] distance in meters used until eventIn range sent initializeOnly SFBool wireframe # [appinfo] whether wireframe beam is drawn initializeOnly SFBool solid # [appinfo] whether solid beam is drawn initializeOnly SFColor contactColor # [appinfo] rendering color when contact=true initializeOnly SFColor noContactColor # [appinfo] rendering color when contact=false inputOutput SFFloat transparency # [appinfo] 1 = fully transparent wireframe only ][ "BeamHemispherePrototype.x3d#BeamHemisphere" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.x3d#BeamHemisphere" "BeamHemispherePrototype.wrl#BeamHemisphere" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.wrl#BeamHemisphere" ] # Viewable geometry for this scene Group { children [ DEF BeamHemisphereInstance BeamHemisphere { name "BeamHemisphereInstance" defaultRange 10 transparency 0.2 wireframe TRUE solid TRUE } Transform { translation 0 -3 0 children [ Billboard { children [ Shape { appearance Appearance { material Material { diffuseColor .8 .8 0 } } geometry Text { string [ "touch text to toggle contact-mode rendering" ] fontStyle FontStyle { justify [ "MIDDLE" "MIDDLE" ] size 0.6 } } } Shape { # transparent Box as text-selection assist geometry Box { size 9 1 .001 } appearance Appearance { material Material { transparency 1 } } } DEF TextTouch TouchSensor { description "Hover over text to activate contact mode" } ] ROUTE TextTouch.isOver TO BeamHemisphereInstance.contact } ] } ] } DEF AnimationGroup Group { children [ DEF Clock TimeSensor { cycleInterval 10 loop TRUE } DEF RangeInterpolator ScalarInterpolator { key [ 0 .4 .4 .5 .5 .9 .9 1 ] keyValue [ 0.01 4 0 0 -0.01 -4 0 0 ] } # ========== DEF TransparencyInterpolator ScalarInterpolator { key [ 0 .4 .4 .5 .5 .9 .9 1 ] keyValue [ 0 1 1 1 0 1 1 1 ] } ] ROUTE Clock.fraction_changed TO RangeInterpolator.set_fraction ROUTE RangeInterpolator.value_changed TO BeamHemisphereInstance.range ROUTE Clock.fraction_changed TO TransparencyInterpolator.set_fraction ROUTE TransparencyInterpolator.value_changed TO BeamHemisphereInstance.transparency }