in IsometricPatternMatcher/IsometricPattern.cpp [80:96]
void IsometricGridDot::Init() {
// get patternPtsCodes and patternPts according to patternGroup_[0]
patternPts_.resize(3, storageMapRows_ * storageMapRows_);
patternPtsCodes_.resize(storageMapRows_ * storageMapRows_);
double centerX = (gridRowsCols_[1] - 1) / 2 * horizontalSpacing_; // in meter
double centerY = (gridRowsCols_[0] - 1) / 2 * verticalSpacing_;
int centerIndx = numberLayer_;
for (int r = 0; r < patternGroup_[0].rows(); ++r) {
double y = centerY + (r - centerIndx) * verticalSpacing_;
for (int c = 0; c < patternGroup_[0].cols(); ++c) {
patternPtsCodes_[r * storageMapRows_ + c] = patternGroup_[0](r, c);
double x = centerX + ((c - centerIndx) + (r - centerIndx) / 2.0) *
horizontalSpacing_;
patternPts_.col(r * storageMapRows_ + c) = Eigen::Vector3d(x, y, 0);
}
}
}