public Graphics3DAddMeshDataInstruction(MeshDataHolder meshData, AppearanceDefinition appearance) { this.meshData = meshData; setAppearance(appearance); }
public void updateAppearance(AppearanceDefinition appearance) { instruction.setAppearance(appearance); }
public Graphics3DAddMeshDataInstruction(MeshDataHolder meshData, AppearanceDefinition appearance) { this.meshData = meshData; setAppearance(appearance); }
public void updateAppearance(AppearanceDefinition appearance) { instruction.setAppearance(appearance); }
@Override public void update() { if (numberOfPoints.getIntegerValue() < 3) { instruction.setMesh(EMPTY_MESH); return; } for (int i = 0; i < numberOfPoints.getIntegerValue(); i++) ccwOrderedPoints.get(i).set(ccwOrderedYoFramePoints[i]); instruction.setMesh(MeshDataGenerator.Polygon(ccwOrderedPoints, numberOfPoints.getIntegerValue())); instruction.setAppearance(appearance); }
/** * Update the mesh that will display a portion of the {@link PlanarRegionsList} being processed. * This method only reads the YoVariables to update the mesh. * * When used as a remote YoGraphic, only this method should be called. */ @Override public void update() { if (yoGraphicJob == YoGraphicJob.READER) { // Notify the updater that a reader exists and the updater must synchronize. waitForReader.set(true); hasReaderProcessedMesh.set(true); } if (currentMeshIndex.getIntegerValue() == -1) return; MeshDataHolder polygonMesh = createCurrentMesh(); polygonMesh.setName("PlanarRegion"); AppearanceDefinition appearance = getCurrentAppearance(); Graphics3DAddMeshDataInstruction instructionToUpdate = meshBuffer.get(currentMeshIndex.getIntegerValue()); instructionToUpdate.setMesh(polygonMesh); instructionToUpdate.setAppearance(appearance); if (isPlanarRegionsListComplete.getBooleanValue()) { // Clear the rest of meshes that are not needed. for (int meshIndex = currentMeshIndex.getIntegerValue() + 1; meshIndex < meshBufferSize; meshIndex++) meshBuffer.get(meshIndex).setMesh(null); } }
meshDataInstruction.setAppearance(BLACK_APPEARANCE); break; case VELOCITY_BASED: graphics3DAddMeshDataInstructions[i].setAppearance(colorPalette[colorIndex]); graphics3DAddMeshDataInstructions[i].setAppearance(colorPalette[colorIndex]);
instructionToUpdate.setAppearance(appearance);