Title: Viewpoint and Animation
1Viewpoint and Animation
2(No Transcript)
3(No Transcript)
4(No Transcript)
5Sensors
DEF BusTimer TimeSensor cycleInterval 120 loop
FALSE DEF BusSensor ProximitySensor center 0
1.5 0 size 8 3 3
6Proximity Sensor
ProximitySensor exposedField SFVec3f
center 0 0 0 exposedField SFVec3f size 0 0
0 exposedField SFBool enable
TRUE evenOut SFBool isActive eventOut SFVec3f po
sition_changed eventOut SFRotation orientation_ch
anged eventOut SFTime enterTime eventOut SFTime
exitTime
7(No Transcript)
8DEF BusPosition PositionInterpolatorkey 0,
.01, .02, .03, .04, .05, .06, .07, .08, .09,.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, 1.0
9keyValue 0 0 -1.5, 8 0 -1.5, 16 0 -1.5, 25 0
-1.5, 32 0 -1.5, 40 0 -1.5, 48 0 -1.5, 56 0
-1.5, 64 0 -1.5, 72 0 -1.5, .9 80 0 -1.5, 88 0
-1.5, 98.5 0 -1.5, 98.5 0 -9.5, 98.5 0 -17.5,
.12 go north 98.5 0 -25.5, 98.5 0 -33.5, 98.5 0
-41.5, 98.5 0 -45.5, 96 0 -48.5,.19 96 0 -48.5,
96 0 -48.5, 88 0 -48.5, 78 0 -48.5, 68 0 -48.5,
go west 58 0 -48.5, 48 0 -48.5, 38 0 -48.5, 28 0
-48.5, 18 0 -48.4,.29 8 0 -48.5, -8 0 -48.5, -18
0 -48.5, -28 0 -48.5, -38 0 -48.5, -48 0 -48.5,
-58 0 -48.5, -68 0 -48.5, -78 0 -48.5, -88 0
-48.5, -96 0 -48.5, -96 0 -48.5, -96 0 -48.5,
-98.5 0 -40, -98.5 0 -30, .43 go south -98.5 0
-20, -98.5 0 -10, -98.5 0 0, -98.5 0 8, -98.5 0
16, .49 -98.5 0 24, -98.5 0 32, -98.5 0 48,
-98.5 0 48, -98.5 0 48, .52 go to east -88 0
48.5, -80 0 48.5, -72 0 48.5, -64 0 48.5, -56 0
48.5,.59 -48 0 48.5, -40 0 48.5, -32 0 48.5,
-24 0 48.5, -16 0 48.5, -8 0 48.5, 6 0 48.5, 14 0
48.5, 24 0 48.5, 34 0 48.5,44 0 48.5, 54 0 48.5,
64 0 48.5, 74 0 48.5, 84 0 48.5, 96 0 48.5, 96 0
48.5, 96 0 48.5, 98.5 0 40, 98.5 0 32, .79, .78
go north 98.5 0 24, 98.5 0 16, 98.5 0 8, 98.5 0
-1.5, 90 0 -1.5, .84 go west 80 0 -1.5, 70 0
-1.5, 60 0 -1.5, 50 0 -1.5, 40 0 -1.5, .89 30 0
-1.5, 20 0 -1.5, 10 0 -1.5, 0 0 -1.5, -8 0 -1.5,
-8 0 -1.5, -8 0 -1.5, -8 0 -1.5, -8 0 -1.5, -8
0 -1.5, -5 0 -1.5 1.0
10DEF BusRotation OrientationInterpolator key
0, .01, .02, .03, .04, .05, .06, .07, .08, .09,
.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, .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, 1.0, 1.01
11keyValue 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0
1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0
0, .09 0 1 0 0, 0 1 0 0, 0 1 0 1.5708, 0 1 0
1.5708, 0 1 0 1.5708, 0 1 0 1.5708,0 1 0 1.5708,
0 1 0 1.5708, 0 1 0 1.5708, 0 1 0 3.1416, .19 0
1 0 3.1416,0 1 0 3.1416,0 1 0 3.1416,0 1 0
3.1416,0 1 0 3.1416, 0 1 0 3.1416,0 1 0 3.1416,0
1 0 3.1416,0 1 0 3.1416,0 1 0 3.1416,.29 0 1 0
3.1416,0 1 0 3.1416,0 1 0 3.1416,0 1 0 3.1416,0 1
0 3.1416, 0 1 0 3.1416,0 1 0 3.1416,0 1 0
3.1416,0 1 0 3.1416,0 1 0 3.1416,.39 0 1 0
3.1416,0 1 0 3.1416,0 1 0 3.1416,0 1 0 -1.5708,0
1 0 -1.5708, 0 1 0 -1.5708,0 1 0 -1.5708, 0 1 0
-1.5708, 0 1 0 -1.5708, 0 1 0 -1.5708,.49 0 1 0
-1.5708,0 1 0 -1.5708, 0 1 0 0, 0 1 0 0, 0 1 0
0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0,
.59 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0
0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0
0,.69 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0
0, 0 1 0 0, 0 1 0 0, 0 1 0 0, 0 1 0 1.5708, 0 1 0
1.5708, .79 0 1 0 1.5708, 0 1 0 1.5708, 0 1 0
1.5708, 0 1 0 1.5708, 0 1 0 3.1416, 0 1 0 3.1416,
0 1 0 3.1416, 0 1 0 3.1416, 0 1 0 3.1416, 0 1 0
3.1416, .89 0 1 0 3.1416, 0 1 0 3.1416, 0 1 0
3.1416, 0 1 0 3.1416, 0 1 0 3.1416, 0 1 0 2.4, 0
1 0 1.5708, 0 1 0 1, 0 1 0 .5, 0 1 0 0, 0 1 0 0,
0 1 0 0 bus turns around
12ROUTE BusSensor.enterTime TO BusTimer.startTime RO
UTE BusTimer.fraction_changed TO
BusPosition.set_fraction ROUTE BusTimer.fraction_c
hanged TO BusRotation.set_fraction ROUTE
BusPosition.value_changed TO bus1.set_position ROU
TE BusRotation.value_changed TO bus1.set_rotation
Position Interpolator
Bus Position
Proximity Sensor
Time Sensor
Rotation Interpolator
Bus Rotation
13ViewPoint
Viewpoint eventIn SFBool set_bind exposedFi
eld SFFloat fieldOfView 0.78398 exposedField SF
Bool jump TRUE exposedField SFRotation orientati
on 0 0 1 0 exposedField SFVec3f position 0 0
10 field SFString eventOut SFTime bindTim
e eventOut SFBool isBound
14ROUTE BusPosition.value_changed TO
viewpoint.set_position ROUTE BusRotation.value_cha
nged TO viewpoint.set_orientation PROTO
viewpoint exposedField SFVec3f position 0 0
0 exposedField SFRotation orientation 0 0 1 0
Transform translation 0 1.5 0 children Viewpoint
position IS position orientation IS orientation