冥王生活

您现在的位置是:首页 > 科技生活 > 正文

科技生活

m3g是什么文件(m3是什么格式)

admin2023-02-18科技生活110

求一篇有关J2ME的外文翻译

附录 英文文献及翻译

What's New in the J2ME Wireless Toolkit 2.2

by Jonathan Knudsen

June 2004

The award-winning J2ME Wireless Toolkit has become the de facto standard toolkit for developing applications for Java 2, Micro Edition (J2ME). Since its debut in 2000, the toolkit has evolved to keep pace with the rapidly changing face of mobile Java technology. Don't be misled by the small change in version number from 2.1. The new toolkit supports new optional APIs specified through the Java Community Process (JCP) in four vital areas: 3D graphics, multimedia messaging, Bluetooth networking, and data management. In this article I'll describe these new APIs and show you how they're implemented in the toolkit.

Before I do, take a moment to admire the updated DefaultColorPhone emulator skin. Since version 2.1, this skin has gotten a larger screen (320 x 240, or QVGA) and far more colors (4096 instead of 256).

Mobile 3D Graphics

JSR 184, the Mobile 3D Graphics API for J2ME (M3G), provides three-dimensional graphics functionality in a compact package that's appropriate for devices that support the most widely adopted J2ME software stack, the Connected, Limited Device Configuration (CLDC) and the Mobile Information Device Profile (MIDP). The API provides two APIs for displaying 3D content. The immediate mode API makes it possible for applications to create and manipulate 3D elements directly. On top of this layer is a scene graph API, also called retained mode, that makes it possible to load and display entire 3D scenes you've designed ahead of time. Applications may use whichever API is most appropriate, or a combination of retained mode and immediate mode. The JSR 184 specification also defines a file format for scene graphs, .m3g.

The toolkit's emulator fully supports JSR 184 and you'll find several MIDlets that show off the API's capabilities in the Demo3D project.

Life3D demonstrates the use of immediate mode:

PogoRoo is an interactive demonstration that features a bouncing kangaroo:

Finally, retainedmode shows how to load and render a scene graph file:

Multimedia Messaging

The J2ME Wireless Toolkit has long supported JSR 120, version 1.1 of the Wireless Messaging API (WMA); the new release supports WMA 2.0 (JSR 205), which expands WMA's capabilities to include Multimedia Messaging.

In the toolkit, messaging takes place in a simulated environment. If you run the emulator multiple times, applications on the emulators can communicate with each other, and you can use the toolkit's handy WMA Console utility to exchange messages with the applications in the same environment. Messages may conform to any of three standard protocols: Short Message Service (SMS), Cell Broadcast Service (CBS), or - new in version 2.2 of the toolkit - Multimedia Messaging Service (MMS).

You can address MMS messages and add any collection of files to the message.

Furthermore, the network monitor now displays MMS messages that are sent or received by the emulator.

Bluetooth and OBEX

The J2ME Wireless Toolkit emulator supports JSR 82, the Java APIs for Bluetooth, which includes two independent APIs:

The Bluetooth API provides an interface to Bluetooth wireless

networking, including device discovery and data exchange.

The OBEX API allows applications to use the Object Exchange (OBEX)

protocol over Bluetooth or other communication channels.

The toolkit allows you to develop and test applications that use Bluetooth technology even if you don't have any actual Bluetooth hardware. The toolkit simulates a Bluetooth environment, in which you can run multiple emulator instances that can discover each other and exchange data using the Bluetooth API.

An example application, BluetoothDemo, shows how to transfer imagesfrom one emulator to another.

The J2ME Wireless Toolkit implements OBEX transfer over simulated Bluetooth and infrared connections. The simulated infrared connection

follows the IrDA standard defined by the Infrared Data Association. The toolkit simulates infrared transfers between multiple running emulators.

You can configure the Bluetooth and OBEX environment using the Bluetooth/OBEX tab in the toolkit preferences. This controls such

parameters as how long the emulator attempts to discover other devices in the simulated Bluetooth environment and the maximum packet size. See the toolkit's User's Guide for more details.

Local Files and Personal Information

The J2ME Wireless Toolkit supports JSR 75, the PDA Optional Packages for the J2ME Platform, which also includes two independent APIs:

The FileConnection API gives MIDlets access to a local file system on the device.

The Personal Information Management (PIM) optional package includes APIs for manipulating contact lists, calendars, and to-do lists.

A real device may have a local file system which can be accessed using the FileConnection API. In the J2ME Wireless Toolkit emulator, a simulated file system is maintained as a directory on your hard disk.

