Package javax.media.j3d

Examples of javax.media.j3d.LineStripArray


            if (firstGeometryHasTextureCoordinateIndices) {
              format |= IndexedGeometryArray.TEXTURE_COORDINATE_2;
            }
           
            // Use non indexed line array to avoid referencing the whole vertices
            geometryArray = new LineStripArray(coordinatesIndices.length, format, stripCounts);           
            for (int j = 0; j < coordinatesIndices.length; j++) {
              geometryArray.setCoordinate(j, vertices [coordinatesIndices [j]]);
            }
            if (firstGeometryHasTextureCoordinateIndices) {
              for (int j = 0; j < coordinatesIndices.length; j++) {
View Full Code Here


                    verticesIndices, triangleIndex, vertices, exportedTriangles);
                triangleIndex = exportTriangle(quadArray, i + 2, i + 3, i,
                    verticesIndices, triangleIndex, vertices, exportedTriangles);
              }
            } else if (geometryArray instanceof LineStripArray) {
              LineStripArray lineStripArray = (LineStripArray)geometryArray;
              for (int initialIndex = 0, lineIndex = 0, strip = 0; strip < stripVertexCount.length; strip++) {
                for (int i = initialIndex, n = initialIndex + stripVertexCount [strip] - 1;
                     i < n; i++, lineIndex += 2) {
                  exportLine(lineStripArray, i, i + 1, verticesIndices, lineIndex);
                }
View Full Code Here

    }
   
    private static final Shape3D makeECMOutline(int range) {
        double[] outline = makeECMCoords(range);

        LineStripArray l = new LineStripArray(outline.length, LineStripArray.COORDINATES, new int[] { outline.length/3 });
        l.setCoordinates(0, outline);

        return new Shape3D(l);
    }
View Full Code Here

       
        return gi.getGeometryArray();
    }

    private static final GeometryArray makeArrowOutline() {
        LineStripArray l = new LineStripArray(arrowVertices.length, LineStripArray.COORDINATES, arrowStrips);
        l.setCoordinates(0, arrowVertices);
        return l;
    }
View Full Code Here

       
        return gi.getGeometryArray();
    }

    static final GeometryArray makeArrowOutline(double length) {
        LineStripArray l = new LineStripArray(arrowVertices.length, LineStripArray.COORDINATES, arrowStrips);
        double[] vertices = new double[arrowVertices.length];
        System.arraycopy(arrowVertices, 0, vertices, 0, vertices.length);
       
        length -= BoardModel.HEX_DIAMETER/2;
        for (int i = 0; i < 5; i++) vertices[3*i+1] += length;
        vertices[3*5+1] += BoardModel.HEX_DIAMETER/2;
        vertices[3*6+1] += BoardModel.HEX_DIAMETER/2;
        vertices[3*7+1] += length;
       
        l.setCoordinates(0, vertices);
        return l;
    }
View Full Code Here

       
        return gi.getGeometryArray();
    }

    private static final GeometryArray makeHexOutline() {
        LineStripArray l = new LineStripArray(hexVertices.length, LineStripArray.COORDINATES, new int[] { hexVertices.length/3 });
        l.setCoordinates(0, hexVertices);
        return l;
    }
View Full Code Here

  }
 
  public void dessinerLigne(List<Point> ligne){
    BranchGroup bg = new BranchGroup();
    int stripVertexCounts[] = {ligne.size()};
    LineStripArray ligneArray = new LineStripArray(ligne.size(), LineArray.COORDINATES | LineArray.COLOR_3, stripVertexCounts);
    for (int i=0; i<ligne.size(); i++){
      ligneArray.setCoordinate(i, new Point3d(ligne.get(i).y, ligne.get(i).z + 0.2, ligne.get(i).x));
      ligneArray.setColor(i, new Color3f(Color.blue));
    }
    bg.addChild(new Shape3D(ligneArray));
    simpleU.addBranchGraph(bg);
  }
View Full Code Here

/* 54 */     return createNode(j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, this.texCoordSetMap.getClass(), this.stripVertexCounts.getClass() }, new Object[] { new Integer(this.vertexCount), new Integer(this.vertexFormat), new Integer(this.texCoordSetCount), this.texCoordSetMap, this.stripVertexCounts });
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode()
/*    */   {
/* 70 */     return new LineStripArray(this.vertexCount, this.vertexFormat, this.texCoordSetCount, this.texCoordSetMap, this.stripVertexCounts);
/*    */   }
View Full Code Here

TOP

Related Classes of javax.media.j3d.LineStripArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.