I have an application which generates terain data in a grid format (along
with vertex color info) and I've been feeding that data to a GeometryInfo
object so I can build a TriangleStrip array. I thought it would be
interesting to try out the new compression utilities by feeding the same
GeometryInfo object into a CompressionStream object and generating a
CompressedGeometry object from the data. When I displayed the resulting
object, I found that the geometry had been scaled down by 0.002 and that
there were some nasty artifacts (spots and black lines that vary depending
on the data) in the vertex colors. Does anyone have any thoughts about what
I might be doing wrong? (The same data displays correctly as a
TriangleStripArray.) Here's a bit of code...

  public CompressedGeometry getComp()
  {
    GeometryInfo geom = new GeometryInfo(GeometryInfo.TRIANGLE_STRIP_ARRAY);
    geom.setStripCounts(sVertCnt);
    geom.setCoordinates(verts);
    geom.setCoordinateIndices(pntsIndex);
    geom.setColors(colors);
    geom.setColorIndices(colorIndex);

    NormalGenerator norm = new NormalGenerator(creaseAngle);
    norm.generateNormals(geom);

    GeometryInfo[] geom_array = { geom };

    CompressionStream CS = new CompressionStream(geom_array);
    GeometryCompressor GC = new GeometryCompressor();

    return GC.compress(CS);
  }


Thanks

Cindy

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