Package javax.media.j3d

Examples of javax.media.j3d.Shape3D


        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();

        Shape3D part = new Shape3D();
        /*if(wireFrame==true)
                part.setAppearance(createWireFrameAppearance());
        else
                part.setAppearance(createMaterialAppearance());*/
        part.setAppearance(createMaterialAppearance(bleu));
        part.setGeometry(gi.getGeometryArray());
       
        return part;
  }
View Full Code Here


        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();

        Shape3D part = new Shape3D();
        /*if(wireFrame==true)
                part.setAppearance(createWireFrameAppearance());
        else
                part.setAppearance(createMaterialAppearance());*/
        part.setAppearance(createMaterialAppearance());
        part.setGeometry(gi.getGeometryArray());
       
        return part;
  }
View Full Code Here

    NormalGenerator ng = new NormalGenerator();
    ng.generateNormals(gi);
    GeometryArray te = gi.getGeometryArray();

    //Generate the tetrahedron as a Shape.
    Shape3D tetrahedron = new Shape3D(te,yellowApp);

    //The transformation group of the tetrahedron.
    //The tetrahedron will be rotated a little bit.
    Transform3D tfTetrahedron = new Transform3D();
    tfTetrahedron.rotX(0.4*Math.PI);
 
View Full Code Here

        Appearance a = new Appearance();
        Material m = new Material(blue, blue, white, white, 80.0f);
        m.setLightingEnable(true);
        a.setMaterial(m);

        Shape3D sh = new Shape3D();
        sh.setGeometry(text);
        sh.setAppearance(a);
        TransformGroup tg = new TransformGroup();
        Transform3D t3d = new Transform3D();
        Transform3D tDown = new Transform3D();
        Transform3D rot = new Transform3D();
        Vector3f v3f = new Vector3f(-1.6f, -1.35f, -6.5f);
View Full Code Here

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();

        _containedNode = new Shape3D();
        _containedNode.setAppearance(_appearance);
        _containedNode.setGeometry(gi.getGeometryArray());
    }
View Full Code Here

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();

        _containedNode = new Shape3D();
        _containedNode.setAppearance(_appearance);
        _containedNode.setGeometry(gi.getGeometryArray());
    }
View Full Code Here

     @exception IllegalActionException If the value of some
     *   parameters can't be obtained.
     */
    protected void _createModel() throws IllegalActionException {
        super._createModel();
        _containedNode = new Shape3D();
        _containedNode.setAppearance(_appearance);
        _containedNode.setGeometry(_getGeometry());

        if (_changesAllowedNow) {
            _containedNode.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
View Full Code Here

            align = Text3D.ALIGN_LAST;
        }

        _textGeometry.setAlignment(align);

        Shape3D shape = new Shape3D();
        shape.setGeometry(_textGeometry);
        shape.setAppearance(_appearance);

        TransformGroup scaler = new TransformGroup();
        scaler.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
        _scaleTransform = new Transform3D();
View Full Code Here

            addLeaf(treeLeaf.getTreeLeaf3D());
        }
    }

    private void addBranchShape() {
        Shape3D branchShape = new Shape3D();
        LineArray branchLine = createBranchLine();
        Appearance branchAppearance = new Appearance();
        AppearanceFactory.setColorWithColoringAttributes(branchAppearance, ColorConstants.brown);
        branchShape.setGeometry(branchLine);
        branchShape.setAppearance(branchAppearance);
        group.addChild(branchShape);
    }
View Full Code Here

            throw new IllegalArgumentException("Null tree leaf 3D state");
        }
        this.universe3D = universe3D;
        this.state = new TreeLeaf3DState(state);
        leaf.addObserver(this);
        leafShape3D = new Shape3D();
        this.branchGroup = new BranchGroup();
        branchGroup.addChild(leafShape3D);
        createLeafGeometry();
        setColor(leaf.getEfficiency());
        leafShape3D.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
View Full Code Here

TOP

Related Classes of javax.media.j3d.Shape3D

Copyright © 2018 www.massapicom. 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.