11
Nov
The Static Buffers The static buffer of 3D
Black Art of Java Game Programming by Joel Fan Sams, Macmillan Computer Publishing ISBN: 1571690433 Pub Date: 11/01/96 Previous Table of Contents Next Implementing the 3D Angle Class (fAngle3d) The fAngle3d class, shown in Listing 11-10, simplifies the handling of 3D angles. The x, y, z values contain the angle of rotation about the principal axes. Listing 11-10 The fAngle3d class public class fAngle3d{ double x; double y; double z; fAngle3d (double x0, double y0, double z0) { x=x0; y=y0; z=z0; } fAngle3d () { x=y=z=0; } fAngle3d (fAngle3d a) { x=a.x; y=a.y; z=a.z; } boolean equals (fAngle3d a) { return (a.x==x)&&(a.y==y)&&(a.z==z); } void set (fAngle3d a) { x=a.x; y=a.y; z=a.z; } } Implementing the 3D Matrix Class (fMatrix3d) The generic 3D matrix, fGeneric3dMatrix, from Appendix E, 3D Transforms, only contains the basic transforms such as scaling, rotation, and translation. The extension of the generic matrix, fMatrix3d, shown in Listing 11-11, simply hides the actual series of transforms by introducing new methods.
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services
