Examples of Shape3D


Examples of com.xith3d.scenegraph.Shape3D

    BranchGroup objRoot = new BranchGroup();

    Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    Shape3D sph = new Shape3D(TestUtils.createSphere(1.0f, 20), a);
    TransformGroup sphereTrans = new TransformGroup();
    sphereTrans.addChild(sph);

    objRoot.addChild(sphereTrans);
View Full Code Here

Examples of com.xith3d.scenegraph.Shape3D

    public CubeNodeXith3D(ActiveNode parent) {
        super(parent);
    }

    protected Shape3D createShape() {
        Shape3D s = new Shape3D(TestUtils.createCubeViaTriangles(0f,0f,0f,2f,false,true));
        anonymousNodeNumber++;
        name = NodeResourcesManager.getNodeName("Cube") + ((anonymousNodeNumber == 1) ? "" : String.valueOf(anonymousNodeNumber));
        s.setName(name);
        return s;
    }
View Full Code Here

Examples of com.xith3d.scenegraph.Shape3D

        float[] coords = GeodeMaker.createGeode(10);
      TriangleArray ta = new TriangleArray(coords.length / 3, GeometryArray.COORDINATES | GeometryArray.NORMALS);
      ta.setCoordinates(0,coords);
      ta.setNormals(0,coords);
     
      Shape3D s = new Shape3D(ta);
        anonymousNodeNumber++;
        name = NodeResourcesManager.getNodeName("Sphere") + ((anonymousNodeNumber == 1) ? "" : String.valueOf(anonymousNodeNumber));
        s.setName(name);
        return s;
    }
View Full Code Here

Examples of com.xith3d.scenegraph.Shape3D

    bg.setName("bg1");
    l.addBranchGraph(bg);
   
    Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    Shape3D sph = new Shape3D(TestUtils.createSphere(1.0f, 20), a);
    sph.setName("s1");
    TransformGroup sphereTrans = new TransformGroup();
    sphereTrans.addChild(sph);
    sphereTrans.setName("t1");

    bg.addChild(sphereTrans);
View Full Code Here

Examples of com.xith3d.scenegraph.Shape3D

        Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    ColoringAttributes ca = new ColoringAttributes();
    ca.setColor(0.0f,0.0f,1.0f);
    a.setColoringAttributes(ca);
    Shape3D saxis = new Shape3D(la, a);
    saxis.setName("X axis");
        rootGroup.addChild(saxis);
       
        // Y axis in green
        axis = AxisMaker.makeAxis(1);
        la = new LineArray(axis.length/3, LineArray.COORDINATES);
        la.setCoordinates(0,axis);
        a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    ca = new ColoringAttributes();
    ca.setColor(0.0f,1.0f,0.0f);
    a.setColoringAttributes(ca);
    saxis = new Shape3D(la, a);
    saxis.setName("Y axis");
        rootGroup.addChild(saxis);
       
        // Z axis in purple
        axis = AxisMaker.makeAxis(2);
        la = new LineArray(axis.length/3, LineArray.COORDINATES);
        la.setCoordinates(0,axis);
        a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    ca = new ColoringAttributes();
    ca.setColor(1.0f,0.0f,1.0f);
    a.setColoringAttributes(ca);
    saxis = new Shape3D(la, a);
    saxis.setName("Z axis");
        rootGroup.addChild(saxis);
       
        frame = null; // lazy creation
    }
View Full Code Here

Examples of com.xith3d.scenegraph.Shape3D

        Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    ColoringAttributes ca = new ColoringAttributes();
    ca.setColor(1.0f,1.0f,0.0f);
    a.setColoringAttributes(ca);
    lightVector = new Shape3D(la, a);
    lightVector.setName("Light vector");
        rootGroup.addChild(lightVector);
    }
View Full Code Here

Examples of javax.media.j3d.Shape3D

     */
    protected void addTo(Group bg, Iterator shapeIterator) {

        while (shapeIterator.hasNext()) {
            try {
                Shape3D shape = (Shape3D) shapeIterator.next();
                if (shape != null) {
                    bg.addChild(shape);
                }
            } catch (ClassCastException cce) {
                continue;
View Full Code Here

Examples of javax.media.j3d.Shape3D

        appear.setTexture(texture);

        appear.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.FASTEST, 0.1f));

        Shape3D planeObj = new Shape3D(plane, appear);
        addChild(planeObj);

    }
View Full Code Here

Examples of javax.media.j3d.Shape3D

                // else
                //              pointer += 2;
            }
        }

        Shape3D shape = new Shape3D(gridStrip);

        Appearance appear = new Appearance();
        PolygonAttributes polyAttrib = new PolygonAttributes();
        if (polyline) {
            polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE);
        }
        polyAttrib.setCullFace(PolygonAttributes.CULL_NONE);

        appear.setPolygonAttributes(polyAttrib);

        shape.setAppearance(appear);

        HashSet set = new HashSet();
        set.add(shape);

        return set.iterator();
View Full Code Here

Examples of javax.media.j3d.Shape3D

        double pntx = 0;
        double pnty = 0;
        double pntz = baselineHeight;

        HashSet set = new HashSet();
        Shape3D shape3D = null;

        Debug.message("3detail",
                "OMGraphicUtil.createShape3D(): figuring out coordinates");

        // Creating the data[]
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.