Package javax.media.j3d

Examples of javax.media.j3d.TransformGroup.removeAllChildren()


   * Sets the <code>model</code> displayed by this component.
   * The model is shown at its default orientation and in a box of 1 unit wide.
   */
  public void setModel(BranchGroup model) {
    TransformGroup modelTransformGroup = (TransformGroup)this.sceneTree.getChild(0);
    modelTransformGroup.removeAllChildren();
    if (model != null) {
      model = (BranchGroup)ModelManager.getInstance().cloneNode(model);
      model.setCapability(BranchGroup.ALLOW_DETACH);
      setNodeCapabilities(model);
     
View Full Code Here


    setModelCapabilities(modelBranch);

    TransformGroup transformGroup = (TransformGroup)getChild(0);
    // Remove previous nodes   
    transformGroup.removeAllChildren();
    // Add model branch to live scene
    transformGroup.addChild(modelBranch);
   
    // Update piece color, visibility and model mirror in dispatch thread as
    // these attributes may be changed in that thread
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.