摘要
分析了Java3D提供的鼠标交互功能,针对场景比较复杂,待拾取物体相对距离近的虚拟环境中用户拾取不准的问题提出了一种解决思路:在鼠标移动过程中实时创建一条连接空间中的视点与投影平面上的鼠标点的射线,检测沿射线的方向是否有物体与之相交,若有则返回距离视点最近的与射线相交物体所在的节点,并在该节点上添加一个动画效果提示用户该节点是预选节点。重点讲解了具体的实现过程,在最后的部分结合实际应用背景验证了该方法可以有效地方便用户的拾取操作。
This paper has analyzed the build-in mouse interactive function of Java3D to solve the problem that user cannot pick the objects which are too closed to each other accurately. A solution is proposed. First,a ray can be built that connects the viewpoint and the mouse point in the imageplate as the mouse is moved. Then,the ray can be checked if it intersects with any object. If yes,we can return to the object intersecting the ray and closest to the viewpoint. Finally,we can add an animation effect on the node to remind the user that this node is a pre-selected node. This paper focuses on explaining the realizing process of this method. In the final part,a practical application verifies that this method can facilitate the user in mouse picking effecttively.
出处
《计算机系统应用》
2010年第4期49-52,共4页
Computer Systems & Applications
基金
沈阳市科技局项目(1032033-1-03)
关键词
计算机图形学
计算机仿真
虚拟现实
人机交互
拾取
computer graphics
computer simulation
virtual reality
human-computer interaction
picking