MP6
Photomosaic
Todo List
Member KDTree< Dim >::findNearestNeighbor (const Point< Dim > &query) const
This function is required for MP 6.1.
Parameters
queryThe point we wish to find the closest neighbor to in the tree.
Returns
The closest point to a in the KDTree.
Implement this function!
Member KDTree< Dim >::KDTree (const vector< Point< Dim > > &newPoints)
This function is required for MP 6.1.
Parameters
newPointsThe vector of points to build your KDTree off of.
Implement this function!
Member KDTree< Dim >::shouldReplace (const Point< Dim > &target, const Point< Dim > &currentBest, const Point< Dim > &potential) const
This function is required for MP 6.1.
Parameters
targetThe Point we want to be close to.
currentBestThe Point that is currently our closest Point to target.
potentialOur Point that is a candidate to replace currentBest (that is, it may be closer to target than currentBest).
Returns
A boolean value indicating whether potential is closer to target than currentBest. Ties should be broken with Point::operator<().
Implement this function!
Member KDTree< Dim >::smallerDimVal (const Point< Dim > &first, const Point< Dim > &second, int curDim) const
This function is required for MP 6.1.
Parameters
firstPoint to compare.
secondSecond point to compare.
curDimDimension these points are being compared in.
Returns
A boolean value indicating whether the first Point is smaller than the second Point in the curDim dimension.
Implement this function!
globalScope> Member mapTiles (SourceImage const &theSource, vector< TileImage > const &theTiles)

Implement this function!

This function is required for MP 6.2.

Parameters
theSourceThe input image to construct a photomosaic of
theTilesThe tiles image to use in the mosaic