1 package net.sf.openrocket.file.rocksim.export;
3 import net.sf.openrocket.file.rocksim.RocksimCommonConstants;
4 import net.sf.openrocket.rocketcomponent.NoseCone;
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;
12 * This class models a Rocksim XML Element for a nose cone.
14 @XmlRootElement(name = RocksimCommonConstants.NOSE_CONE)
15 @XmlAccessorType(XmlAccessType.FIELD)
16 public class NoseConeDTO extends AbstractTransitionDTO {
19 @XmlElement(name = RocksimCommonConstants.BASE_DIA)
20 private double baseDia = 0d;
21 @XmlElement(name = RocksimCommonConstants.SHOULDER_LEN)
22 private double shoulderLen = 0d;
23 @XmlElement(name = RocksimCommonConstants.SHOULDER_OD)
24 private double shoulderOD = 0d;
27 * Default constructor.
29 public NoseConeDTO() {
33 * Full copy constructor. Fully populates this instance with values taken from the OR NoseCone instance.
35 * @param nc the OR nose cone
37 public NoseConeDTO(NoseCone nc) {
39 setBaseDia(nc.getAftRadius() * RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_RADIUS);
40 setShoulderLen(nc.getAftShoulderLength() * RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
41 setShoulderOD(nc.getAftShoulderRadius() * RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_RADIUS);
44 public double getBaseDia() {
48 public void setBaseDia(double theBaseDia) {
52 public double getShoulderLen() {
56 public void setShoulderLen(double theShoulderLen) {
57 shoulderLen = theShoulderLen;
60 public double getShoulderOD() {
64 public void setShoulderOD(double theShoulderOD) {
65 shoulderOD = theShoulderOD;