1 package com.irtimaled.bbor.client.renderers;
3 import com.irtimaled.bbor.client.models.Point;
4 import com.irtimaled.bbor.common.models.Coords;
6 import java.util.Objects;
9 private final Point point;
11 OffsetPoint(double x, double y, double z) {
12 this(new Point(x, y, z));
15 OffsetPoint(Coords coords) {
16 this(new Point(coords));
19 OffsetPoint(Point point) {
35 OffsetPoint offset(double x, double y, double z) {
36 return new OffsetPoint(point.offset(x, y, z));
39 double getDistance(OffsetPoint offsetPoint) {
40 return this.point.getDistance(offsetPoint.point);
48 public boolean equals(Object o) {
49 if (this == o) return true;
50 if (o == null || getClass() != o.getClass()) return false;
51 OffsetPoint that = (OffsetPoint) o;
52 return point.equals(that.point);
56 public int hashCode() {
57 return Objects.hash(point);