Package com.sun.j3d.utils.geometry

Examples of com.sun.j3d.utils.geometry.NormalGenerator


        GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
        gi.setCoordinates(top);
        gi.setStripCounts(new int[] { top.length/3 });
        gi.setContourCounts(new int[] { 1 });

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);

        Stripifier st = new Stripifier();
        st.stripify(gi);
       
        return new Shape3D(gi.getGeometryArray());
View Full Code Here


        GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_STRIP_ARRAY);
        gi.setCoordinates(border);
        gi.setStripCounts(new int[] { border.length/3 });

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);

        Stripifier st = new Stripifier();
        st.stripify(gi);
       
        return new Shape3D(gi.getGeometryArray());
View Full Code Here

        };
        gi.setCoordinates(coords);
        gi.setTextureCoordinateParams(1, 2);
        gi.setTextureCoordinates(0, tcoords);
       
        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);

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

        return gi.getGeometryArray();
View Full Code Here

        gi.setCoordinates(vertices);
        gi.setStripCounts(count);
        gi.setTextureCoordinateParams(1, 2);
        gi.setTextureCoordinates(0, texcoords);

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
       
        Stripifier st = new Stripifier();
        st.stripify(gi);

        geom[0] = gi.getGeometryArray();
View Full Code Here

        }
       
        gi.setCoordinates(coords);
        gi.setStripCounts(new int[] { coords.length/3 });
       
        NormalGenerator ng = new NormalGenerator(0);
        ng.generateNormals(gi);

        Stripifier st = new Stripifier();
        st.stripify(gi);
       
        return gi.getGeometryArray();
View Full Code Here


    GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_ARRAY);
    gi.setCoordinates(tetrahedronCoordinates);
    gi.setCoordinateIndices(coordIndices);
    NormalGenerator ng = new NormalGenerator();

//The parameter specifying up to which angle normal vectors should be
//interpolated, is se here.
    ng.setCreaseAngle(Math.PI);

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

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

        gi.setCoordinates(coords);
        gi.setStripCounts(stripCount);
        gi.recomputeIndices();
       

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        gi.recomputeIndices();

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();
View Full Code Here

        GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
        gi.setCoordinates(coordinateData);
        gi.setStripCounts(stripCount);
        gi.recomputeIndices();

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        gi.recomputeIndices();

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();
View Full Code Here

        GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
        gi.setCoordinates(coordinateData);
        gi.setStripCounts(stripCount);
        gi.recomputeIndices();

        NormalGenerator ng = new NormalGenerator();
        ng.generateNormals(gi);
        gi.recomputeIndices();

        Stripifier st = new Stripifier();
        st.stripify(gi);
        gi.recomputeIndices();
View Full Code Here


    GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_ARRAY);
    gi.setCoordinates(tetrahedronCoordinates);
    gi.setCoordinateIndices(coordIndices);
    NormalGenerator ng = new NormalGenerator();
    ng.generateNormals(gi);
    GeometryArray te = gi.getGeometryArray();

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

TOP

Related Classes of com.sun.j3d.utils.geometry.NormalGenerator

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.