public void onDoubleTouched(float x0,float y0,float x1,float y1){
  float[] pickPoint0=rayPick(x0,y0);
  float[] pickPoint1=rayPick(x1,y1);
  float width=Math.abs(pickPoint0[0] - pickPoint1[0]) * PUFFIN_FIREWORK_SIZE_FACTOR;
  float height=Math.abs(pickPoint0[0] - pickPoint1[0]) * PUFFIN_FIREWORK_SIZE_FACTOR;
  float touchedCenterX=(x0 + x1) / 2;
  float touchedCenterY=(y0 + y1) / 2;
  float[] centerPoint=rayPick(touchedCenterX,touchedCenterY);
  Log.i(TAG,"picked Point = " + centerPoint[0] + ", "+ centerPoint[1]+ ", "+ centerPoint[2]);
  float[] newModuleMatrix=new float[16];
  Matrix.setIdentityM(newModuleMatrix,0);
  Matrix.translateM(newModuleMatrix,0,centerPoint[0],centerPoint[1],centerPoint[2]);
  float x=centerPoint[0];
  float y=centerPoint[1];
  float z=centerPoint[2];
  float thickness=2 + 0.1f * (float)mRandomGenerator.nextGaussian();
  int density=150 + (int)(20 * mRandomGenerator.nextGaussian());
  GLImageFirework firework=new GLImageFirework(100,x,y,z,2f,width,height,density,thickness);
  float xAngle=(float)(2 * mRandomGenerator.nextGaussian());
  float yAngle=(float)(2 * mRandomGenerator.nextGaussian());
  float zAngle=(float)(4 * mRandomGenerator.nextGaussian());
  firework.setRotation(xAngle,yAngle,zAngle);
  firework.setAlpha(0.9f + mRandomGenerator.nextFloat() / 10);
  firework.setColor(1.0f,1.0f,1.0f,1.0f);
  firework.bindShader(mFireworkImageShader);
synchronized (mFireworks) {
    mFireworks.add(firework);
  }
}

public void onDoubleTouched ( float x0 , float y0 , float x1 , float y1 ) { float [ ] pickPoint0 = rayPick ( x0 , y0 ) ; float [ ] pickPoint1 = rayPick ( x1 , y1 ) ; float width = Math . abs ( pickPoint0 [ 0 ] - pickPoint1 [ 0 ] ) * PUFFIN_FIREWORK_SIZE_FACTOR ; float height = Math . abs ( pickPoint0 [ 0 ] - pickPoint1 [ 0 ] ) * PUFFIN_FIREWORK_SIZE_FACTOR ; float touchedCenterX = ( x0 + x1 ) / 2 ; float touchedCenterY = ( y0 + y1 ) / 2 ; float [ ] centerPoint = rayPick ( touchedCenterX , touchedCenterY ) ; Log . i ( TAG , "picked Point = " + centerPoint [ 0 ] + ", " + centerPoint [ 1 ] + ", " + centerPoint [ 2 ] ) ; float [ ] newModuleMatrix = new float [ 16 ] ; Matrix . setIdentityM ( newModuleMatrix , 0 ) ; Matrix . translateM ( newModuleMatrix , 0 , centerPoint [ 0 ] , centerPoint [ 1 ] , centerPoint [ 2 ] ) ; float x = centerPoint [ 0 ] ; float y = centerPoint [ 1 ] ; float z = centerPoint [ 2 ] ; float thickness = 2 + 0.1f * ( float ) mRandomGenerator . nextGaussian ( ) ; int density = 150 + ( int ) ( 20 * mRandomGenerator . nextGaussian ( ) ) ; GLImageFirework firework = new GLImageFirework ( 100 , x , y , z , 2f , width , height , density , thickness ) ; float xAngle = ( float ) ( 2 * mRandomGenerator . nextGaussian ( ) ) ; float yAngle = ( float ) ( 2 * mRandomGenerator . nextGaussian ( ) ) ; float zAngle = ( float ) ( 4 * mRandomGenerator . nextGaussian ( ) ) ; firework . setRotation ( xAngle , yAngle , zAngle ) ; firework . setAlpha ( 0.9f + mRandomGenerator . nextFloat ( ) / 10 ) ; firework . setColor ( 1.0f , 1.0f , 1.0f , 1.0f ) ; firework . bindShader ( mFireworkImageShader ) ; synchronized ( mFireworks ) { mFireworks . add ( firework ) ; } }
handle the double touched event .
