DGP - cleanup
[debian/openrocket] / core / src / net / sf / openrocket / file / rocksim / export / NoseConeDTO.java
1 package net.sf.openrocket.file.rocksim.export;
2
3 import net.sf.openrocket.file.rocksim.importt.RocksimHandler;
4 import net.sf.openrocket.rocketcomponent.NoseCone;
5
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlElement;
9 import javax.xml.bind.annotation.XmlRootElement;
10
11 /**
12  */
13 @XmlRootElement(name = "NoseCone")
14 @XmlAccessorType(XmlAccessType.FIELD)
15 public class NoseConeDTO extends AbstractTransitionDTO {
16
17
18     @XmlElement(name = "BaseDia")
19     private double baseDia = 0d;
20     @XmlElement(name = "ShoulderLen")
21     private double shoulderLen = 0d;
22     @XmlElement(name = "ShoulderOD")
23     private double shoulderOD = 0d;
24
25     public NoseConeDTO() {
26     }
27
28     public NoseConeDTO(NoseCone nc) {
29         super(nc);
30         setBaseDia(nc.getAftRadius() * RocksimHandler.ROCKSIM_TO_OPENROCKET_RADIUS);
31         setShoulderLen(nc.getAftShoulderLength() * RocksimHandler.ROCKSIM_TO_OPENROCKET_LENGTH);
32         setShoulderOD(nc.getAftShoulderRadius() * RocksimHandler.ROCKSIM_TO_OPENROCKET_RADIUS);
33     }
34
35     public double getBaseDia() {
36         return baseDia;
37     }
38
39     public void setBaseDia(double theBaseDia) {
40         baseDia = theBaseDia;
41     }
42
43     public double getShoulderLen() {
44         return shoulderLen;
45     }
46
47     public void setShoulderLen(double theShoulderLen) {
48         shoulderLen = theShoulderLen;
49     }
50
51     public double getShoulderOD() {
52         return shoulderOD;
53     }
54
55     public void setShoulderOD(double theShoulderOD) {
56         shoulderOD = theShoulderOD;
57     }
58 }