public Appearance getAppearence() { return shape_.getAppearance(); }
public Texture getTexture() { return shape_.getAppearance().getTexture(); }
public RenderingAttributes getRenderingAttributes() { return shape_.getAppearance().getRenderingAttributes(); }
public void setRenderingAttributes(final RenderingAttributes _att) { shape_.getAppearance().setRenderingAttributes(_att); }
/** * affiche ou non le texture. */ public void setTextureEnable(final boolean _activee) { try { shape_.getAppearance().getTexture().setEnable(_activee); } catch (final Exception e) {} }
/** * mode de la texture (Modulate/Decal/Replace/Blend). */ public void setTextureAttributesMode(final int _mode) { shape_.getAppearance().getTextureAttributes().setTextureMode(_mode); }
/** * mode ombr ou pas. */ public void setEclairage(final boolean _valeur) { shape_.getAppearance().getMaterial().setLightingEnable(_valeur); }
/** * affiche l'objet en fil de fer. */ public void setFilaire(final boolean _filaire) { if (_filaire) { shape_.getAppearance().getPolygonAttributes().setPolygonMode(PolygonAttributes.POLYGON_LINE); } else { shape_.getAppearance().getPolygonAttributes().setPolygonMode(PolygonAttributes.POLYGON_FILL); } }
/** * recupere la transparence de l'objet. */ public float getTransparence() { return shape_.getAppearance().getTransparencyAttributes().getTransparency(); }
/** * modifie la transparence de l'objet. */ public void setTransparence(final float _t) { shape_.getAppearance().getTransparencyAttributes().setTransparency(_t); }
/** * recupere la brillance de l'objet. */ public float getBrillance() { return shape_.getAppearance().getMaterial().getShininess(); }
public boolean isTextureEnable() { try { if (shape_.getAppearance().getTexture() != null) { return shape_.getAppearance().getTexture().getEnable(); } } catch (final RuntimeException _evt) { FuLog.error(_evt); } return false; }
/** * applique la texture t sur l'objet. */ public void setTexture(final Texture _t) { final Appearance appearance = shape_.getAppearance(); if (_t != null) { updateTextureCapabilities(_t); } appearance.setTexture(_t); }
/** * modifie la brillance de l'objet. */ public void setBrillance(final double _b) { shape_.getAppearance().getMaterial().setShininess((float) _b); }
/** * l'objet est affich en fil de fer? */ public boolean isFilaire() { return (shape_.getAppearance().getPolygonAttributes().getPolygonMode() == PolygonAttributes.POLYGON_LINE); }
public int getTextureAttributesMode() { return shape_.getAppearance().getTextureAttributes().getTextureMode(); }
public boolean isEclairage() { return shape_.getAppearance().getMaterial().getLightingEnable(); }
/** * renvoie la couleur de l'objet. */ public Color getCouleur() { final Color3f couleur = new Color3f(); shape_.getAppearance().getColoringAttributes().getColor(couleur); return couleur.get(); }
private void setColor (Group g, Color c) { for (int i = 0; i < g.numChildren(); i++) { Node child = g.getChild(i); if (child instanceof Shape3D) { Shape3D shape = (Shape3D)child; Appearance ap = shape.getAppearance(); setColor(ap, c); } else if (child instanceof Primitive) { Primitive primitive = (Primitive)child; Appearance ap = primitive.getAppearance(); setColor(ap, c); } else if (child instanceof Group) { setColor((Group)child, c); } } }
public void detach() { super.detach(); bbox_.setLower(null); bbox_.setUpper(null); shape_.getAppearance().setMaterial(null); shape_.setAppearance(null); shape_.removeAllGeometries(); switch_.removeAllChildren(); }