@Override public void setIncludingFrame(FrameLine2d otherFrameLine2d) { this.referenceFrame = otherFrameLine2d.referenceFrame; this.line.set(otherFrameLine2d.line); }
public void setIncludingFrame(ReferenceFrame referenceFrame, double pointX, double pointY, double vectorX, double vectorY) { this.referenceFrame = referenceFrame; this.line.set(pointX, pointY, vectorX, vectorY); }
public void set(Point2d[] endpoints) { if (endpoints.length != 2) throw new RuntimeException("Length of input array is not correct. Length = " + endpoints.length); this.set(endpoints[0], endpoints[1]); }
@Override public void set(FrameLine2d frameLine2d) { checkReferenceFrameMatch(frameLine2d); this.line.set(frameLine2d.line); }
public void set(ReferenceFrame referenceFrame, double pointX, double pointY, double vectorX, double vectorY) { checkReferenceFrameMatch(referenceFrame); this.line.set(pointX, pointY, vectorX, vectorY); }
@Override public void drawHistoryEntry(Graphics2DAdapter graphics, double[] entry) { graphics.setColor(color); graphics.setStroke(STROKE); tempLine.set(entry[0], entry[1], entry[2], entry[3]); graphics.drawLine(tempLine); }
public void setIncludingFrame(FramePoint2d endpoint0, FramePoint2d endpoint1) { endpoint0.checkReferenceFrameMatch(endpoint1); this.referenceFrame = endpoint0.referenceFrame; this.line.set(endpoint0.getPoint(), endpoint1.getPoint()); }
public void set(FramePoint2d[] endpoints) { checkReferenceFrameMatch(endpoints[0]); checkReferenceFrameMatch(endpoints[1]); this.line.set(endpoints[0].getPoint(), endpoints[1].getPoint()); }
public void setIncludingFrame(FramePoint2d startPoint, FrameVector2d vector) { startPoint.checkReferenceFrameMatch(vector); this.referenceFrame = startPoint.getReferenceFrame(); this.line.set(startPoint.getPoint(), vector.getVector()); }
public void set(FramePoint2d endpoint0, FramePoint2d endpoint1) { checkReferenceFrameMatch(endpoint0); checkReferenceFrameMatch(endpoint1); this.line.set(endpoint0.getPoint(), endpoint1.getPoint()); }
private int findWorstMaxViolatorIndex(Point2d startPoint, Point2d endPoint, int startIndex, int endIndex) { tempLine.set(startPoint, endPoint); int returnIndex = -1; double worstViolation = Double.NEGATIVE_INFINITY; for (int i = startIndex; i <= endIndex; i++) { Point2d[] minMaxPoint = getMinMaxPoint(i); Point2d maxPoint = minMaxPoint[1]; if (tempLine.isPointOnRightSideOfLine(maxPoint)) { double distance = tempLine.distance(maxPoint); if (distance > worstViolation) { worstViolation = distance; returnIndex = i; } } } return returnIndex; }
public void set(FramePoint2d startPoint, FrameVector2d vector) { checkReferenceFrameMatch(startPoint); checkReferenceFrameMatch(vector); this.line.set(startPoint.getPoint(), vector.getVector()); }
private int findWorstMinViolatorIndex(Point2d startPoint, Point2d endPoint, int startIndex, int endIndex) { tempLine.set(startPoint, endPoint); int returnIndex = -1; double worstViolation = Double.NEGATIVE_INFINITY; for (int i = startIndex; i <= endIndex; i++) { Point2d[] minMaxPoint = getMinMaxPoint(i); Point2d minPoint = minMaxPoint[0]; if (tempLine.isPointOnLeftSideOfLine(minPoint)) { double distance = tempLine.distance(minPoint); if (distance > worstViolation) { worstViolation = distance; returnIndex = i; } } } return returnIndex; }
public void projectOntoXYPlane(Line2d lineToPack) { lineToPack.set(line.getPoint().getX(), line.getPoint().getY(), line.getNormalizedVector().getX(), line.getNormalizedVector().getY()); }
edgeOnQ.set(vertexQ, nextVertexQ); edgeOnQ.perpendicularVector(vectorPerpendicularToEdgeOnQ); LinePerpendicularToEdgeOnQ.set(vertexQ, vectorPerpendicularToEdgeOnQ); LinePerpendicularToEdgeOnQ.getPointGivenParameter(distance, referencePoint); edgeOnQ.getNormalizedVector(normalizedVector); newEdge.set(referencePoint, normalizedVector); rays.add(newEdge);
applyColorForGridline(graphics2d, nthGridLineFromOrigin); tempGridLine.set(gridLinePencil.getX(), gridLinePencil.getY(), 0.0, 1.0); graphics2d.drawLine(pixelsFrame, tempGridLine); applyColorForGridline(graphics2d, nthGridLineFromOrigin); tempGridLine.set(gridLinePencil.getX(), gridLinePencil.getY(), 1.0, 0.0); graphics2d.drawLine(pixelsFrame, tempGridLine); tempGridLine.set(origin.getX(), origin.getY(), 1.0, 0.0); graphics2d.drawLine(pixelsFrame, tempGridLine); tempGridLine.set(origin.getX(), origin.getY(), 0.0, 1.0); graphics2d.drawLine(pixelsFrame, tempGridLine);