@Override public boolean epsilonEquals(LineSegment3DMessage other, double epsilon) { return start.epsilonEquals(other.start, (float) epsilon) && end.epsilonEquals(other.end, (float) epsilon); } }
@Override public boolean epsilonEquals(PlanarRegionSegmentationMessage other, double epsilon) { if (id != other.id) return false; if (!origin.epsilonEquals(other.origin, (float) epsilon)) return false; if (!normal.epsilonEquals(other.normal, (float) epsilon)) return false; if (!Arrays.equals(nodeKeys, other.nodeKeys)) return false; if (hitLocations.length != other.hitLocations.length) return false; for (int i = 0; i < hitLocations.length; i++) { if (!hitLocations[i].epsilonEquals(other.hitLocations[i], (float) epsilon)) return false; } return true; } }
@Override public boolean epsilonEquals(BoxMessage other, double epsilon) { if (!size.epsilonEquals(other.size, (float) epsilon)) return false; if (!center.epsilonEquals(other.center, (float) epsilon)) return false; if (!orientation.epsilonEquals(other.orientation, (float) epsilon)) return false; return true; } }
@Override public boolean epsilonEquals(Polygon other, double epsilon) { if(other == null) return false; if(other == this) return true; if (this.points_.size() != other.points_.size()) { return false; } else { for (int i = 0; i < this.points_.size(); i++) { if (!this.points_.get(i).epsilonEquals(other.points_.get(i), epsilon)) return false; } } return true; }
@Override public boolean epsilonEquals(PointCloud other, double epsilon) { if(other == null) return false; if(other == this) return true; if (!this.header_.epsilonEquals(other.header_, epsilon)) return false; if (this.points_.size() != other.points_.size()) { return false; } else { for (int i = 0; i < this.points_.size(); i++) { if (!this.points_.get(i).epsilonEquals(other.points_.get(i), epsilon)) return false; } } if (this.channels_.size() != other.channels_.size()) { return false; } else { for (int i = 0; i < this.channels_.size(); i++) { if (!this.channels_.get(i).epsilonEquals(other.channels_.get(i), epsilon)) return false; } } return true; }