OrientationInterpolator
OrientationInterpolator generates a series of rotation values. Results can be ROUTEd to a <Transform> node's 'rotation' attribute or another Rotations attribute
The OrientationInterpolator node belongs to the Interpolation component and its container field is children. It is available since X3D version 3.0 or later.
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.
SFFloat [in] set_fraction (-∞,∞)
Set_fraction selects input key for corresponding keyValue output.
MFFloat [in, out] key [ ] (-∞,∞)
Definition parameters for linear-interpolation function time intervals, in increasing order and corresponding to keyValues.
Warning
Number of keys must match number of keyValues!
MFRotation [in, out] keyValue [ ] [-1,1] or (-∞,∞)
Output values for linear interpolation, each corresponding to time-fraction keys.
Warning
Number of keys must match number of keyValues!
SFRotation [out] value_changed
Linearly interpolated output value determined by current key time and corresponding keyValue pair.
Example
XML Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd"> <X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'> <head> <meta name='comment' content='World of Titania'/> <meta name='created' content='Fri, 02 Mar 2018 21:39:05 GMT'/> <meta name='creator' content='Holger Seelig'/> <meta name='generator' content='Titania V4.0.6a, http://titania.create3000.de'/> <meta name='identifier' content='file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/Interpolation/OrientationInterpolator/OrientationInterpolator.O.x3d'/> <meta name='modified' content='Fri, 02 Mar 2018 22:39:35 GMT'/> </head> <Scene> <WorldInfo title='MURCIELAGO640'/> <Background DEF='Summer' skyAngle='0.8, 1.3, 1.4, 1.5708' skyColor='0.21 0.31 0.59, 0.33 0.45 0.7, 0.57 0.66 0.85, 0.6 0.73 0.89, 0.7 0.83 0.98' groundAngle='0.659972, 1.2, 1.39912, 1.5708' groundColor='0.105712 0.156051 0.297, 0.187629 0.255857 0.398, 0.33604 0.405546 0.542, 0.3612 0.469145 0.602, 0.39471 0.522059 0.669'/> <Viewpoint position='-3.03696 1.23703 2.63518' orientation='-0.353682413209035 -0.925247679337869 -0.137205985534599 0.794027393225711' centerOfRotation='-0.468598 0.0821056 -0.176938'/> <Inline DEF='Murcielage640' url='"murcielage640.x3d"'/> <Transform DEF='TireFrontRight' translation='-1.27791 0.212669 -1.00032'> <Transform DEF='TireFR' rotation='-6.31801402105135e-15 -3.67320524464828e-06 0.999999999993254 4.28442298166309'> <Group DEF='TireAnimation'> <TimeSensor DEF='_1' cycleInterval='1.2' loop='true' startTime='1482895558.23001' stopTime='1482895558.23001'/> <OrientationInterpolator DEF='TireFRRotationInterpolator' key='0, 0.0833333, 0.166667, 0.25, 0.5, 0.75, 1' keyValue='0 0 1 0, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 0.523598808882131, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 1.04719761776426, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 1.5707964266464, -1.76969154518659e-14 -3.673205453847e-06 0.999999999993254 3.14159278324361, -5.75959294770675e-19 3.67320512848233e-06 -0.999999999993254 1.5707963267949, 0 0 1 0'/> </Group> <Inline DEF='tire' url='"tire.x3d"'/> </Transform> </Transform> <Transform DEF='TireFrontRight_2' translation='1.40498 0.212669 -1.0491'> <Transform USE='TireFR'/> </Transform> <Transform DEF='TireFrontRight_3' translation='1.40498 0.212669 1.05601' rotation='0 0 1 3.14159265358979' scale='-1 -1 -1'> <Transform USE='TireFR'/> </Transform> <Transform DEF='TireFrontRight_4' translation='-1.27764 0.212669 0.988662' rotation='0 0 1 3.14159265358979' scale='-1 -1 -1'> <Transform USE='TireFR'/> </Transform> <Script DEF='PhongShadingScript'> <![CDATA[ecmascript: function initialize () { Browser .setBrowserOption ("Shading", "PHONG"); } ]]> </Script> <ROUTE fromNode='_1' fromField='fraction_changed' toNode='TireFRRotationInterpolator' toField='set_fraction'/> <ROUTE fromNode='TireFRRotationInterpolator' fromField='value_changed' toNode='TireFR' toField='set_rotation'/> </Scene> </X3D> |
Classic Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
#X3D V3.3 utf8 Titania V4.0.6a PROFILE Full META "comment" "World of Titania" META "created" "Fri, 02 Mar 2018 21:39:05 GMT" META "creator" "Holger Seelig" META "generator" "Titania V4.0.6a, http://titania.create3000.de" META "identifier" "file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/Interpolation/OrientationInterpolator/OrientationInterpolator.O.x3d" META "modified" "Fri, 02 Mar 2018 22:39:35 GMT" WorldInfo { title "MURCIELAGO640" } DEF Summer Background { skyAngle [ 0.8, 1.3, 1.4, 1.5708 ] skyColor [ 0.21 0.31 0.59, 0.33 0.45 0.7, 0.57 0.66 0.85, 0.6 0.73 0.89, 0.7 0.83 0.98 ] groundAngle [ 0.659972, 1.2, 1.39912, 1.5708 ] groundColor [ 0.105712 0.156051 0.297, 0.187629 0.255857 0.398, 0.33604 0.405546 0.542, 0.3612 0.469145 0.602, 0.39471 0.522059 0.669 ] } Viewpoint { position -3.03696 1.23703 2.63518 orientation -0.353682413209035 -0.925247679337869 -0.137205985534599 0.794027393225711 centerOfRotation -0.468598 0.0821056 -0.176938 } DEF Murcielage640 Inline { url "murcielage640.x3d" } DEF TireFrontRight Transform { translation -1.27791 0.212669 -1.00032 children DEF TireFR Transform { rotation -6.31801402105135e-15 -3.67320524464828e-06 0.999999999993254 4.28442298166309 children [ DEF TireAnimation Group { children [ DEF _1 TimeSensor { cycleInterval 1.2 loop TRUE startTime 1482895558.23001 stopTime 1482895558.23001 } DEF TireFRRotationInterpolator OrientationInterpolator { key [ 0, 0.0833333, 0.166667, 0.25, 0.5, 0.75, 1 ] keyValue [ 0 0 1 0, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 0.523598808882131, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 1.04719761776426, 3.23277830604065e-13 -3.67320545873355e-06 0.999999999993254 1.5707964266464, -1.76969154518659e-14 -3.673205453847e-06 0.999999999993254 3.14159278324361, -5.75959294770675e-19 3.67320512848233e-06 -0.999999999993254 1.5707963267949, 0 0 1 0 ] } ] } DEF tire Inline { url "tire.x3d" } ] } } DEF TireFrontRight_2 Transform { translation 1.40498 0.212669 -1.0491 children USE TireFR } DEF TireFrontRight_3 Transform { translation 1.40498 0.212669 1.05601 rotation 0 0 1 3.14159265358979 scale -1 -1 -1 children USE TireFR } DEF TireFrontRight_4 Transform { translation -1.27764 0.212669 0.988662 rotation 0 0 1 3.14159265358979 scale -1 -1 -1 children USE TireFR } DEF PhongShadingScript Script { url "ecmascript: function initialize () { Browser .setBrowserOption (\"Shading\", \"PHONG\"); } " } ROUTE _1.fraction_changed TO TireFRRotationInterpolator.set_fraction ROUTE TireFRRotationInterpolator.value_changed TO TireFR.set_rotation |
JSON Encoding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
{ "X3D": { "encoding": "UTF-8", "@profile": "Full", "@version": "3.3", "@xsd:noNamespaceSchemaLocation": "http://www.web3d.org/specifications/x3d-3.3.xsd", "JSON schema": "http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json", "head": { "meta": [ { "@name": "comment", "@content": "World of Titania" }, { "@name": "created", "@content": "Fri, 02 Mar 2018 21:39:05 GMT" }, { "@name": "creator", "@content": "Holger Seelig" }, { "@name": "generator", "@content": "Titania V4.0.6a, http://titania.create3000.de" }, { "@name": "identifier", "@content": "file:///home/holger/Projekte/Server/create3000.de/media/htdocs/components/Interpolation/OrientationInterpolator/OrientationInterpolator.O.x3d" }, { "@name": "modified", "@content": "Fri, 02 Mar 2018 22:39:35 GMT" } ] }, "Scene": { "-children": [ { "WorldInfo": { "@title": "MURCIELAGO640" } }, { "Background": { "@DEF": "Summer", "@skyAngle": [ 0.8, 1.3, 1.4, 1.5708 ], "@skyColor": [ 0.21, 0.31, 0.59, 0.33, 0.45, 0.7, 0.57, 0.66, 0.85, 0.6, 0.73, 0.89, 0.7, 0.83, 0.98 ], "@groundAngle": [ 0.659972, 1.2, 1.39912, 1.5708 ], "@groundColor": [ 0.105712, 0.156051, 0.297, 0.187629, 0.255857, 0.398, 0.33604, 0.405546, 0.542, 0.3612, 0.469145, 0.602, 0.39471, 0.522059, 0.669 ] } }, { "Viewpoint": { "@position": [ -3.03696, 1.23703, 2.63518 ], "@orientation": [ -0.353682413209035, -0.925247679337869, -0.137205985534599, 0.794027393225711 ], "@centerOfRotation": [ -0.468598, 0.0821056, -0.176938 ] } }, { "Inline": { "@DEF": "Murcielage640", "@url": [ "murcielage640.x3d" ] } }, { "Transform": { "@DEF": "TireFrontRight", "@translation": [ -1.27791, 0.212669, -1.00032 ], "-children": [ { "Transform": { "@DEF": "TireFR", "@rotation": [ -6.31801402105135e-15, -3.67320524464828e-06, 0.999999999993254, 4.28442298166309 ], "-children": [ { "Group": { "@DEF": "TireAnimation", "-children": [ { "TimeSensor": { "@DEF": "_1", "@cycleInterval": 1.2, "@loop": true, "@startTime": 1482895558.23001, "@stopTime": 1482895558.23001 } }, { "OrientationInterpolator": { "@DEF": "TireFRRotationInterpolator", "@key": [ 0, 0.0833333, 0.166667, 0.25, 0.5, 0.75, 1 ], "@keyValue": [ 0, 0, 1, 0, 3.23277830604065e-13, -3.67320545873355e-06, 0.999999999993254, 0.523598808882131, 3.23277830604065e-13, -3.67320545873355e-06, 0.999999999993254, 1.04719761776426, 3.23277830604065e-13, -3.67320545873355e-06, 0.999999999993254, 1.5707964266464, -1.76969154518659e-14, -3.673205453847e-06, 0.999999999993254, 3.14159278324361, -5.75959294770675e-19, 3.67320512848233e-06, -0.999999999993254, 1.5707963267949, 0, 0, 1, 0 ] } } ] } }, { "Inline": { "@DEF": "tire", "@url": [ "tire.x3d" ] } } ] } } ] } }, { "Transform": { "@DEF": "TireFrontRight_2", "@translation": [ 1.40498, 0.212669, -1.0491 ], "-children": [ { "Transform": { "@USE": "TireFR" } } ] } }, { "Transform": { "@DEF": "TireFrontRight_3", "@translation": [ 1.40498, 0.212669, 1.05601 ], "@rotation": [ 0, 0, 1, 3.14159265358979 ], "@scale": [ -1, -1, -1 ], "-children": [ { "Transform": { "@USE": "TireFR" } } ] } }, { "Transform": { "@DEF": "TireFrontRight_4", "@translation": [ -1.27764, 0.212669, 0.988662 ], "@rotation": [ 0, 0, 1, 3.14159265358979 ], "@scale": [ -1, -1, -1 ], "-children": [ { "Transform": { "@USE": "TireFR" } } ] } }, { "Script": { "@DEF": "PhongShadingScript", "#sourceText": [ "ecmascript:", "", "function initialize ()", "{", "\tBrowser .setBrowserOption (\"Shading\", \"PHONG\");", "}" ] } }, { "ROUTE": { "@fromNode": "_1", "@fromField": "fraction_changed", "@toNode": "TireFRRotationInterpolator", "@toField": "set_fraction" } }, { "ROUTE": { "@fromNode": "TireFRRotationInterpolator", "@fromField": "value_changed", "@toNode": "TireFR", "@toField": "rotation" } } ] } } } |