1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/* */ import java.awt.Color;
/* */ import java.awt.Graphics;
/* */
/* */ public class Object3D
/* */ implements CoordinateSystem, GraphicsEvent
/* */ {
/* */ private Point3D[][] points;
/* */ private PointGroup[] pointGroups;
/* */ private double xoff;
/* */ private double yoff;
/* */ private double zoff;
/* */ private double pivY;
/* */ private double pivX;
/* */ private double pivZ;
/* */ private double rotoX;
/* */ private double rotoY;
/* */ private double rotoZ;
/* */ private CoordinateSystem graph;
/* */
/* */ public Object3D(Point3D[][] points, double xoff, double yoff, double zoff, double rotX, double rotY, double rotZ, CoordinateSystem graph)
/* */ {
/* 28 */ this.points = points;
/* 29 */ this.pointGroups = new PointGroup[points.length];
/* 30 */ this.xoff = xoff;
/* 31 */ this.yoff = yoff;
/* 32 */ this.zoff = zoff;
/* 33 */ this.rotoX = rotX;
/* 34 */ this.rotoY = rotY;
/* 35 */ this.rotoZ = rotZ;
/* */
/* 37 */ for (int i = 0; i < points.length; i++) {
/* 38 */ this.pointGroups[i] = new PointGroup(points[i]);
/* */ }
/* 40 */ this.graph = graph;
/* */ }
/* */
/* */ public Object3D(Point3D[][] points, Color[] colors, double xoff, double yoff, double zoff, double rotX, double rotY, double rotZ, CoordinateSystem graph) {
/* 44 */ this(points, xoff, yoff, zoff, rotX, rotY, rotZ, graph);
/* 45 */ for (int i = 0; (i < this.pointGroups.length) && (i < colors.length); i++)
/* 46 */ this.pointGroups[i].setColor(colors[i]);
/* */ }
/* */
/* 49 */ public double getCameraY() { return this.graph.getCameraY(); }
/* 50 */ public double getCameraZ() { return this.graph.getCameraZ(); }
/* 51 */ public double getCameraX() { return this.graph.getCameraX(); }
/* */ public double getXRotation() {
/* 53 */ return this.rotoX; }
/* 54 */ public double getYRotation() { return this.rotoY; }
/* 55 */ public double getZRotation() { return this.rotoZ; }
/* 56 */ public double getXMove() { return this.graph.getXMove(); }
/* 57 */ public double getYMove() { return this.graph.getYMove(); }
/* 58 */ public double getScale() { return this.graph.getScale(); }
/* 59 */ public double getXPivot() { return this.xoff; }
/* 60 */ public double getYPivot() { return this.yoff; }
/* 61 */ public double getZPivot() { return this.zoff; }
/* 62 */ public int getWidth() { return this.graph.getWidth(); }
/* 63 */ public int getHeight() { return this.graph.getHeight(); }
/* 64 */ public void setXRotation(double x) { this.rotoX = (x % 360.0D); }
/* 65 */ public void setYRotation(double y) { this.rotoY = (y % 360.0D); }
/* 66 */ public void setZRotation(double z) { this.rotoZ = (z % 360.0D); }
/* 67 */ public void setXPivot(double x) { this.pivX = x; }
/* 68 */ public void setYPivot(double y) { this.pivY = y; }
/* 69 */ public void setZPivot(double z) { this.pivZ = z; }
/* */
/* */
/* */ public void invoke(Graphics g)
/* */ {
/* 74 */ for (PointGroup pg : this.pointGroups) {
/* 75 */ PointGroup temp = pg.translateAll(this.xoff, this.yoff, this.zoff, this.rotoZ, this.rotoX, this.rotoY, 0.0D, 0.0D, 0.0D);
/* */
/* 77 */ temp.invoke(g, this.graph);
/* */ }
/* */ }
/* */
/* */ public void setModel(PointModel pm) {
/* 82 */ for (Point3D[] p3darr : this.points) for (Point3D p3d : p3darr) p3d.setModel(pm);
/* */ }
/* */ }
/* Location: Modulus.jar
* Qualified Name: Object3D
* JD-Core Version: 0.6.2
*/
|