机械英文文献翻译-延长搅拌机 第4页
example, if a camera is selected the panel will display components which allow the modeler to change the focal length and viewing angle of the camera, but these components will not appear if an object of another type is selected.
Figure 6 shows a screen shot of the button space which is used to edit properties for a haptic mesh. It includes user-interface panels which allow a modeler to change the graphical shading properties of the mesh, perform simple re-meshing operations, and to modify the haptic properties of the selected mesh.
HAMLAT follows the context-sensitive behavior of Blender by only displaying the haptic editing panel when a polygonal mesh object is selected. In the future, this
panel may be duplicated to support haptic modeling for other object types, such as NURB surfaces. The Blender framework offers many user-interface components (e.g., buttons, sliders, pop-up menus) which may be used to edit the underlying data structures. The haptic properties for mesh objects are editable using sliders or by entering a float value into a text box located adjacent to the slider. When the value of the slider/text box is changed, it triggers an event in the Blender window sub-system. A unique identifier that the event is for the haptic property panel and the HAMLAT code should be called to update haptic properties for the currently selected mesh.
C Hapto-Visual Rendering
Blender currently support graphical rendering of scenes using an internal render or an external renderer (e.g., [4]). In this spirit, the haptic renderer used by HAMLAT has been developed as an exteral renderer. It uses the OpenGL and OpenHaptics toolkit [5] to perform graphic and hapic rendering ,respectively.
The 3D scene which is being modeled is rendered using two passes: the first pass render the scene graphically, and the second pass renders it haptically. The second pass is required because the OpenHaptics toolkit intercepts commands send to the OpenGL pipeline and uses them to display the scene using haptic rendering techniques. In this pass, the haptic properties of each mesh object are used much in the same way color and lighting are used by graphical rendering they define the
type of material for each object. To save CPU cycles, the lighting and graphical material properties are excluded from the haptic rendering pass.
Figure 7 shows source code which is used to apply the material properties during the haptic rendering pass. The haptic renderer is independent from the Blender
framework in that it exists outside the original source code. However, it is still heavily dependent on Blender data structures and types.
D. Scripting
The Blender Python (BPy) wrapper exposes many of the internal data structures, giving the internal Python scripting engine may access them. Similar to the data
structures used for representing mesh objects in the native Blender framework, wrappers allow user defined scripts to access and modify the elements in a 3D scene.
The hapic properties of a mesh object may be accessed through the Mesh wrapper class. A haptics attribute has been added to each of these classes and accessed through the Python scripting system. Figure 8 shows Python code to read the haptic properties from a mesh object and export to a file. Similar code is used to import/export HAML scenes from/to files.
An import script allows 3D scenes to be read from a HAML file and reproduced in the HAMLAT application; export script allows 3D scenes to be written to a HAML file, including haptic properties, and used in other
HAML applications.
The BPy wrappers also expose the Blender windowing system. Figure 9 shows a panel which appears when the user exports a 3D scene to the HAML file format. It
allows the user to specify supplementary information about the application such as a description, target hardware, and system requirements.
These are fields defined by the HAML specification [2] and are included with the authored scene as part of the HAML file format. User-interface components displayed on this panel are easily extended to agree with the future revisions of HAML.
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页
机械英文文献翻译-延长搅拌机 第4页下载如图片无法显示或论文不完整,请联系qq752018766