source: java/main/src/main/java/com/framsticks/model/MechPart.java @ 78

Last change on this file since 78 was 78, checked in by psniegowski, 11 years ago

Add f0 parsing and f0->Model transformation.

File size: 875 bytes
Line 
1package com.framsticks.model;
2
3import com.framsticks.util.Orientation;
4import com.framsticks.util.Point3d;
5
6/*
7 */
8public class MechPart extends BasePart {
9
10        /** vol */
11        public Double volume = 0.0;
12        public Double getVol() { return volume; }
13        public void setVol(Double vol) { volume = vol; }
14
15        /** vx, vy, vz*/
16        public double vx, vy, vz;
17
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; }
20
21    public double oxx, oxy, oxz, oyx, oyy, oyz, ozx, ozy, ozz;
22
23        public Orientation getOrientation() { return new Orientation(new Point3d(oxx, oxy, oxz), new Point3d(oyx, oyy, oyz), new Point3d(ozx, ozy, ozz)); }
24
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        }
36
37}
Note: See TracBrowser for help on using the repository browser.