Skip to content

Commit

Permalink
Fixes vector copy in NaifDskShape unit test (#5569)
Browse files Browse the repository at this point in the history
  • Loading branch information
acpaquette authored Jul 31, 2024
1 parent dbd3d59 commit 736648d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions isis/src/base/objs/NaifDskShape/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,26 @@ int main(int argc, char *argv[]) {
qDebug() << "Try to calculate norms using valid shape model...";
shapeModelFromPvlElevation.setLocalNormalFromIntercept();
qDebug() << "Has intercept normal? " << shapeModelFromPvlElevation.hasLocalNormal();
std::vector<double> normal = shapeModelFromPvlElevation.localNormal();
qDebug() << "Normal set from Intercept: "
<< QVector<double>(shapeModelFromPvlElevation.localNormal().begin(), shapeModelFromPvlElevation.localNormal().end());
<< QVector<double>(normal.begin(), normal.end());
// no need to call calculateSurfaceNormal() or ellipsoidNormal()
// directly. these methods are called by calculateDefaultNormal()
shapeModelFromPvlElevation.calculateDefaultNormal();
qDebug() << "Has default normal? " << shapeModelFromPvlElevation.hasNormal();
normal = shapeModelFromPvlElevation.normal();
qDebug() << "Default normal: "
<< QVector<double>(shapeModelFromPvlElevation.normal().begin(), shapeModelFromPvlElevation.normal().end());
<< QVector<double>(normal.begin(), normal.end());

QVector <double *> cornerNeighborPoints;
double point[3];
point[0] = 1.0; point[1] = 0.0; point[2] = 0.0;
cornerNeighborPoints.push_back(point);
shapeModelFromPvlElevation.calculateLocalNormal(cornerNeighborPoints);
qDebug() << "Has local normal? " << shapeModelFromPvlElevation.hasLocalNormal();
normal = shapeModelFromPvlElevation.localNormal();
qDebug() << "Local normal from neighbor points: "
<< QVector<double>(shapeModelFromPvlElevation.localNormal().begin(), shapeModelFromPvlElevation.localNormal().end());
<< QVector<double>(normal.begin(), normal.end());
qDebug() << "";

qDebug() << "================================= Error Throws ==================================";
Expand Down

0 comments on commit 736648d

Please sign in to comment.