/** * 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); } }
/** * modifie la transparence de l'objet. */ public void setTransparence(final float _t) { shape_.getAppearance().getTransparencyAttributes().setTransparency(_t); }
public void start() { trajectoire_ = new RotPosPathInterpolator(new Alpha(nbCycles_, temps_), univers_.getTransformGroup(), axe_, pourcentAtIndex_, directions_, positions_); trajectoire_.setSchedulingBounds(new BoundingSphere()); bg_ = new BranchGroup(); bg_.setCapability(BranchGroup.ALLOW_DETACH); bg_.addChild(trajectoire_); univers_.addBranchGraph(bg_); }
private Transform3D getTransform () { Transform3D t = new Transform3D(); tg.getTransform(t); return t; }
public void detach() { super.detach(); bbox_.setLower(null); bbox_.setUpper(null); shape_.getAppearance().setMaterial(null); shape_.setAppearance(null); shape_.removeAllGeometries(); switch_.removeAllChildren(); }
/** * recupere la brillance de l'objet. */ public float getBrillance() { return shape_.getAppearance().getMaterial().getShininess(); }
/** * modifie la brillance de l'objet. */ public void setBrillance(final double _b) { shape_.getAppearance().getMaterial().setShininess((float) _b); }
public boolean isEclairage() { return shape_.getAppearance().getMaterial().getLightingEnable(); }
/** * recupere la transparence de l'objet. */ public float getTransparence() { return shape_.getAppearance().getTransparencyAttributes().getTransparency(); }
/** * mode de la texture (Modulate/Decal/Replace/Blend). */ public void setTextureAttributesMode(final int _mode) { shape_.getAppearance().getTextureAttributes().setTextureMode(_mode); }
/** * l'objet est affich en fil de fer? */ public boolean isFilaire() { return (shape_.getAppearance().getPolygonAttributes().getPolygonMode() == PolygonAttributes.POLYGON_LINE); }
/** * Construit et initialise le groupe. */ public BGroupeVolume() { switch_ = new Switch(Switch.CHILD_MASK); switch_.setCapability(Group.ALLOW_CHILDREN_EXTEND); switch_.setCapability(Group.ALLOW_CHILDREN_READ); switch_.setCapability(Group.ALLOW_CHILDREN_WRITE); switch_.setCapability(Switch.ALLOW_SWITCH_WRITE); switch_.setCapability(Switch.ALLOW_SWITCH_READ); switch_.setCapability(ALLOW_DETACH); tg_.addChild(switch_); }
/** * affiche ou non le texture. */ public void setTextureEnable(final boolean _activee) { try { shape_.getAppearance().getTexture().setEnable(_activee); } catch (final Exception e) {} }
public int getTextureAttributesMode() { return shape_.getAppearance().getTextureAttributes().getTextureMode(); }
/** * renvoie la couleur de l'objet. */ public Color getCouleur() { final Color3f couleur = new Color3f(); shape_.getAppearance().getColoringAttributes().getColor(couleur); return couleur.get(); }
/** * Ajoute une Branche l'arbre de la scene, apres l'avoir compile. * * @param _bg BranchGroup ajouter */ public void addBranchGraph(final BranchGroup _bg) { if (!_bg.isCompiled()) { _bg.compile(); } locale_.addBranchGraph(_bg); }
/** * Constructor. */ public VKeyBehavior() { wakeupOne = new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED); wakeupArray[0] = wakeupOne; wakeupCondition = new WakeupOr(wakeupArray); }
public void affiche() { //for (int i=0;i<10;i++) System.out.print(" "+next_figure_[i]); //System.out.println(); ((IndexedGeometryArray)shape_.getGeometry()).setCoordinates( 0, next_figure_); } }
private Transform3D getTransform () { Transform3D t = new Transform3D(); tg.getTransform(t); return t; }