/** * Returns a wired appearance without lighting and anti-aliasing. * * @param color the color of the appearance * @param lineWidth the width of the lines (wires) * @return the appearance */ public Appearance getLinedAppearanceWithoutLighting(Color color, Float lineWidth) { Appearance a = new Appearance(); PolygonAttributes pa = new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); a.setPolygonAttributes(pa); LineAttributes la = new LineAttributes(); la.setLineAntialiasingEnable(false); la.setLineWidth(lineWidth); a.setLineAttributes(la); float r = color.getRed() / 255.f; float g = color.getGreen() / 255.f; float b = color.getBlue() / 255.f; ColoringAttributes ca = new ColoringAttributes(r, g, b, ColoringAttributes.SHADE_FLAT); a.setColoringAttributes(ca); return a; }
} else { a.setColoringAttributes( new ColoringAttributes(new Color3f(r, g, b), ColoringAttributes.NICEST));
poa.setPointAntialiasingEnable(view.getSceneAntialiasingEnable()); ColoringAttributes ca = new ColoringAttributes(); ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD); ca.setColor(col);
poa.setPointAntialiasingEnable(view.getSceneAntialiasingEnable()); ColoringAttributes ca = new ColoringAttributes(); ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD); ca.setColor(col);
pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); final ColoringAttributes ca = new ColoringAttributes(); ca.setColor(new Color3f(1f, 0f, 0f)); final Appearance ap = new Appearance();
pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); final ColoringAttributes ca= new ColoringAttributes(); ca.setColor(new Color3f(1f, 0f, 0f)); final Appearance ap= new Appearance();
shape_.setCapability(Shape3D.ALLOW_APPEARANCE_OVERRIDE_WRITE); switch_.addChild(shape_); final ColoringAttributes ca = new ColoringAttributes(); ca.setCapability(ColoringAttributes.ALLOW_COLOR_READ); ca.setCapability(ColoringAttributes.ALLOW_COLOR_WRITE);