The files your application can access using FileConnection are stored in subdirectories of toolkit\appdb\skin\filesystem., where toolkit is the installation directory of the J2ME Wireless Toolkit and skin is the name of the emulator skin. For example, the DefaultColorPhone emulator skin comes with a root directory installed called root1, which contains a file called Readme. The file's full path is toolkit\appdb\DefaultColorPhone\filesystem\root1\Readme.

You can manage the root directories that are available by choosing MIDlet External events from the emulator window's menu. You'll see a small utility window for adding and removing roots. These actions will also generate events for a registered listener object.

In a real device, personal information might be stored in a proprietary

format in memory. The emulator uses a directory on your hard disk to

contain this information, accessible using the PIM API. All information is stored in toolkit\appdb\pim. Lists are stored in subdirectories of the contacts, events, and todo directories. For example, a contact list called Contacts is contained in toolkit\ appdb\ pim\ contacts\ Contacts.

Inside the list directory, items are stored in standard formats specified by the Internet Mail Consortium. Contacts are stored in vCard format, while calendar and to-do items are both stored in vCalendar format.

Summary

The J2ME Wireless Toolkit 2.2 is much more than an incremental update of an excellent tool. It includes support for four exciting new

specifications that together define six new APIs. As the world of wireless Java technology rapidly evolves, the J2ME Wireless Toolkit keeps pace and contains all the tools you need for

About the Author:

Jonathan Knudsen [e-mail] [home page] is the author of several books, including Wireless Java (second edition), The Unofficial Guide to LEGO MINDSTORMS Robots, Learning Java (second edition), and Java 2D Graphics. Jonathan has written extensively about Java and Lego robots, including articles for JavaWorld, EXE, NZZ Folio, and the O'Reilly Network. Jonathan holds a degree in mechanical engineering from Princeton University.

译文

J2ME Wireless Toolkit 2.2 新改进

作者:Jonathan Knudsen

2004 年 6 月

屡获殊荣的 J2ME Wireless Toolkit 已经成为 J2ME 开发应用程序的事实标准工具包。自从 2000 年初次亮相以来,该工具包一直在发展以赶上移动 Java 技术外观上快速改变的步伐。不要被从 2.1 版本以来的小改变所误导。新的工具包在四个重要的领域支持 Java Community Process (JCP) 所指定的新的可选 API:3D 图形、多媒体通信、蓝牙连网(Bluetooth networking)和数据管理。本文将描述这些新的 API 并且向您展示如何在工具包中实现他们。

在这之前,让我们赞美一下更新后的 DefaultColorPhone 模拟器皮肤,自从 2.1 版本以来,该皮肤已有了一个更大的屏幕(320 x 240, 或 QVGA)和更多的颜色(4096 色而不是 256 色)。

移动 3D 图形

JSR 184, 即 Mobile 3D 图形 API for J2ME (M3G) 在一个集成软件包中提供了三维图形功能,适用于支持最为广泛采用的 J2ME 软件栈、有限连接设备配置(CLDC)和移动信息设备描述(MIDP)的设备。API 为显示 3D 内容提供了两种 API。立即模式 API 使应用程序能够直接创建和操纵 3D 元素。这一层之上是一个场景图 API,也称为保留模式,能够提早加载并显示已设计的整个 3D 场景。应用程序可以采用最适合的 API,或保留模式与立即模式的组合。JSR 184 规范还为场景图定义了一种文件格式-.m3g。

该工具包的模拟器全面支持 JSR 184,并且有几个 MIDlet 展示了 API 在 Demo3D 项目中的功能。Life3D 演示了立即模式的使用。PogoRoo 是一个的交互的演示,特点是显示一只跳跃的袋鼠:

多媒体通信

J2ME Wireless Toolkit 长期支持 JSR 120、Wireless Messaging API(WMA)的1.1版本;新版本支持 WMA 2.0(JSR 205),其把 WMA 的功能扩展到包括多媒体通信。

在工具包中,通信发生于模拟的环境中。如果多次运行模拟器,模拟器上的应用程序能够相互通信,并且可以使用工具包方便的 WMA Console 实用程序在同一环境中与应用程序交换消息。通信可以遵照以下三种标准协议之一:短消息服务(Short Message Service,SMS)、蜂窝广播服务(Cell Broadcast Service,CBS)或工具包 2.2 版本中的新协议-多媒体通信服务(MMS)。

您可以标记 MMS 消息,并向消息添加任何文件集合。

而且,现在网络监视器能够显示模拟器发送或接收的 MMS 消息。

蓝牙和 OBEX

J2ME Wireless Toolkit 模拟器支持 JSR 82,即 Java API for Bluetooth,包括两个独立的 API:

蓝牙 API 为蓝牙无线网络提供了接口,包括设备恢复和数据交换。

OBEX API 允许应用程序在蓝牙或其他通信信道上使用对象交换(Object Exchange,OBEX)协议。

