Package javax.media.j3d

Examples of javax.media.j3d.Group.addChild()


            ColoringAttributes ca = new ColoringAttributes();
            ca.setColor(0.0f,0.0f,1.0f);
            a.setColoringAttributes(ca);
            Shape3D saxis = new Shape3D(la, a);
            saxis.setName("X");
            g.addChild(saxis);
           
            // Y axis in green
            axis = makeAxis(1);
            la = new LineArray(axis.length/3, LineArray.COORDINATES);
            la.setCoordinates(0,axis);
View Full Code Here


            ca = new ColoringAttributes();
            ca.setColor(0.0f,1.0f,0.0f);
            a.setColoringAttributes(ca);
            saxis = new Shape3D(la, a);
            saxis.setName("Y");
            g.addChild(saxis);
           
            // Z axis in purple
            axis = makeAxis(2);
            la = new LineArray(axis.length/3, LineArray.COORDINATES);
            la.setCoordinates(0,axis);
View Full Code Here

            ca = new ColoringAttributes();
            ca.setColor(1.0f,0.0f,1.0f);
            a.setColoringAttributes(ca);
            saxis = new Shape3D(la, a);
            saxis.setName("Z");
            g.addChild(saxis);
           
            gn.addChild(g);
           
            AddEdit ae=new AddEdit(gn, g, null);
            getNode().getTree().getUndoableEditListener().undoableEditHappened(
View Full Code Here

    }

    public void addChild(Node n) {
        Group g=(Group)getGraphObject();
        boolean forced=forceCapability(Group.ALLOW_CHILDREN_EXTEND);
        g.addChild(n);
        if(forced) restoreCapability(Group.ALLOW_CHILDREN_EXTEND);
        if(_ad!=null){
            _ad.attach();
            _ad=null;
        }
View Full Code Here

                if (sharedGroup == null) {
                  sharedGroup = new SharedGroup();
                  sharedGroup.addChild(nodes.get(nodeInstanceAnchor));
                  instantiatedNodes.put(nodeInstanceAnchor, sharedGroup);
                }
                parentTransformGroup.addChild(new Link(sharedGroup));
              }
            });
        }
      } else if ("instance_material".equals(name) && !this.parentGroups.empty()) {
        String materialInstanceTarget = attributes.getValue("target");
View Full Code Here

      if (node instanceof Group) {
        Group group = (Group)node;
        Group clonedGroup = (Group)clonedNode;
        for (int i = 0, n = group.numChildren(); i < n; i++) {
          Node clonedChild = cloneNode(group.getChild(i), clonedSharedGroups);
          clonedGroup.addChild(clonedChild);
        }
      }
      return clonedNode;
    }
  }
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.