vrml 里如何获取正在运动物体的位置?比如物体在平移或绕一个轴旋转.
来源:学生作业帮 编辑:神马作文网作业帮 分类:数学作业 时间:2024/11/10 07:05:27
vrml 里如何获取正在运动物体的位置?比如物体在平移或绕一个轴旋转.
HTML>
function start() {
timerID1 = setTimeout("disp1()",100);
}
function disp1() {
ux=Cortona1.Engine.Nodes('PS').Fields('position_changed').x;
uy=Cortona1.Engine.Nodes('PS').Fields('position_changed').y;
uz=Cortona1.Engine.Nodes('PS').Fields('position_changed').z;
image2.style.left=10 * ux + 360;
image2.style.top =10 * uz + 160;
document.F1.T1.value = Math.round(100*ux);
document.F1.T2.value = Math.round(100*uy);
document.F1.T3.value = Math.round(100*uz);
timerID2 = setTimeout("disp1()",200);
}
SAMPLE12:
I am Here
function start() {
timerID1 = setTimeout("disp1()",100);
}
function disp1() {
ux=Cortona1.Engine.Nodes('PS').Fields('position_changed').x;
uy=Cortona1.Engine.Nodes('PS').Fields('position_changed').y;
uz=Cortona1.Engine.Nodes('PS').Fields('position_changed').z;
image2.style.left=10 * ux + 360;
image2.style.top =10 * uz + 160;
document.F1.T1.value = Math.round(100*ux);
document.F1.T2.value = Math.round(100*uy);
document.F1.T3.value = Math.round(100*uz);
timerID2 = setTimeout("disp1()",200);
}
SAMPLE12:
I am Here