public void update() { for (YoGraphic yoGraphic : yoGraphicsList.getYoGraphics()) { yoGraphic.update(); } }
private void setGlobalScaleProvider(YoGraphicsList yoGraphicsList, DoubleProvider globalScaleProvider) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) { yoGraphic.setGlobalScaleProvider(globalScaleProvider); } }
public void update() { for (YoGraphic yoGraphic : yoGraphicsList.getYoGraphics()) { yoGraphic.update(); } }
private boolean doesNameExistInYoGraphicsList(String nameToCheck) { for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) { String name = yoGraphic.getName(); if (name.equals(nameToCheck)) { return true; } } } return false; }
private boolean doesNameExistInYoGraphicsList(String nameToCheck) { for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) { String name = yoGraphic.getName(); if (name.equals(nameToCheck)) { return true; } } } return false; }
private void checkForRepeatNames(YoGraphicsList yoGraphicsList) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) { if (doesNameExistInYoGraphicsList(yoGraphic.getName())) { throw new RuntimeException("Repeat Name: " + yoGraphic.getName() + " in YoGraphic!"); } } }
public void registerYoGraphicsList(YoGraphicsList yoGraphicsList) { if (alreadyAddedToSimulationConstructionSet) throw new RuntimeException("Graphics have already been added to the SimulationConstructionSet. Cannot register more objects after this."); if (yoGraphicsLists.contains(yoGraphicsList)) { throw new RuntimeException("Already registered YoGraphicsList " + yoGraphicsList); } checkForRepeatNames(yoGraphicsList); for (YoGraphicsList list : yoGraphicsLists) { if (list.getLabel().equals(yoGraphicsList.getLabel())) { // Combine them: ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); list.addAll(yoGraphics); return; } } yoGraphicsLists.add(yoGraphicsList); }
private void checkForRepeatNames(YoGraphicsList yoGraphicsList) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) { if (doesNameExistInYoGraphicsList(yoGraphic.getName())) { throw new RuntimeException("Repeat Name: " + yoGraphic.getName() + " in YoGraphic!"); } } }
public void registerYoGraphicsList(YoGraphicsList yoGraphicsList) { if (alreadyAddedToSimulationConstructionSet) throw new RuntimeException("Graphics have already been added to the SimulationConstructionSet. Cannot register more objects after this."); if (yoGraphicsLists.contains(yoGraphicsList)) { throw new RuntimeException("Already registered YoGraphicsList " + yoGraphicsList); } checkForRepeatNames(yoGraphicsList); for (YoGraphicsList list : yoGraphicsLists) { if (list.getLabel().equals(yoGraphicsList.getLabel())) { // Combine them: ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); list.addAll(yoGraphics); return; } } yoGraphicsLists.add(yoGraphicsList); }
private void updateYoGraphics() { if (yoGraphicsListRegistry == null) return; List<YoGraphicsList> yoGraphicsLists = yoGraphicsListRegistry.getYoGraphicsLists(); for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) yoGraphic.update(); } yoGraphicsListRegistry.update(); } }
private void updateYoGraphics(YoGraphicsListRegistry yoGraphicsListRegistry) { if (yoGraphicsListRegistry == null) return; List<YoGraphicsList> yoGraphicsLists = yoGraphicsListRegistry.getYoGraphicsLists(); for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) yoGraphic.update(); } yoGraphicsListRegistry.update(); }
private void updateYoGraphics(YoGraphicsListRegistry yoGraphicsListRegistry) { if (yoGraphicsListRegistry == null) return; List<YoGraphicsList> yoGraphicsLists = yoGraphicsListRegistry.getYoGraphicsLists(); for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) yoGraphic.update(); } yoGraphicsListRegistry.update(); }
private void updateYoGraphics() { if (yoGraphicsListRegistry == null) return; List<YoGraphicsList> yoGraphicsLists = yoGraphicsListRegistry.getYoGraphicsLists(); for (YoGraphicsList yoGraphicsList : yoGraphicsLists) { ArrayList<YoGraphic> yoGraphics = yoGraphicsList.getYoGraphics(); for (YoGraphic yoGraphic : yoGraphics) yoGraphic.update(); } yoGraphicsListRegistry.update(); } }
for (YoGraphicsList yoGraphicsList : yoGraphicsLists) for (YoGraphic yoGraphic : yoGraphicsList.getYoGraphics())
@ContinuousIntegrationTest(estimatedDuration = 0.1) @Test(timeout = 30000) public void testVisualization() { YoGraphicsList dummyGraphicsList = new YoGraphicsList("DummyGraphics"); ArtifactList dummyArtifactList = new ArtifactList("DummyArtifacts"); copPointsInFoot.setupVisualizers(dummyGraphicsList, dummyArtifactList, 0.05); assertEquals(dummyArtifactList.getArtifacts().size(), 10); assertEquals(dummyGraphicsList.getYoGraphics().size(), 10); copPointsInFoot.addWaypoint(CoPPointName.MIDFOOT_COP, 1.0, new FramePoint3D(footSpoof.getSoleFrame(), 1.0, 2.1, 3.1)); YoGraphicPosition graphic = (YoGraphicPosition) dummyGraphicsList.getYoGraphics().get(0); assertEquals(1.0 - xToAnkle, graphic.getX(), 1e-5); assertEquals(2.1 - yToAnkle, graphic.getY(), 1e-5); assertEquals(3.1 - zToAnkle, graphic.getZ(), 1e-5); }
for (YoGraphicsList yoGraphicsList : yoGraphicsLists) for (YoGraphic yoGraphic : yoGraphicsList.getYoGraphics())