92

Building 3D shapes
Building a LineStripArray

  • Create a list of 3D coordinates for the vertices
    Point3f[] myCoords = {
        new Point3f(  0.0f, 0.0f, 0.0f ),
        . . .
    }
  • Create a list of vertex strip lengths
    int[] stripLengths = { 4, 5 };
  • Create a LineStripArray and set the vertex coordinates
    LineStripArray myLines = new LineStripArray(
        myCoords.length,
        GeometryArray.COORDINATES,
        stripLengths );
    myLines.setCoordinates( 0, myCoords );
  • Assemble the shape
    Shape3D myShape = new Shape3D( myLines, myAppear );