/** {@inheritDoc} */ @Override public YoGraphicLineSegment duplicate(YoVariableRegistry newRegistry) { return new YoGraphicLineSegment(getName(), start, end, scaleFactor, getAppearance(), getDrawArrowhead()); } }
public YoGraphicLineSegment(String name, YoDouble baseX, YoDouble baseY, YoDouble baseZ, YoDouble endX, YoDouble endY, YoDouble endZ, double scaleFactor, AppearanceDefinition appearance, boolean drawArrowhead) { this(name, baseX, baseY, baseZ, endX, endY, endZ, createDirectionVector(name, baseX.getYoVariableRegistry()), scaleFactor, appearance, drawArrowhead); }
private static YoGraphicLineSegment yoGraphicLineSegmentFromMessage(String name, YoVariable<?>[] vars, double[] consts, AppearanceDefinition appearance) { return new YoGraphicLineSegment(name, (YoDouble) vars[0], (YoDouble) vars[1], (YoDouble) vars[2], (YoDouble) vars[3], (YoDouble) vars[4], (YoDouble) vars[5], consts[0], appearance); }
rightMidZUpFrameViz = new YoGraphicReferenceFrame(referenceFrames.getSideDependentMidFeetZUpFrame(RobotSide.RIGHT), registry, 0.2); nominalYawGraphic = new YoGraphicLineSegment("nominalYaw", centroid, nominalYawEndpoint, 0.2, YoAppearance.Yellow(), true); nominalYawGraphic.setLineRadiusWhenOneMeterLong(0.02);
private void addSupportBaseGraphics(YoGraphicsListRegistry yoGraphicsListRegistry,YoFramePoint3D[] basePoints, ArrayList<YoGraphic> basePointsList, ArrayList<YoGraphic> linesList, String namePrefix,AppearanceDefinition appearance) { AppearanceDefinition[] colors = { YoAppearance.Red(), YoAppearance.Green(), YoAppearance.Blue(), YoAppearance.Yellow() }; YoGraphicsList yoGraphicsList = new YoGraphicsList(namePrefix + "Points"); for (int i = 0; i < basePoints.length; i++) { YoGraphicPosition baseControlPointViz = new YoGraphicPosition(namePrefix + "Point" + i, basePoints[i], 0.01, colors[i]); yoGraphicsList.add(baseControlPointViz); basePointsList.add(baseControlPointViz); for (int j = i + 1; j < basePoints.length; j++) { YoGraphicLineSegment yoGraphicLineSegment = new YoGraphicLineSegment(namePrefix + "SupportLine", basePoints[i], basePoints[j], 1.0, appearance, false); yoGraphicsList.add(yoGraphicLineSegment); linesList.add(yoGraphicLineSegment); } } if (yoGraphicsListRegistry != null) yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList); yoGraphicsList.hideYoGraphics(); }
private void addSupportBaseGraphics(YoGraphicsListRegistry yoGraphicsListRegistry,YoFramePoint[] basePoints, ArrayList<YoGraphic> basePointsList, ArrayList<YoGraphic> linesList, String namePrefix,AppearanceDefinition appearance) { AppearanceDefinition[] colors = { YoAppearance.Red(), YoAppearance.Green(), YoAppearance.Blue(), YoAppearance.Yellow() }; YoGraphicsList yoGraphicsList = new YoGraphicsList(namePrefix + "Points"); for (int i = 0; i < basePoints.length; i++) { YoGraphicPosition baseControlPointViz = new YoGraphicPosition(namePrefix + "Point" + i, basePoints[i], 0.01, colors[i]); yoGraphicsList.add(baseControlPointViz); basePointsList.add(baseControlPointViz); for (int j = i + 1; j < basePoints.length; j++) { YoGraphicLineSegment dynamicGraphicLineSegment = new YoGraphicLineSegment(namePrefix + "SupportLine", basePoints[i], basePoints[j], 1.0, appearance, false); yoGraphicsList.add(dynamicGraphicLineSegment); linesList.add(dynamicGraphicLineSegment); } } if (yoGraphicsListRegistry != null) yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList); yoGraphicsList.hideYoGraphics(); }
public YoGraphicLineSegment(String name, DoubleYoVariable baseX, DoubleYoVariable baseY, DoubleYoVariable baseZ, DoubleYoVariable endX, DoubleYoVariable endY, DoubleYoVariable endZ, double scaleFactor, AppearanceDefinition appearance, boolean drawArrowhead) { this(name, baseX, baseY, baseZ, endX, endY, endZ, createDirectionVector(name, baseX.getYoVariableRegistry()), scaleFactor, appearance, drawArrowhead); }
return new YoGraphicLineSegment(name, (DoubleYoVariable) vars[0], (DoubleYoVariable) vars[1], (DoubleYoVariable) vars[2], (DoubleYoVariable) vars[3], (DoubleYoVariable) vars[4], (DoubleYoVariable) vars[5], consts[0], appearance);