JAVA 3D原创翻译 Getting Started with the Java 3D API。- 第一章 1.1 1.2

   原创中英文对照  

CHAPTER 1 Getting Started

The Java 3D API is an interface for writing programs to display and interact with three-dimensional graphics. Java 3D is a standard extension to the Java 2 JDK. The API provides a collection of high-level constructs for creating and manipulating 3D geometry and structures for rendering that geometry. Java 3D provides the functions for creation of imagery, visualizations, animations, and interactive 3D graphics application programs.

 

Java3DAPI 是一种接口用来展现和操作三维图像。Java3D是java2JDK的标准扩展。API提供一组高级的创建工具用来创建和操作并渲染3D图形和结构。Java3D提供函数,用来创建图像、可视化、动画、以及克操作的3D图形应用程序。

 

1.1 What is the Java 3D API?

 

The Java 3D API is a hierarchy of Java classes which serve as the interface to a sophisticated three dimensional graphics rendering and sound rendering system. The programmer works with high-level constructs for creating and manipulating 3D geometric objects. These geometric objects reside in a virtual universe, which is then rendered. The API is designed with the flexibility to create precise virtual universes of a wide variety of sizes, from astronomical to subatomic.

 

Java3D API是一个有层次的java类库用来充当实现高精度的三维图形和声音的渲染的接口。程序使用高级程序结构来创建和操作3D几何物体。这些几何物体存在于一个即将被渲染的虚拟世界。API被设计为有适应性的创建精确的虚拟世界,从微观到宏观。

 

Despite all this functionality, the API is still straightforward to use. The details of rendering are handled automatically. By taking advantage of Java threads, the Java 3D renderer is capable of rendering in parallel. The renderer can also automatically optimize for improved rendering performance.

 

除开所有的广泛性,API仍然易于使用。渲染的细节被自动的控制。得利与java的线程机制,java3D能够实现并行的渲染机制。渲染同样能够进行自动优化,从而改进渲染效率。

 

A Java 3D program creates instances of Java 3D objects and places them into a scene graph data structure. The scene graph is an arrangement of 3D objects in a tree structure that completely specifies the content of a virtual universe, and how it is to be rendered.

 

JAVA3D 应用程序创建JAVA3D物体的实例,并存入一个场景图形数据结构。场景图形是一个完全描述这个虚拟世界的结构及其如何被渲染的树状数据结构。

 

Java 3D programs can be written to run as stand alone applications, as applets in browsers which have been extended to support Java 3D, or both1.

 

Java3d程序可以被编写并运行为独立应用程序,或者在被扩展了支持JAVA3D功能的浏览器中运行的APPLETS。

 

1.2 The Java 3D API

 

Every Java 3D program is at least partially assembled from objects from the Java 3D class hierarchy. This collection of objects describes a virtual universe, which is to be rendered. The API defines over 100 classes presented in the javax.media.j3d package. These classes are commonly referred to as the Java 3D core classes.

 

每个java3d程序都至少部分的使用了java3D类库。这些对象描述了一个将要被渲染的虚拟世界。API包含了上百个类在vjavax.media.j3d包中。这些类被普遍认为是java3d的核心类库。

 

There are hundreds of fields and methods in the classes of the Java 3D API. However, a simple virtual universe that includes animation can be built with only a few classes. This chapter describes a minimal set of objects and their interactions to render a simple virtual universe.

 

有成百的字段和方法在java3d API的类库中,尽管如此,一个简单的包含动画的虚拟世界只需要很少的类就能够进行创建。这一章,描述了一系列最简单的对象和操作用以渲染一个简单的虚拟世界。

 

This chapter includes the development of one simple but complete Java 3D program called HelloJava3D,which displays a rotating cube. The example program is developed incrementally, and presented in multiple versions, to demonstrate each part of the Java 3D programming process. All of the programs used in this tutorial are available electronically. See the "Getting This Tutorial" section in the Preface for more information.

本章包含了一个简单但是完整的java3d程序“HelloJava3D”,它被用来显示一个旋转的合资。这个示例程序会被不断的完善开发,并产生不同的版本,用以证明java3d编程的各种处理方式和过程。本书所有的程序都有电子档,参考序言部分,获得更多信息。(图简单,不翻译序言。)

 

In addition to the Java 3D core package, other packages are used in writing Java 3D programs. One such package is the com.sun.j3d.utils package that is commonly referred to as the Java 3D utility classes. The core class package includes only the lowest-level classes necessary in Java 3D programming.

 

作为java3D核心包的扩展,其他的包也被用来编写java3d程序,这个包是com.sun.j3d.utils.这通常被认为是java3d的工具类库,核心类库包仅包含java3d编程最底层和最重要的东西。

 

The utility classes are convenient and powerful additions to the core.

 

工具类库,简单,但是是核心的强力扩展。

 

The utility classes fall into four major categories: content loaders, scene graph construction aids, geometry classes, and convenience utilities. Future functionality, such as nurbs, likely would be added as utility classes, not in the Java 3D core package. Some utility classes may be moved to the core package in future versions of the Java 3D API.

 

工具类库,分为四个主要的类别,内容读取器、场景图构建、几何图形类库以及公用的工具。未来的扩展,比如NURBS,视乎会被加入到工具类库中,不会加在核心包里。但在未来的版本里,有些工具类库的东西可能会移到核心包里。

 

Using utility classes significantly reduces the number of lines of code in a Java 3D program. In addition to the Java 3D core and utility class packages, every Java 3D program uses classes from the java.awt package and javax.vecmath package. The java.awt package defines the Abstract Windowing Toolkit (AWT). AWT classes create a window to display the rendering. The javax.vecmath package defines vector math classes for points, vectors, matrices, and other mathematical objects.

 

使用工具类库意味着在java3D编程中减少大量的代码量。除了java3d的核心和工具包以外,每个java3d程序都使用java.awt包和javax.vecmath包。Java.awt包定义了抽象窗口工具。AWT创建视窗用来显示渲染的图形。Javax.vecmath包定义了矢量的数学类库,如点、向量、矩阵和其他数学物体。

 

In the rest of the text, the term visual object is used to refer to an ‘object in the scene graph’ (e.g., a cube or a sphere). The term object is used only to refer to an instance of a class. The term content is used to refer to visual objects in a scene graph as a whole.

 

在以后的文章中,可视物体(Visual Objects)是指在场景图中的物体。Object仅指类的实例。Content指可视物体在场景图的整体。

 

 

                     本文为本人原创翻译,未经许可,不得转载。                         
                     仅供爱好者学习使用,喜欢可以收藏,不喜勿扰。                   
                     英语水平不高,如果纰漏欢迎高手斧正,感激先。                   

下集预告:1.3 创建场景图                                                                      

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值