private static boolean DEBUG = false;
- public enum Type{INLINE,TURN,END};
+ public enum PointType{INLINE,TURN,END};
public enum Direction{NEXT,PREVIOUS};
public enum PositionType {SPLIT,NEXT,PREVIOUS,PORT}
private PipelineComponent component;
- private Type type;
+ private PointType type;
private boolean fixed = true;
private boolean rotate = false;
private boolean reverse = false;
return component;
}
- public Type getType() {
+ public PointType getType() {
return type;
}
- public void setType(Type type) {
+ public void setType(PointType type) {
this.type = type;
}
}
public boolean isPathLegEnd() {
- return type != Type.INLINE;
+ return type != PointType.INLINE;
}
public boolean isEnd() {
- return type == Type.END;
+ return type == PointType.END;
}
public boolean isTurn() {
- return type == Type.TURN;
+ return type == PointType.TURN;
}
public boolean isInline() {
- return type == Type.INLINE;
+ return type == PointType.INLINE;
}
public boolean isDirected() {
}
public void setTurnAngle(Double turnAngle) {
- if (Double.isInfinite(turnAngle) || Double.isNaN(turnAngle)) {
+ if (turnAngle == null || Double.isInfinite(turnAngle) || Double.isNaN(turnAngle)) {
return;
}
if (this.turnAngle != null && Math.abs(this.turnAngle-turnAngle) < MathTools.NEAR_ZERO)
dir.normalize();
Quat4d q = getControlPointOrientationQuat(dir, angle);
if (reversed) {
- Quat4d q2 = new Quat4d();
+ Quat4d q2 = new Quat4d();
q2.set(new AxisAngle4d(MathTools.Y_AXIS, Math.PI));
q.mulInverse(q2);
}
}
public double getInlineLength() {
- if (type == Type.TURN)
+ if (type == PointType.TURN)
return length;
- else if (type == Type.INLINE)
+ else if (type == PointType.INLINE)
return length * 0.5;
return 0;
}
}
if (br0 != null) {
if (br0.getNext() == component)
- prev.setNext(null);
+ br0.setNext(null);
else if (br0.getPrevious() == component)
- prev.setPrevious(null);
+ br0.setPrevious(null);
else if (br0.getBranch0() == component)
br0.setBranch0(null);
}