Appearance app = new Appearance(); ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f, 204.0f), ColoringAttributes.SHADE_FLAT); app.setColoringAttributes(ca);
Appearance app = new Appearance(); ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f, 204.0f), ColoringAttributes.SHADE_FLAT); app.setColoringAttributes(ca);
Appearance app = new Appearance(); ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f, 204.0f), ColoringAttributes.SHADE_FLAT); app.setColoringAttributes(ca);
Appearance app = new Appearance(); ColoringAttributes ca = new ColoringAttributes(new Color3f(204.0f, 204.0f,204.0f), ColoringAttributes.SHADE_FLAT); app.setColoringAttributes(ca);
Appearance app = new Appearance();
Appearance app = new Appearance(); Vector3f [] normals=new Vector3f[24]; for(int i=0;i<24;i++)normals[i]=new Vector3f();
@Override protected org.scijava.java3d.SceneGraphObject createNode() { return new Appearance(); }
/** * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate) */ @Override public NodeComponent cloneNodeComponent() { Appearance a = new Appearance(); a.duplicateNodeComponent(this); return a; }
private static void createAppearances() { normalAppearance = new Appearance(); normalAppearance.setMaterial(normalMaterial); selectedAppearance = new Appearance(); selectedAppearance.setMaterial(selectedMaterial); TransparencyAttributes ta = new TransparencyAttributes(); ta.setTransparencyMode (TransparencyAttributes.BLENDED); ta.setTransparency (DEFAULT_HISTOGRAM_ALPHA); normalAppearance.setTransparencyAttributes (ta); selectedAppearance.setTransparencyAttributes(ta); }
Appearance appearanceGreen = new Appearance(); ColoringAttributes coloringAttributesGreen = new ColoringAttributes(); coloringAttributesGreen.setColor(new Color3f(Color.green)); appearanceGreen.setColoringAttributes(coloringAttributesGreen); Shape3D shapeLine = new Shape3D(lineX, appearanceGreen); scene.addChild(shapeLine);
static TextureLoader loader = new TextureLoader("C:\\Users\\Sawyera\\Desktop\\Paint Layer 1.jpg", "RGP", new Container()); static Texture texture = loader.getTexture(); texture.setBoundaryModeS(Texture.WRAP); texture.setBoundaryModeT(Texture.WRAP); texture.setBoundaryColor(new Color4f(0.0f, 1.0f, 0.0f, 0.0f)); TextureAttributes texAttr = new TextureAttributes(); texAttr.setTextureMode(TextureAttributes.MODULATE); Appearance ap = new Appearance(); ap.setTexture(texture); ap.setTextureAttributes(texAttr);
Appearance polygon1Appearance = new Appearance(); // set your color here QuadArray polygon1 = new QuadArray (4, QuadArray.COORDINATES); polygon1.setCoordinate(0, new Point3f (0f, 0f, 0f)); polygon1.setCoordinate(1, new Point3f (2f, 0f, 0f)); polygon1.setCoordinate(2, new Point3f (2f, 3f, 0f)); polygon1.setCoordinate(3, new Point3f (0f, 3f, 0f)); objRoot.addChild(new Shape3D(polygon1, polygon1Appearance));
// Because we're about to spin this triangle, be sure to draw // backfaces. If we don't, the back side of the triangle is invisible. Appearance ap = new Appearance(); PolygonAttributes pa = new PolygonAttributes(); pa.setCullFace(PolygonAttributes.CULL_NONE); ap.setPolygonAttributes(pa); shape.setAppearance(ap);
private Appearance getAppearance(String f) throws Exception { Appearance app = new Appearance(); URL texImage = new java.net.URL("file:" + f); Texture tex = new TextureLoader(texImage, this).getTexture(); app.setTexture(tex); TextureAttributes texAttr = new TextureAttributes(); texAttr.setTextureMode(TextureAttributes.MODULATE); app.setTextureAttributes(texAttr); return app; }
texture.setBoundaryModeS(Texture.WRAP); texture.setBoundaryModeT(Texture.WRAP); texture.setBoundaryColor(new Color4f(0.0f, 1.0f, 0.0f, 0.0f)); TextureAttributes texAttr = new TextureAttributes(); texAttr.setTextureMode(TextureAttributes.MODULATE); Appearance ap = new Appearance(); ap.setTexture(texture); ap.setTextureAttributes(texAttr); int primflags = Primitive.GENERATE_NORMALS + Primitive.GENERATE_TEXTURE_COORDS; ObjectFile loader = new ObjectFile(ObjectFile.RESIZE);
Appearance appearance = new Appearance(); Material material = new Material(); material.setDiffuseColor(1.0f, 0.0f, 0.0f); // red material.setSpecularColor(0.2f, 0.2f, 0.2f); // reduce default values appearance.setMaterial(material);
private Appearance createAppearance(final Color3f color) { final Appearance a = new Appearance(); final PolygonAttributes pa = new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); a.setPolygonAttributes(pa); final ColoringAttributes ca = new ColoringAttributes(); ca.setColor(color); a.setColoringAttributes(ca); return a; }
public Appearance createTextAppearance() { final Appearance textAppear = new Appearance(); final ColoringAttributes textColor = new ColoringAttributes(); textColor.setColor(color); textAppear.setColoringAttributes(textColor); final PolygonAttributes pa = new PolygonAttributes(); pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); textAppear.setPolygonAttributes(pa); return textAppear; }
/** Sets the main appearance of the primitive (all subparts) to * a default white appearance. */ public void setAppearance(){ Color3f aColor = new Color3f(0.1f, 0.1f, 0.1f); Color3f eColor = new Color3f(0.0f, 0.0f, 0.0f); Color3f dColor = new Color3f(0.6f, 0.6f, 0.6f); Color3f sColor = new Color3f(1.0f, 1.0f, 1.0f); Material m = new Material(aColor, eColor, dColor, sColor, 100.0f); Appearance a = new Appearance(); m.setLightingEnable(true); a.setMaterial(m); setAppearance(a); }
public Appearance getAppearance(final CubeData cdata, final int index) { final Appearance a = new Appearance(); a.setMaterial(material); a.setTransparencyAttributes(transAttr); a.setPolygonAttributes(polyAttr); a.setColoringAttributes(colAttr); a.setRenderingAttributes(rendAttr); a.setTexture(getTexture(cdata, index)); a.setTexCoordGeneration(cdata.tg); a.setTextureAttributes(texAttr); return a; }