示例#1
0
const std::vector<Projection::MaskCell>& Projection::get_sphere_mask(double radius) {
  // check if already calculated
  if(radius2mask_.find(radius) == radius2mask_.end()) {
    // compute
    std::vector<MaskCell> mask;
    calculate_sphere_mask(mask, radius);
    radius2mask_[radius] = mask;
  }
  return radius2mask_.find(radius)->second;
}
示例#2
0
const std::vector<Projection::MaskCell>& Projection::get_sphere_mask() {
  // check if already calculated
  if (mask_.size() == 0) calculate_sphere_mask(mask_);
  return mask_;
}