Skip to content

Commit

Permalink
Fix typos and remove redundant code. Issue #72.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cattermole committed Aug 24, 2019
1 parent 1f6b55a commit 08eca35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
5 changes: 3 additions & 2 deletions src/core/bundleAdjust_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ int countUpNumberOfErrors(MarkerPtrList markerList,
// computed above.
i = 0;
typedef IndexPairList::const_iterator IndexPairListCit;
IndexPairListCit eit = errorToMarkerList.begin();
for (; eit != errorToMarkerList.end(); ++eit) {
for (IndexPairListCit eit = errorToMarkerList.begin();
eit != errorToMarkerList.end(); ++eit) {
double weight = markerWeightList[i];

int markerIndex = eit->first;
Expand Down Expand Up @@ -290,6 +290,7 @@ int countUpNumberOfUnknownParameters(AttrPtrList attrList,

// TODO: Get a weight value from the attribute. Currently
// weights are not supported in the Maya mmSolver command.
// This is not the same as Marker weights.
paramWeightList.push_back(1.0);
}

Expand Down
6 changes: 2 additions & 4 deletions src/core/bundleAdjust_solveFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ void measureErrors(
<< " x=" << ud->errorList[(i * ERRORS_PER_MARKER) + 0]
<< " y=" << ud->errorList[(i * ERRORS_PER_MARKER) + 1]
<< std::endl;
}
for (int i = 0; i < (numberOfErrors / ERRORS_PER_MARKER); ++i) {
debugFile << "error dist i=" << i
<< " v=" << ud->errorDistanceList[i]
<< std::endl;
Expand Down Expand Up @@ -514,7 +512,7 @@ int solveFunc(int numberOfParameters,
}

if (ud->computation->isInterruptRequested()) {
WRN("User wants to cancel the evalutation!");
WRN("User wants to cancel the evaluation!");
ud->userInterrupted = true;
return SOLVE_FUNC_FAILURE;
}
Expand Down Expand Up @@ -605,7 +603,7 @@ int solveFunc(int numberOfParameters,
ud->computation->setProgress(progressNum);

if (ud->computation->isInterruptRequested()) {
WRN("User wants to cancel the evalutation!");
WRN("User wants to cancel the evaluation!");
ud->userInterrupted = true;
return SOLVE_FUNC_FAILURE;
}
Expand Down
12 changes: 0 additions & 12 deletions src/core/reprojection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@ MStatus reprojection(MMatrix tfmMatrix,
double &outVerticalPan) {
MStatus status = MStatus::kSuccess;

// Use frustum coordinates to calculate coordinates values.
double left = 0.0;
double right = 0.0;
double top = 0.0;
double bottom = 0.0;
computeFrustumCoordinates(
focalLength,
horizontalFilmAperture, verticalFilmAperture,
horizontalFilmOffset, verticalFilmOffset,
nearClipPlane, cameraScale,
left, right, top, bottom);

// Get Camera Projection Matrix
MMatrix camProjMatrix;
status = getProjectionMatrix(
Expand Down

0 comments on commit 08eca35

Please sign in to comment.