public void setAndChangeFrame(FrameLineSegment2d lineSegment) { this.referenceFrame = lineSegment.referenceFrame; this.lineSegment.set(lineSegment.lineSegment); }
@Override public void setToNaN() { lineSegment.set(Double.NaN, Double.NaN, Double.NaN, Double.NaN); } }
public void set(ReferenceFrame referenceFrame, LineSegment2d lineSegment2d) { this.referenceFrame = referenceFrame; this.lineSegment.set(lineSegment2d); }
public FrameLineSegment2d(ReferenceFrame referenceFrame, Point2d[] endpoints) { this(referenceFrame); this.lineSegment.set(endpoints); }
public void setIncludingFrame(ReferenceFrame referenceFrame, Point2d firstEndpoint, Point2d secondEndpoint) { this.referenceFrame = referenceFrame; this.lineSegment.set(firstEndpoint, secondEndpoint); }
@Override public void drawHistoryEntry(Graphics2DAdapter graphics, double[] entry) { tempLineSegment.set(entry[0], entry[1], entry[2], entry[3]); }
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); }
public void setFirstEndpoint(FramePoint2d firstEndpointToPack) { firstEndpointToPack.checkReferenceFrameMatch(referenceFrame); lineSegment.set(firstEndpointToPack.getPoint(), lineSegment.endpoints[1]); }
public void setSecondEndpoint(FramePoint2d secondEndpointToPack) { secondEndpointToPack.checkReferenceFrameMatch(referenceFrame); lineSegment.set(lineSegment.endpoints[0], secondEndpointToPack.getPoint()); }
private static void getConnectingEdges(ConvexPolygon2d polygon1, ConvexPolygon2d polygon2, LineSegment2d connectingEdge1ToPack, LineSegment2d connectingEdge2Topack, int[][] verticesIndices) { connectingEdge1ToPack.set(polygon1.getVertex(verticesIndices[0][0]), polygon2.getVertex(verticesIndices[1][0])); connectingEdge2Topack.set(polygon2.getVertex(verticesIndices[1][1]), polygon1.getVertex(verticesIndices[0][1])); }
/** * Packs the closest edge to the given point. */ public static boolean getClosestEdge(Point2d point, ConvexPolygon2d polygon, LineSegment2d edgeToPack) { int edgeIndex = getClosestEdgeIndex(point, polygon); if (edgeIndex == -1) return false; edgeToPack.set(polygon.getVertex(edgeIndex), polygon.getNextVertex(edgeIndex)); return true; }
public void set(FramePoint2d[] endpoints) { checkReferenceFrameMatch(endpoints[0]); checkReferenceFrameMatch(endpoints[1]); this.lineSegment.set(endpoints[0].getPoint(), endpoints[1].getPoint()); }
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 setByProjectionOntoXYPlane(FramePoint firstEndpoint, FramePoint secondEndpoint) { checkReferenceFrameMatch(firstEndpoint); checkReferenceFrameMatch(secondEndpoint); this.lineSegment.set(firstEndpoint.getX(), firstEndpoint.getY(), secondEndpoint.getX(), secondEndpoint.getY()); }
/** * Must provide a draw method for plotter to render artifact */ @Override public void draw(Graphics2DAdapter graphics) { graphics.setColor(color); graphics.setStroke(STROKE); if (LineSegment2d.areEndpointsTheSame(point1, point2)) { graphics.drawPoint(point1); } else { tempLineSegment.set(point1, point2); graphics.drawLineSegment(tempLineSegment); } }
/** * Must provide a draw method for plotter to render artifact */ @Override public void draw(Graphics2DAdapter graphics) { graphics.setColor(color); graphics.setStroke(STROKE); if (LineSegment2d.areEndpointsTheSame(point1, point2)) { graphics.drawPoint(point1); } else { tempLineSegment.set(point1, point2); graphics.drawLineSegment(tempLineSegment); } }