home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 1996 World Exposition
/
park.org.s3.amazonaws.com.7z
/
park.org.s3.amazonaws.com
/
Japan
/
Sony
/
3DWorld
/
ZEIT
/
VRML
/
main.tcl
< prev
next >
Wrap
Text File
|
2017-09-21
|
1KB
|
50 lines
set B 0
set R 0
set Person 0
set cnt 0
set endflg 0
proc mot {obj ev ud} {
global B R Person cnt endflg
global vsContinue vsCSLocal vsRelative vsCSWorld vsAbsolute
if {$cnt < 36} {
vsRotateAngle $B 0 -10 0 $vsCSLocal $vsRelative
vsRotateAngle $R 0 -10 0 $vsCSLocal $vsRelative
vsTranslate $Person 0 0 -4 $vsCSWorld $vsRelative
} else {
vsRotateAngle $B 0 -1 0 $vsCSLocal $vsRelative
vsRotateAngle $R 0 -1 0 $vsCSLocal $vsRelative
vsGetObjWRT $Person x y z x1 y1 z1 x2 y2 z2 x3 y3 z3
if {$z > 5.0} {
vsTranslate $Person 0 0 -1 $vsCSWorld $vsRelative
} else {
if {$endflg == 0} {
vsWwwOpenUrl "e-room.wrl"
}
}
}
incr cnt
return $vsContinue
}
proc init {obj ev ud} {
global B R Person
global vsCSWorld vsRelative vsTclScript vsPeriodicTask
set B [vsGetObjByName $obj "B" -r]
set R [vsGetObjByName $obj "R" -r]
vsTranslate $B 0 -10 0 $vsCSWorld $vsRelative
vsTranslate $R 0 -10 0 $vsCSWorld $vsRelative
vsRotateAngle $B 30 0 0 $vsCSWorld $vsRelative
vsRotateAngle $R 30 0 0 $vsCSWorld $vsRelative
set Person [vsGetPerson]
vsAddTimeOutHandler $obj 500 $vsTclScript "" mot "" $vsPeriodicTask
}