Hi,
I tried to build a box with the GeometryInfo classes the following way:

        // Coordinates
        // needs to be counter clockwise
        Point3f[] coords = new Point3f[4*6];
        // front side
        coords[0]=new Point3f(eastValue-w,heightValue-c,northValue+l);
        coords[1]=new Point3f(eastValue+w,heightValue-c,northValue+l);
        coords[2]=new Point3f(eastValue+w,heightValue+c,northValue+l);
        coords[3]=new Point3f(eastValue-w,heightValue+c,northValue+l);
        // right side
        coords[4]=new Point3f(eastValue+w,heightValue-c,northValue+l);
        coords[5]=new Point3f(eastValue+w,heightValue-c,northValue-l);
        coords[6]=new Point3f(eastValue+w,heightValue+c,northValue-l);
        coords[7]=new Point3f(eastValue+w,heightValue+c,northValue+l);
        // top side
        coords[8]=new Point3f(eastValue-w,heightValue+c,northValue+l);
        coords[9]=new Point3f(eastValue+w,heightValue+c,northValue+l);
        coords[10]=new Point3f(eastValue+w,heightValue+c,northValue-l);
        coords[11]=new Point3f(eastValue-w,heightValue+c,northValue-l);
        // back side
        coords[12]=new Point3f(eastValue+w,heightValue-c,northValue-l);
        coords[13]=new Point3f(eastValue-w,heightValue-c,northValue-l);
        coords[14]=new Point3f(eastValue-w,heightValue+c,northValue-l);
        coords[15]=new Point3f(eastValue+w,heightValue+c,northValue-l);
        // left side
        coords[16]=new Point3f(eastValue-w,heightValue-c,northValue-l);
        coords[17]=new Point3f(eastValue-w,heightValue-c,northValue+l);
        coords[18]=new Point3f(eastValue-w,heightValue+c,northValue+l);
        coords[19]=new Point3f(eastValue-w,heightValue+c,northValue-l);
        // down side
        coords[20]=new Point3f(eastValue-w,heightValue-c,northValue+l);
        coords[21]=new Point3f(eastValue+w,heightValue-c,northValue+l);
        coords[22]=new Point3f(eastValue+w,heightValue-c,northValue-l);
        coords[23]=new Point3f(eastValue-w,heightValue-c,northValue-l);

        GeometryInfo gInfo = new GeometryInfo(GeometryInfo.QUAD_ARRAY);
        int[] stripCounts = {4,4,4,4,4,4};
        gInfo.setCoordinates(coords);
        gInfo.setStripCounts(stripCounts);

        shape3d.setGeometry(gInfo.getGeometryArray());
        shape3d.setAppearance(createAppearance());

I think the box consists of 6 side with 4 coordinates for one side.

But unfortunately I get the following error:

Exception occurred during event dispatching:
java.lang.IllegalArgumentException: StripCounts inconsistent with
primitive
        at
com.sun.j3d.utils.geometry.GeometryInfo.checkForBadData(GeometryInfo.
java:1301)
        at
com.sun.j3d.utils.geometry.GeometryInfo.getGeometryArray(GeometryInfo
.java:1546)
        at app.gwvis.ConstructionSite.makeSite(ConstructionSite.java:138)
        at app.gwvis.ConstructionSite.<init>(ConstructionSite.java:55)
        at

...

What is wrong or what has to be in Stripcounts when not the number of the
vertices for each shape?

I am lost.

Thanks for your help in advance

Thanks Desiree

PS: I do not want to use the utility box class.

o------------------------------------------------------------------------o
| Desiree Hilbring      Institut fuer Photogrammetrie und Fernerkundung  |
|                       Universitaet Karlsruhe, Germany                  |
|                                                                        |
|                       email: [EMAIL PROTECTED]             |
|                       # 0721 6083676                                   |
o------------------------------------------------------------------------o

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to