1. Technical Field
Embodiments of the present disclosure relates to application interfaces, and more particularly, to an embedded device and a three-dimensional (3D) user interface realization method in the embedded device.
2. Description of Related Art
Extensible three-dimensional (X3D) is the international organization for standardization (ISO) standard extensible markup language (XML)-based file format for representing 3D computer graphics, the successor to the virtual reality modeling language (VRML). On one hand, X3D is widely used for rendering virtual 3D scenes in computers. On the other hand, embedded devices, such as mobile phones, personal digital assistants, and set-top boxes, are widely used by people. What is desired, therefore, is a user interface for realizing rendering virtual 3D scenes in the embedded devices uses the X3D standard.
The disclosure, including the accompanying drawings in which like references indicate similar elements, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word “module,” as used hereinafter, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or Assembly. One or more software instructions in the modules may be embedded in firmware. It will be appreciated that modules may comprised connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
The format supporting module 11 sets programming languages supported by the 3D user interface 10. In this embodiment, the 3D user interface 10 supports programming languages, such as virtual reality modeling language (VRML), extensible markup language (XML), JavaScript, Java, and Java3D, which are supported by the X3D standard.
The file embedding module 12 obtains an X3D file created by a user, and uses a programming language, which is supported by the 3D user interface 10 and selected by the user, to embed the X3D file into a hypertext mark-up language (HTML) file. The X3D file, which defines the 3D scene to be rendered, may be a file having a suffix such as “.wrl,” “.x3d,” or “.x3dv.” 3D model tools, such as MAYA, Blender, and AC3D, can be used to create the X3D file. In this embodiment, the X3D file is stored in the storage device 20.
The browser plug-in 130 parses the X3D file in the HTML file. For example, the browser plug-in 130 performs a syntax check to the X3D file, and converts a statement format of the X3D file to a statement format that can be identified by the Web page browser 13. For example, the browser plug-in 130 adds a pair of element tags with a “start tag” and an “end tag” to each statement in the X3D file, where a tag is a keyword enclosed in angle brackets, so that each statement in the X3D file is converted to a HTML element, such as “<tag>content to be rendered</tag>.”
The graphics library interface converting module 14 converts an open graphics library (Open GL) to an open graphics library for embedded systems (Open GL ES). The Open GL is a standard specification defining a cross-language, cross-platform application programming interface for writing applications that produce 2D and 3D computer graphics. The Open GL consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. In this embodiment, the conversion includes deleting some functions in the Open GL, such as functions for drawing quadrilaterals and polygons, to create a flexible and powerful low-level 3D user interface 10 between software and graphics acceleration in the embedded device 100. Therefore, the Open GL ES is a subset of the Open GL.
The rendering module 15 executes corresponding functions in the Open GL ES according to the parsing results from the browser plug-in 130, to render the 3D scene defined by the X3D file in the HTML file. Then the Web page browser 13 displays the HTML file with the 3D scene on the display 40.
In block S301, the format supporting module 11 sets programming languages supported by the 3D user interface 10. As mentioned above, the format supporting module 11 sets the programming languages, such as VRML, XML, JavaScript, Java, and Java3D, which are supported by the X3D standard to be supported by the 3D user interface 10.
In block S303, the file embedding module 12 obtains an X3D file from the storage device 20, and embeds the X3D file into a HTML file using a programming language, which is supported by the 3D user interface 10 and selected by the user. The X3D file, which defines the 3D scene to be rendered, may be a file having a suffix such as “.wrl,” “.x3d,” or “.x3dv.” 3D model tools, such as MAYA, Blender, and AC3D, can be used to create the X3D file.
In block S305, the browser plug-in 130 parses the X3D file in the HTML file. In this embodiment, the browser plug-in 130 performs a syntax check to the X3D file, and converts a statement format of the X3D file to a statement format that can be identified by the Web page browser 13. For example, the browser plug-in 130 adds a pair of element tags with a “start tag” and an “end tag” to each statement in the X3D file, where a tag is a keyword enclosed in angle brackets, so that each statement in the X3D file is converted to a HTML element, such as “<tag>content to be rendered</tag>.”
In block S307, the graphics library interface converting module 14 converts the Open GL to the Open GL ES. As mentioned above, the Open GL ES is a subset of the Open GL. The conversion includes deleting some functions in the Open GL, such as functions for drawing quadrilaterals and polygons, to create a flexible and powerful low-level 3D user interface 10 between software and graphics acceleration in the embedded device 100.
In block S309, the render module 15 executes corresponding functions in the Open GL ES according to parsing results from the browser plug-in 130, to render the 3D scene defined by the X3D file in the HTML file.
In block S311, the Web page browser 13 displays the HTML file with the 3D scene on the display 40.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201010249714.8 | Aug 2010 | CN | national |