I saw that last month thgere was a question about holes in a polygon. An answer was that it has to do with the order of coordinates input but. But it doesn't work If u change the order of coordinates of the hole i see on the back side of the polygon the "hole" in the appearance of the frontside of the polygon. But on the front the frontside of the polygon there is no hole.
 
piece of my code:
 
 Coords = new Point3f[nr+4];
  for(int i = 0; i < nr; i++)
  {
   Coords[i] = new Point3f((float)voorAanzicht.xpoints[i], (float)voorAanzicht.ypoints[i], 0);
}
  Coords[4] = new Point3f(-5.0f,1.0f,0);
  Coords[7] = new Point3f(2.0f,1.0f,0);
  Coords[6] = new Point3f(2.0f,3.0f,0);
  Coords[5] = new Point3f(-2.0f,3.0f,0);
 
  coordinateIndices = new int[2];
  coordinateIndices[0] = nr;
  coordinateIndices[1] = 4;
 

  GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
   gi.setCoordinates( Coords );
   gi.setStripCounts( coordinateIndices );
 
  Triangulator tr = new Triangulator();
   tr.triangulate(gi);
  NormalGenerator ng = new NormalGenerator();
   ng.generateNormals( gi );
  Stripifier st = new Stripifier();
   st.stripify( gi );
 
  vormpje = new Shape3D(gi.getGeometryArray(), appearance);
  totalShape .addChild( vormpje );
 
Can anybody help me
AANT

Reply via email to