public void setAppearance(AppearanceDefinition appearance) { for (int i = 0; i < linkGraphicInstructions.size(); i++) { linkGraphicInstructions.get(i).setAppearance(appearance); } }
private void addAppearanceChangedListener(final Graphics3DInstruction instruction, final Spatial spatial) { instruction.setAppearanceChangedListener(new AppearanceChangedListener() { public void appearanceChanged(final AppearanceDefinition newAppearance) { checkIfNotImmutable(); if (newAppearance != null) { application.enqueue(new Callable<Object>() { public Material call() throws Exception { setGeometryMaterialBasedOnAppearance(spatial, newAppearance); return null; } }); } } }); }
public void setAppearance(AppearanceDefinition appearance) { for (int i = 0; i < linkGraphicInstructions.size(); i++) { linkGraphicInstructions.get(i).setAppearance(appearance); } }
private void addAppearanceChangedListener(final Graphics3DInstruction instruction, final Spatial spatial) { instruction.setAppearanceChangedListener(new AppearanceChangedListener() { public void appearanceChanged(final AppearanceDefinition newAppearance) { checkIfNotImmutable(); if (newAppearance != null) { application.enqueue(new Callable<Object>() { public Material call() throws Exception { setGeometryMaterialBasedOnAppearance(spatial, newAppearance); return null; } }); } } }); }
@Override public void unSelect(boolean reset) { boxGraphics.setAppearance(new YoAppearanceRGBColor(defaultColor, unselectTransparency)); }
public void run() { transparency += 0.01; if (transparency > 1.0) transparency = 0.0; MutableColor color = new MutableColor((float) Math.random(), (float) Math.random(), (float) Math.random()); YoAppearanceRGBColor appearance = new YoAppearanceRGBColor(color, 0.0); appearance.setTransparency(transparency); instruction.setAppearance(appearance); }
public void run() { transparency += 0.01; if (transparency > 1.0) transparency = 0.0; MutableColor color = new MutableColor((float) Math.random(), (float) Math.random(), (float) Math.random()); YoAppearanceRGBColor appearance = new YoAppearanceRGBColor(color, 0.0); appearance.setTransparency(transparency); instruction.setAppearance(appearance); }
public void run() { transparency += 0.01; if (transparency > 1.0) transparency = 0.0; Color3f color = new Color3f((float) Math.random(), (float) Math.random(), (float) Math.random()); YoAppearanceRGBColor appearance = new YoAppearanceRGBColor(color, 0.0); appearance.setTransparency(transparency); instruction.setAppearance(appearance); }
public void run() { transparency += 0.01; if (transparency > 1.0) transparency = 0.0; Color3f color = new Color3f((float) Math.random(), (float) Math.random(), (float) Math.random()); YoAppearanceRGBColor appearance = new YoAppearanceRGBColor(color, 0.0); appearance.setTransparency(transparency); instruction.setAppearance(appearance); }
public JavaFXGraphicsObject(Graphics3DObject graphics3dObject, AppearanceDefinition appearance) { if (graphics3dObject != null) { ArrayList<Graphics3DPrimitiveInstruction> graphics3dInstructions = graphics3dObject.getGraphics3DInstructions(); if (graphics3dInstructions != null) { for (Graphics3DPrimitiveInstruction instruction : graphics3dInstructions) { if (instruction instanceof Graphics3DInstruction) { Graphics3DInstruction graphicsInstruction = (Graphics3DInstruction) instruction; if (appearance != null) graphicsInstruction.setAppearance(appearance); } } setUpGraphicsFromDefinition(graphics3dInstructions); } } }
@Override public void select() { unSelect(false); boxGraphics.setAppearance(new YoAppearanceRGBColor(selectedColor, selectTransparency)); notifySelectedListenersThisWasSelected(this); }
public static void recursivelyModifyGraphics(JointDescription joint, AppearanceDefinition ghostApperance) { if (joint == null) return; LinkDescription link = joint.getLink(); if (link == null) return; LinkGraphicsDescription linkGraphics = link.getLinkGraphics(); if (linkGraphics != null) { ArrayList<Graphics3DPrimitiveInstruction> graphics3dInstructions = linkGraphics.getGraphics3DInstructions(); if (graphics3dInstructions == null) return; for (Graphics3DPrimitiveInstruction primitive : graphics3dInstructions) { if (primitive instanceof Graphics3DInstruction) { Graphics3DInstruction modelInstruction = (Graphics3DInstruction) primitive; modelInstruction.setAppearance(ghostApperance); } } } if (joint.getChildrenJoints() == null) return; for (JointDescription child : joint.getChildrenJoints()) { recursivelyModifyGraphics(child, ghostApperance); } }