示例#1
0
 private void clusterCircle(final GL gl, float xRot, float yRot, Node aref) {
   aref.spiralcluster = false;
   int jcount = 0;
   float matrix[] = new float[16];
   float rad = aref.cluster.size();
   float clusterDist = calcClusterDistance(aref);
   for (Node bref : aref.cluster) {
     if (bref != null) {
       gl.glPushMatrix();
       gl.glLoadIdentity();
       gl.glTranslatef(aref.pos.x, aref.pos.y, aref.pos.z);
       //				gl.glRotatef(xRot, 0, 1, 0);
       //				gl.glRotatef(yRot, 1, 0, 0);
       gl.glRotatef(90 + 360 * jcount / rad, 0, 0, 1);
       gl.glTranslatef(-clusterDist, 0, 0);
       gl.glGetFloatv(GL.GL_MODELVIEW_MATRIX, matrix, 0);
       bref.pos.setXYZ(matrix[12], matrix[13], matrix[14]);
       gl.glPopMatrix();
       jcount++;
     }
   }
 }
示例#2
0
 private void clusterSpiral(final GL gl, float xRot, float yRot, Node aref) {
   aref.spiralcluster = true;
   glSpiral(gl, aref, aref.cluster);
 }