Hello,

In my ObjectViewer constructor class I am adding to a switch group(which
is under a TG)
6 Shape3D objects and then I compile my rootBG and add it to my locale.
up to this point I only set the appearance but not the geometry.

in the constructor I am also doing the following:
// code
...

Switchgroup= universe.getSwitchgroup();
Switchgroup.setWhichChild(Switch.CHILD_NONE);

at runtime I am trying
childmask =geoinfo1.getChildMask();
Switchgroup.setChildMask(childmask);
 Switchgroup.setWhichChild(Switch.CHILD_ALL);

now I try to set the geometry which I loaded from a file:

        NormalGenerator ng = new NormalGenerator();

        ng.generateNormals(geoinfo.getGeometryFront());

ObjectFrontshaded.setGeometry(geoinfo.getGeometryFront().getGeometryArray());

        bound=(BoundingBox)ObjectFrontshaded.getBounds();


        ng.generateNormals(geoinfo.getGeometryFront());

ObjectFrontwired.setGeometry(geoinfo.getGeometryFront().getGeometryArray());



        ng.generateNormals(geoinfo.getGeometryBack());

ObjectBackshaded.setGeometry(geoinfo.getGeometryBack().getGeometryArray());


        ng.generateNormals(geoinfo.getGeometryBack());

ObjectBackwired.setGeometry(geoinfo.getGeometryBack().getGeometryArray());


         if(geoinfo.getonetriangleLines()!=null)
Objectonetriangle.setGeometry(geoinfo.getonetriangleLines());

          if
(geoinfo.getthreetriangleLines()!=null)Objectthreetriangle.setGeometry(geoinfo.getthreetriangleLines());



I got the following Error message at runtime:

 java.lang.ArrayIndexOutOfBoundsException
     at
javax.media.j3d.GeometryStructure.processSwitchChanged(GeometryStructure.java:317)

     at
javax.media.j3d.GeometryStructure.processMessages(GeometryStructure.java:185)

        at
javax.media.j3d.StructureUpdateThread.doWork(StructureUpdateThread.java:83)

thanks for any clue

Mohammed

===========================================================================
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