Changeset 78 for java/main/src/main/java/com/framsticks/model/MechPart.java
- Timestamp:
- 01/09/13 00:09:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/model/MechPart.java
r77 r78 6 6 /* 7 7 */ 8 public class MechPart { 9 10 /** x, y, z */ 11 public final Point3d position = new Point3d(); 12 13 /** m */ 14 public Double mass = 0.0; 15 16 /** s */ 17 public Double size = 0.0; 8 public class MechPart extends BasePart { 18 9 19 10 /** vol */ 20 11 public Double volume = 0.0; 21 22 /** fr */23 public Double friction = 0.0;24 25 /** vx, vy, vz */26 public final Point3d velocity = new Point3d();27 28 /** oxx, oxy, oxz, oyx, oyy, oyz, ozx, ozy, ozz*/29 public final Orientation orientation = new Orientation();30 31 public Double getX() { return position.x; }32 public void setX(Double x) { position.x = x; }33 34 public Double getY() { return position.y; }35 public void setY(Double y) { position.y = y; }36 37 public Double getZ() { return position.z; }38 public void setZ(Double z) { position.z = z; }39 40 public Double getM() { return mass; }41 public void setM(Double m) { mass = m; }42 43 public Double getS() { return size; }44 public void setS(Double s) { size = s; }45 46 12 public Double getVol() { return volume; } 47 13 public void setVol(Double vol) { volume = vol; } 48 14 49 public Double getFr() { return friction; }50 public void setFr(Double fr) { friction = fr; }15 /** vx, vy, vz*/ 16 public double vx, vy, vz; 51 17 52 public Double getVx() { return velocity.x; }53 public void setV x(Double vx) { velocity.x = vx; }18 public Point3d getVelocity() { return new Point3d(vx, vy, vz); } 19 public void setVelocity(Point3d v) { vx = v.x; vy = v.y; vz = v.z; } 54 20 55 public Double getVy() { return velocity.y; } 56 public void setVy(Double vy) { velocity.y = vy; } 21 public double oxx, oxy, oxz, oyx, oyy, oyz, ozx, ozy, ozz; 57 22 58 public Double getVz() { return velocity.z; } 59 public void setVz(Double vz) { velocity.z = vz; } 23 public Orientation getOrientation() { return new Orientation(new Point3d(oxx, oxy, oxz), new Point3d(oyx, oyy, oyz), new Point3d(ozx, ozy, ozz)); } 60 24 61 public Double getOxx() { return orientation.x.x; } 62 public void setOxx(Double oxx) { orientation.x.x = oxx; } 63 64 public Double getOxy() { return orientation.x.y; } 65 public void setOxy(Double oxy) { orientation.x.y = oxy; } 66 67 public Double getOxz() { return orientation.x.z; } 68 public void setOxz(Double oxz) { orientation.x.z = oxz; } 69 70 public Double getOyx() { return orientation.y.x; } 71 public void setOyx(Double oyx) { orientation.y.x = oyx; } 72 73 public Double getOyy() { return orientation.y.y; } 74 public void setOyy(Double oyy) { orientation.y.y = oyy; } 75 76 public Double getOyz() { return orientation.y.z; } 77 public void setOyz(Double oyz) { orientation.y.z = oyz; } 78 79 public Double getOzx() { return orientation.z.x; } 80 public void setOzx(Double ozx) { orientation.z.x = ozx; } 81 82 public Double getOzy() { return orientation.z.y; } 83 public void setOzy(Double ozy) { orientation.z.y = ozy; } 84 85 public Double getOzz() { return orientation.z.z; } 86 public void setOzz(Double ozz) { orientation.z.z = ozz; } 25 public void setOrientation(Orientation o) { 26 oxx = o.x.x; 27 oxy = o.x.y; 28 oxz = o.x.z; 29 oyx = o.y.x; 30 oyy = o.y.y; 31 oyz = o.y.z; 32 ozx = o.z.x; 33 ozy = o.z.y; 34 ozz = o.z.z; 35 } 87 36 88 37 }
Note: See TracChangeset
for help on using the changeset viewer.