1 package net.sf.openrocket.rocketcomponent;
4 * Rocket nose cones of various types. Implemented as a transition with the
7 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
10 public class NoseCone extends Transition {
13 /********* Constructors **********/
15 this(Transition.Shape.OGIVE, 6*DEFAULT_RADIUS, DEFAULT_RADIUS);
18 public NoseCone(Transition.Shape type, double length, double radius) {
21 super.setForeRadiusAutomatic(false);
22 super.setForeRadius(0);
23 super.setForeShoulderLength(0);
24 super.setForeShoulderRadius(0.9*radius);
25 super.setForeShoulderThickness(0);
26 super.setForeShoulderCapped(filled);
27 super.setThickness(0.002);
28 super.setLength(length);
29 super.setClipped(false);
34 /********** Get/set methods for component parameters **********/
37 public double getForeRadius() {
42 public void setForeRadius(double r) {
47 public boolean isForeRadiusAutomatic() {
52 public void setForeRadiusAutomatic(boolean b) {
57 public double getForeShoulderLength() {
62 public double getForeShoulderRadius() {
67 public double getForeShoulderThickness() {
72 public boolean isForeShoulderCapped() {
77 public void setForeShoulderCapped(boolean capped) {
82 public void setForeShoulderLength(double foreShoulderLength) {
87 public void setForeShoulderRadius(double foreShoulderRadius) {
92 public void setForeShoulderThickness(double foreShoulderThickness) {
97 public boolean isClipped() {
102 public void setClipped(boolean b) {
108 /********** RocketComponent methods **********/
111 * Return component name.
114 public String getComponentName() {
119 * Accept a visitor to this NoseCone in the component hierarchy.
121 * @param theVisitor the visitor that will be called back with a reference to this NoseCone
124 public void accept(ComponentVisitor theVisitor) {
125 theVisitor.visit(this);