public double dotProduct(FrameLineSegment2d frameLineSegment2d) { checkReferenceFrameMatch(frameLineSegment2d); return lineSegment.dotProduct(frameLineSegment2d.lineSegment); }
@Override public double distance(FrameLine2d line) { checkReferenceFrameMatch(line); return this.lineSegment.distance(line.line); }
public void set(ReferenceFrame referenceFrame, double firstEndpointX, double firstEndpointY, double secondEndpointX, double secondEndpointY) { checkReferenceFrameMatch(referenceFrame); this.lineSegment.set(firstEndpointX, firstEndpointY, secondEndpointX, secondEndpointY); }
@Override public void set(FrameLineSegment2d lineSegment) { checkReferenceFrameMatch(lineSegment); this.lineSegment.set(lineSegment.lineSegment); }
@Override public double distance(FrameConvexPolygon2d convexPolygon) { checkReferenceFrameMatch(convexPolygon); return this.lineSegment.distance(convexPolygon.convexPolygon); }
public void set(FramePoint2d firstEndpoint, FramePoint2d secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(secondEndpoint); this.lineSegment.set(firstEndpoint.getPoint(), secondEndpoint.getPoint()); }
public void set(FramePoint2d firstEndpoint, FrameVector2d vectorToSecondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(vectorToSecondEndpoint); this.lineSegment.set(firstEndpoint.getPoint(), vectorToSecondEndpoint.getVector()); }
public void set(FramePoint2d[] endpoints) { checkReferenceFrameMatch(endpoints[0]); checkReferenceFrameMatch(endpoints[1]); this.lineSegment.set(endpoints[0].getPoint(), endpoints[1].getPoint()); }
public double percentageAlongLineSegment(FramePoint2d point2d) { checkReferenceFrameMatch(point2d); return lineSegment.percentageAlongLineSegment(point2d.getPoint()); }
public boolean isPointOnRightSideOfLineSegment(FramePoint2d point) { checkReferenceFrameMatch(point); return this.lineSegment.isPointOnRightSideOfLineSegment(point.getPointCopy()); }
public boolean isBetweenEndpoints(FramePoint2d point2d, double epsilon) { checkReferenceFrameMatch(point2d); return lineSegment.isBetweenEndpoints(point2d.getPoint(), epsilon); }
@Override public FramePoint2d[] intersectionWith(FrameConvexPolygon2d convexPolygon) { checkReferenceFrameMatch(convexPolygon); Point2d[] intersection = this.lineSegment.intersectionWith(convexPolygon.convexPolygon); FramePoint2d[] ret = new FramePoint2d[intersection.length]; for (int i = 0; i < intersection.length; i++) { ret[i] = new FramePoint2d(convexPolygon.referenceFrame, intersection[i]); } return ret; }
@Override public double distance(FramePoint2d point) { checkReferenceFrameMatch(point); return this.lineSegment.distance(point.getPoint()); }
public boolean isPointOnLeftSideOfLineSegment(FramePoint2d point) { checkReferenceFrameMatch(point); point.get(tempPoint2d); return this.lineSegment.isPointOnLeftSideOfLineSegment(tempPoint2d); }
@Override public void orthogonalProjection(FramePoint2d point) { checkReferenceFrameMatch(point); lineSegment.orthogonalProjection(point.getPoint()); }
public void setByProjectionOntoXYPlane(FramePoint firstEndpoint, FramePoint secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(secondEndpoint); this.lineSegment.set(firstEndpoint.getX(), firstEndpoint.getY(), secondEndpoint.getX(), secondEndpoint.getY()); }
public void getClosestPointOnLineSegment(FramePoint2d framePoint2dToPack, FramePoint2d point) { checkReferenceFrameMatch(point); lineSegment.getClosestPointOnLineSegment(tempPoint2d, point.getPoint()); framePoint2dToPack.setIncludingFrame(referenceFrame, tempPoint2d); }
@Override public FramePoint2d intersectionWith(FrameLineSegment2d secondLineSegment) { checkReferenceFrameMatch(secondLineSegment); Point2d intersection = this.lineSegment.intersectionWith(secondLineSegment.lineSegment); if (intersection == null) { return null; } return new FramePoint2d(secondLineSegment.getReferenceFrame(), intersection); }
public void orthogonalProjection(FramePoint2d point, FramePoint2d projectedPointToPack) { checkReferenceFrameMatch(point); projectedPointToPack.setToZero(referenceFrame); lineSegment.orthogonalProjection(point.getPoint(), projectedPointToPack.getPoint()); }
@Override public FramePoint2d orthogonalProjectionCopy(FramePoint2d point) { checkReferenceFrameMatch(point); Point2d projected = lineSegment.orthogonalProjectionCopy(point.getPoint()); return new FramePoint2d(point.getReferenceFrame(), projected); }