* Calculated direction was opposite to the actual direction
gitlab #12
Change-Id: I8ea135f3cec5a0d80e42c9a2d9ecb626fb4f11a5
}
public Vector3d getSizeChangeOffsetVector(Vector3d dir) {
}
public Vector3d getSizeChangeOffsetVector(Vector3d dir) {
if (rotationAngle == null)
if (rotationAngle == null)
- rotationAngle = 0.0;
- Quat4d q = getControlPointOrientationQuat(dir, rotationAngle);
+ q = getControlPointOrientationQuat(dir, 0.0);
+ else
+ q = getControlPointOrientationQuat(dir, rotationAngle);
Vector3d v = new Vector3d(0.0,offset,0.0);
Vector3d offset = new Vector3d();
MathTools.rotate(q, v, offset);
Vector3d v = new Vector3d(0.0,offset,0.0);
Vector3d offset = new Vector3d();
MathTools.rotate(q, v, offset);
}
public Vector3d getSizeChangeOffsetVector() {
}
public Vector3d getSizeChangeOffsetVector() {
if (rotationAngle == null)
if (rotationAngle == null)
- rotationAngle = 0.0;
- Quat4d q = getControlPointOrientationQuat(rotationAngle);
+ q = getControlPointOrientationQuat(0.0);
+ else
+ q = getControlPointOrientationQuat(rotationAngle);
Vector3d v = new Vector3d(0.0,offset,0.0);
Vector3d offset = new Vector3d();
MathTools.rotate(q, v, offset);
Vector3d v = new Vector3d(0.0,offset,0.0);
Vector3d offset = new Vector3d();
MathTools.rotate(q, v, offset);
ErrorLogger.defaultLogError("Updating pipe run, found offset controlpoint " + icp, new Exception("ASSERT!"));
}
if (offsets.size() == 0) {
ErrorLogger.defaultLogError("Updating pipe run, found offset controlpoint " + icp, new Exception("ASSERT!"));
}
if (offsets.size() == 0) {
- dir.set(startPoint);
- dir.sub(endPoint);
+ dir.set(endPoint);
+ dir.sub(startPoint);
double l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));
double l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));
} else {
Vector3d sp = new Vector3d(startPoint);
Point3d ep = new Point3d(endPoint);
} else {
Vector3d sp = new Vector3d(startPoint);
Point3d ep = new Point3d(endPoint);
- dir.set(sp);
- dir.sub(ep);
+ dir.set(ep);
+ dir.sub(sp);
double l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));
double l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));
- dir.set(sp);
- dir.sub(ep);
+ dir.set(ep);
+ dir.sub(sp);
l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));
l = dir.lengthSquared();
if (l > MathTools.NEAR_ZERO)
dir.scale(1.0/Math.sqrt(l));