- for (double ang = 0.0; ang < angle; ang += 0.05)
- {
- sgdVec3 newPos;
- sgdMat4 matrix;
- //cerr << "Angle = " << ang << endl;
- sgdMakeRotMat4(matrix, ang, _cross.sg());
- for(int j = 0; j < 3; j++)
- {
- newPos[j] =0.0;
- for (int k = 0; k<3; k++)
- {
- newPos[j] += matrix[j][k]*a[k];
- }
- }
- //cerr << "1"<< endl;
- //SGGeoc geoc = SGGeoc::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
-
- //double midlat = geoc.getLatitudeDeg();
- //double midlon = geoc.getLongitudeDeg();
-
- Point3D temp = sgCartToPolar3d(Point3D(newPos[0], newPos[1],newPos[2]));
- double midlat = temp.lat() * SG_RADIANS_TO_DEGREES;
- double midlon = temp.lon() * SG_RADIANS_TO_DEGREES;
-
+ for (double ang = 0.0; ang < angle; ang += angleStep)
+ {
+ SGQuatd q = SGQuatd::fromAngleAxis(ang, _cross);
+ SGGeod geod = SGGeod::fromCart(q.transform(a));