public void hideYoGraphics() { int numberOfElements = yoGraphicsLists.size(); for (int i = 0; i < numberOfElements; i++) { YoGraphicsList yoGraphicsList = yoGraphicsLists.get(i); yoGraphicsList.hideYoGraphics(); } }
public void hideYoGraphics() { int numberOfElements = yoGraphicsLists.size(); for (int i = 0; i < numberOfElements; i++) { YoGraphicsList yoGraphicsList = yoGraphicsLists.get(i); yoGraphicsList.hideYoGraphics(); } }
private void setupVisualization(String namePrefix, YoGraphicsListRegistry yoGraphicsListRegistry) { YoGraphicsList list = new YoGraphicsList(name); YoGraphicCoordinateSystem desiredPoseViz = new YoGraphicCoordinateSystem(namePrefix + "DesiredPose", yoDesiredPose, 0.3); list.add(desiredPoseViz); yoGraphicsListRegistry.registerYoGraphicsList(list); list.hideYoGraphics(); }
private void createFrameVisualizers(YoGraphicsListRegistry yoGraphicsListRegistry, FullHumanoidRobotModel fullRobotModel, String listName, boolean enable) { YoGraphicsList list = new YoGraphicsList(listName); if (yoGraphicsListRegistry != null) { for (RobotSide robotSide : RobotSide.values) { ReferenceFrame handPositionControlFrame = fullRobotModel.getHandControlFrame(robotSide); if (handPositionControlFrame != null) { YoGraphicReferenceFrame dynamicGraphicReferenceFrame = new YoGraphicReferenceFrame(handPositionControlFrame, registry, 0.1); dynamicGraphicReferenceFrames.add(dynamicGraphicReferenceFrame); list.add(dynamicGraphicReferenceFrame); } } yoGraphicsListRegistry.registerYoGraphicsList(list); if (!enable) list.hideYoGraphics(); } }
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(); }