如何在同一个鼠标事件上同时旋转两个不同的X3D场景?

时间:2014-10-13 09:01:49

标签: javascript jquery html x3d x3dom

我需要一些java脚本或jQuery吗?我只是问,因为我需要这样的东西http://examples.x3dom.org/cadViewer/slimViewerConrod/index.html。 如您所见,您可以使用轴(辅助场景)和相同的鼠标事件一起旋转主对象(主场景)。我是X3DOM的新手,我只是想问,因为我不知道它是如何工作的。如果有帮助,我的X3D场景是:

<X3D id="x3dElement"> <Scene id='scene'>
<Viewpoint id="part7" position=" 0.028793486820279934 0.06097637432245687 -0.009845212995355457" description="camera"></Viewpoint> <Group id='alles' children='gr1 gr2 gr3' render='true'> <Group id='gr1' children='gr2 gr3' render='true'> <transform translation='0 0 0' rotation='0 0 0 0'> <Inline nameSpaceName="case" mapDEFToID="true" url="case1.x3d"/> </transform>
<transform translation='0 0.02 0.031' Rotation='0.86603 0 0 0'> <transform Rotation='0 0 0 0'> <Inline nameSpaceName="switch" mapDEFToID="true" url="switch1.x3d"/> <Inline id="b_sauele" nameSpaceName="inline" mapDEFToID="true" url="inlineSrc/bSauele/bolt1.x3d" onload="init()" ></Inline>
</transform> </transform> <transform translation='-0.03 -0.0155 0.024' rotation='0 1 0 1.5708'> <transform rotation='1 0 0 3.1416'> <Inline nameSpaceName="socket" mapDEFToID="true" url="socket2.x3d"/> </transform> </transform> <transform translation='-0.03 -0.0155 -0.024' rotation='1 0 0 3.1416'> <transform rotation='0 1 0 1.5708'> <Inline nameSpaceName="socket" mapDEFToID="true" url="socket2.x3d"/> </transform> </transform> <transform translation='0.03 -0.0155 -0.024' rotation='1 0 0 3.1416'> <transform rotation='0 1 0 1.5708'> <Inline nameSpaceName="socket" mapDEFToID="true" url="socket2.x3d"/> </transform> </transform> <transform translation='0.03 -0.0155 0.024' rotation='1 0 0 3.1416'> <transform rotation='0 1 0 1.5708'> <Inline nameSpaceName="socket" mapDEFToID="true" url="socket2.x3d"/> </transform> </transform> </Group> <Group id='gr2' children='gr3' render='true'> <transform translation='0 -0.018 -0.01988' Rotation='0 0 0 0'> <Inline nameSpaceName="head" mapDEFToID="true" url="head1.x3d"/> </transform> </Group> <Group id='gr3' render='true'> <transform translation='0 -0.05 -0.0275' Rotation='0 0 0 0'> <Inline nameSpaceName="shaft" mapDEFToID="true" url="shaft2.x3d"/> </transform> <transform translation='0.0129 0.0129 -0.009' Rotation='0 1 0 3.1416'> <Inline nameSpaceName="bolt" mapDEFToID="true" url="bolt1.x3d"/>
</transform> <transform translation='-0.0129 0.0129 0.009' Rotation='0 1 0 3.1416'> <Inline nameSpaceName="bolt" mapDEFToID="true" url="bolt1.x3d"/> </transform>
</Group>
</Group>
</Scene> </x3d>
<X3D id='CoordinateAxes' showStat='false' showLog='false'> <scene id="helper_scene"> <viewpoint id="coordinateAxesViewpoint" centerOfRotation='0 0 0' position='0 0 3'></viewpoint> <Inline mapDEFToID="true" nameSpaceName="CoordinateAxes" url="data/CoordinateAxes.x3d"></Inline> </scene> </X3D>'>

0 个答案:

没有答案