主题:  这个问题谁能解决

dmpray

职务:普通成员
等级:1
金币:0.0
发贴:1
注册:2003/1/24 11:58:29
#12003/1/24 12:08:58
我是个vrml的爱好者,所以想向你请教个问题:
现在我想用vbscript来控制vrml。
举个例子来说吧:
我在一个场景中设置了两个viewpoint,怎么用vbs来控制两个viewpoint.假设我做了两个按钮,按了其中的一个怎么触发我想的viewpoint,谢谢!
下面是原代码
#VRML V2.0 utf8

#Cosmo Worlds V2.0

Transform {
children    Shape {
appearance    Appearance {
material    Material {
}

}

geometry    Sphere {
}

}

translation    5.21541e-008 1 -0.00207311
rotation    1 0 0 0.261799
}
DEF ProxSensor_UG ProximitySensor {
enabled TRUE
center 0 15 0
size 500 30 200
}

DEF Camera_1 Viewpoint {
position    3 1 9.39693
orientation    0.757858 -0.122931 0.640733 3.54588
fieldOfView    0.785398
description "2"
}

ROUTE ProxSensor_UG.isActive TO Camera_1.set_bind

DEF ProxSensor_UG_1 ProximitySensor {
enabled TRUE
center 0 15 0
size 500 30 200
}
DEF Camera_2 Viewpoint {
position    0 3 9.39693
orientation    -1 0 0 0.349066
fieldOfView    0.785398
description "1"
}

ROUTE ProxSensor_UG_1.isActive TO Camera_2.set_bind