void Transform::makeTransform(data::Value &value, Vector<data::Value *> &stack) const { for (auto &ord : order) { if (ord.second == Mode::Map) { auto m = map.find(ord.first); if (m != map.end()) { performTransform(value, stack, *m); } } else { auto s = subtransforms.find(ord.first); if (s != subtransforms.end()) { performTransform(value, stack, *s); } } } }
void PointSet<T>::coordinateTransform(PointSet<T>& dst, COORDINATE_CONVERSION conversion_type) { //Check the src and dst types before converting if(conversion_type == 0 && this.type != 0) { cerr << "Source PointSet is not XYZ." << endl; return; } else if(conversion_type == 1 && this.type != 1) { cerr << "Source PointSet is not REA." << endl; return; } performTransform(this.points, dst.points, conversion_type); }
void PointSet<T>::coordinateTransform(COORDINATE_CONVERSION conversion_type) { //Check destination System if(conversion_type == 0 && this.type == 1) return; //No conversion if(conversion_type == 1 && this.type == 0) return; //No Conversion if(conversion_type == 0 && this.type != 0) { cerr << "Source PointSet is not XYZ." << endl; return; } else if(conversion_type == 1 && this.type != 1) { cerr << "Source PointSet is not RAE." << endl; return; } performTransform(this.points, &this.points, conversion_type); }