该工具包允许在即使没有实际蓝牙硬件的情况下,也可以开发和测试采用蓝牙技术的应用程序。该工具包模拟蓝牙环境,您可以在该环境中运行可相互发现的多个模拟器实例和使用蓝牙 API 交换数据。

应用程序实例 BluetoothDemo 显示了如何从一个模拟器将图像传输到另一个模拟器。

J2ME Wireless Toolkit 通过模拟的蓝牙和红外连接上实现 OBEX 传输。模拟的红外连接遵循 Infrared Data Association 定义的 IrDA 标准。工具包在多个运行的模拟器之间模拟红外传输。

您可以使用工具包参数中的 Bluetooth/OBEX 标签来配置蓝牙和 OBEX 环境。其控制了诸如模拟器在模拟的蓝牙环境中试图用多长时间去发现其他设备,以及最大数据包大小等参数。请参见工具包的用户指南获取更多的详细信息。

本地文件和个人信息

J2ME Wireless Toolkit 支持 JSR 75,即 PDA Optional Packages for the J2ME Platform,它也包括两个独立的 API:

FileConnection API 提供了 MIDlet 对设备上本地文件系统的访问。

Personal Information Management (PIM) 可选软件包包括用于操纵联系人列表、日程安排和计划列表的 API。

一台真实的设备可能有一个能通过使用 FileConnection API 访问的本地文件系统。在 J2ME Wireless Toolkit 模拟器中,模拟的文件系统作为硬盘上的一个目录存在。

应用程序使用 FileConnection 可访问的文件都存放在子目录 toolkit\appdb\skin\filesystem.中,此处 toolkit 是 J2ME Wireless Toolkit 的安装目录,skin 是模拟器皮肤的名称。例如,DefaultColorPhone 模拟器皮肤随安装根目录 root1 而产生,包含一个 Readme 文件。文件的完整路径为toolkit\appdb\DefaultColorPhone\filesystem\root1\Readme。

您可以从模拟器窗口的菜单种选择 MIDlet External events 来管理可用的根目录。您将看到一个添加和删除根目录的小的实用程序窗口。这些操作也将为 registered listener 对象生成事件。

在真实的设备上,个人信息可能以专有格式存储在内存中。模拟器使用硬盘中的一个目录来存放这些信息,可使用 PIM API 来访问。所有的信息存储在 toolkit\appdb\pim 目录中。列表存储在联系人、事件和计划目录的子目录中。例如,联系人列表 Contacts 位于 toolkit\appdb\pim\contacts\Contacts 目录中。

在列表目录内,列表项以 Internet Mail Consortium 指定的标准格式存储。联系人以 vCard 格式存储,日历和计划项都以 vCalendar 格式存储。

结束语

J2ME Wireless Toolkit 2.2 不仅仅是一个出色工具的增量更新。它包括了对令人激动的四项新规范的支持,同时定义了六种新的 API。随着无线 Java 技术世界的快速发展,J2ME Wireless Toolkit 紧紧跟随发展的步伐并且包含您所需的全部工具。

关于作者

Jonathan Knudsen[电子邮件] [主页],有多本著作,包括:Wireless Java (second edition)、The Unofficial Guide to LEGO MINDSTORMS Robots、Learning Java (second edition) 和 Java 2D Graphics 。Jonathan 在 Java 和 Lego 机器人领域编写了大量的文章,包括 JavaWorld、 EXE、 NZZ Folio 和 the O'Reilly Network 方面的文章。作者拥有普林斯顿大学的机械工程学位。

m3g格式的文件怎么打开

目前已经有很多m3g文件的导出工具,包括:M3GToolkit, Juinness 以及HI Corp Mascot v5 M3G Converter等免费或商业软件,他们可以把各种3D模型文件如3ds, max, obj等转换成为无线应用当中可以识别的m3g格式的文件。在MIDP当中调用。在本文中,我们使用Blender作为建模软件,并且使用其导出插件制作m3g文件。

3DMAX软件如何打开m3g模型文件

3dsmax里打开3dl格式文件可以用3d溜溜资源管理器将模型导入。

首先下载3dl格式文件,将其导入溜溜资源管理系统,然后在模型类别里将模型单击选择,拖入场景即可。

文件扩展名被添加m3g6lt是怎么回事?是什么电脑病毒?怎么办?

勒索病毒,这个病毒在把文件加密以后会自我删除。一般通过邮件传播。

现在你重新建一个文件应该不会再被加密了,但是被加密的文件不可恢复。

只能给黑客付款获取秘钥才能解密,不推荐这种方式,因为有人给了钱也没有解密,但是这确实是唯一的恢复办法。

发表评论

评论列表

  • 这篇文章还没有收到评论,赶紧来抢沙发吧~