@Override public void setPlanarRegions(PlanarRegionsList planarRegionsList) { this.planarRegionsList.set(planarRegionsList.copy()); }
@Override public void setPlanarRegionsList(PlanarRegionsList planarRegionsList) { this.planarRegionsList.set(planarRegionsList.copy()); }
/** * Submit a new list of planar regions to eventually render. * This method does NOT update any YoVariables and does not update any graphics. * Once a list of planar regions is submitted, the method {@link #processPlanarRegionsListQueue()} has to be called every update tick in the caller. * @param planarRegionsList the list of planar regions to be eventually rendered. */ public void submitPlanarRegionsListToRender(PlanarRegionsList planarRegionsList) { if (planarRegionsList == null) { //TODO: Clear the viz when the planarRegionsList is null; return; } if (planarRegionsListsDeque.size() > MAX_PLANAR_REGIONS_LIST_DEQUE_SIZE) return; // This YoGraphic modifies the planarRegionsList. // A full depth copy has to be created to prevent changing the argument. PlanarRegionsList copy = planarRegionsList.copy(); PlanarRegionsList filteredPlanarRegionsList = filterEmptyRegionsAndEmptyPolygons(copy); if (filteredPlanarRegionsList != null) planarRegionsListsDeque.addLast(filteredPlanarRegionsList); }
protected void addPlanarRegionsToTerrain(AppearanceDefinition appearance) { planarRegionsLists.add(generator.getPlanarRegionsList().copy()); appearances.add(appearance); generator.reset(); }
/** * Submit a new list of planar regions to eventually render. * This method does NOT update any YoVariables and does not update any graphics. * Once a list of planar regions is submitted, the method {@link #processPlanarRegionsListQueue()} has to be called every update tick in the caller. * @param planarRegionsList the list of planar regions to be eventually rendered. */ public void submitPlanarRegionsListToRender(PlanarRegionsList planarRegionsList) { if (planarRegionsList == null) { //TODO: Clear the viz when the planarRegionsList is null; return; } if (planarRegionsListsDeque.size() > MAX_PLANAR_REGIONS_LIST_DEQUE_SIZE) return; // This YoGraphic modifies the planarRegionsList. // A full depth copy has to be created to prevent changing the argument. PlanarRegionsList copy = planarRegionsList.copy(); PlanarRegionsList filteredPlanarRegionsList = filterEmptyRegionsAndEmptyPolygons(copy); if (filteredPlanarRegionsList != null) planarRegionsListsDeque.addLast(filteredPlanarRegionsList); }