Brief Introduction to the 3D technology of J2EE (1)

Source: Internet
Author: User

Are you familiar with the usage of the 3D technology of j2_m3. here we will share with you that JSR184 standard M3G: Mobile3DGraphics defines a concise 3 d api interface for Java mobile apps, the j2-based program can easily use M3G to implement 3D applications, such as games.

Introduction to j23d Technology

3D technology is already very familiar to us. The most common 3D APIs include OpenGL and Microsoft Direct3D, which have been widely used in desktop games. The emergence of Mobile3DGraphicsAPI (JSR184) makes it possible to add 3D functions to mobile apps.

◆ JSR184 standard M3G: Mobile3DGraphics) defines a concise 3 d api interface for Java mobile applications. The Java program can easily use M3G to implement 3D applications, such as games. M3G is designed to be very lightweight and the complete implementation of the entire API cannot exceed kb.

M3G is an optional package of j2_based OpenGL Lite version. It has 30 classes and must support floating point operations when running CLDC1.1/CLDC2.0 ), it can be used in MIDP1.0 and MIDP2.0. Currently, M3G supported mobile phones include Nokia6230/3650/7650/6600, SiemensS65/CX65/S55/M55, Sony-EricssonK700i/P800/P900, Moto220/T720, etc. M3G is just a Java interface, and the underlying 3D engine is generally implemented by C Code. For example, many mobile phone manufacturers use the Swerve engine of SuperScape, this is a high-performance 3D engine designed specifically for mobile devices.

Similar to Microsoft's D3D, M3G supports two 3D modes: instant mode immediatemode) and retainedmode ). In the instant mode, developers must manually render each frame to get a fast speed, but the code is cumbersome. In the retain mode, developers only need to set the key frame, the remaining animations are completed by M3G, and the code is relatively simple, but the speed is slow. M3G also allows mixed use of these two modes.

◆ 3D models can be created in programs, but they are very cumbersome. Therefore, M3G provides a Loader class that allows you to directly read all 3D scenarios from a single. m3g file. You can create m3g files by using software such as 3DStudioMax.

If you are familiar with OpenGL, M3G is easy to understand. In M3G, Graphics3D is the screen interface for 3D rendering. World represents the entire 3D scenario, including Camera used to set the observer's perspective), Light), and Background) and any number of 3D objects in the tree structure. 3D objects are described by Point, Pixel), Line, Polyline, Spline), and surface Mesh in the computer. Specific storage and operations, such as rotation and projection, are matrix operations and transformations.

SUN's WTK2.2 has a built-in M3G implementation package. If WTK2.2 is installed, you can run the 3DMIDP program on the simulator. See the sample demo3d in WTK2.2.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.