Web Hosting Tomcat, Java, JSP, Servlets, J2EE, PHP, MySQL

Cheap web hosting provider

09
Nov

Black Art of Java Game Programming by Joel

Constructing a Simple 3D Pipeline The process of rendering a 3D scene can be divided into several discrete steps, also referred to as the 3D pipeline. In this pipeline a polyhedron s vertices will be transformed several times and then ultimately projected to the screen. At this point, the paint() method can be called with the resulting two-dimensional coordinates, and a polyhedron can render itself. Let s examine a simple 3D pipeline that assumes that all polyhedrons in a scene are visible, just to get acquainted with the different transforms. In a more complex pipeline, we would try to exclude as many objects as possible before they even get inside the pipeline, so that no unnecessary calculations are done. There are some really good methods of doing that. The Four Coordinate Systems The 3D pipeline involves transforming an object from one coordinate system to another. These coordinate systems only exist in the mathematical world and can be explained with equations. I will try to give a more down-to-earth explanation by using a parallel. The Model Coordinate System (MCS) Think of an architect sitting at his desk drawing a house. See Figure 11-12. Imagine that he is using a sheet of paper with a coordinate system that is conveniently centered somewhere in the middle of the building. The building that he is drawing is also suitably scaled down so that it fits on the paper. This scaled-down representation is created in the model coordinate system (MCS), so-called because that is where the model is defined. Figure 11-12 A building in MCS There are no real strict guidelines on how MCS should be defined. One thing that we should keep in mind is that all rotations will be done about the principal axes in MCS, so it is a good idea to try to put the origin of the MCS in the middle of the object. Previous Table of Contents Next

Hint: If you are looking for very good and affordable webspace to host and run your java hosting application check Virtualwebstudio java web hosting provider

Comments are closed.

Home | About Us | Compare Plans | Standard Hosting | Business Hosting | Java Tomcat Hosting | Support | FAQ | Order Now!

Powered by Omnicus java hosting services. All rights reserved.
Entries (RSS) and Comments (RSS).