Exemple #1
0
  /**
   * @param selectionInterface can be the MeshComponent itself or another {@link SelectionListener}
   *     to inform that instead (eg the parent {@link Obj} or {@link GeoObj})
   */
  public void enableMeshPicking(SelectionListener selectionInterface) {
    Log.d(LOG_TAG, "Enabling picking for: " + this);
    // create a random picking color:
    Color c = Color.getRandomRGBColor();
    if (myColor != null) {
      // if the mesh has a color, use this to avoid screen-flashing;
      c.copyValues(myColor);
    }
    Log.v(LOG_TAG, "   > Sending " + c + " to ColorPicker");

    Wrapper selectionsWrapper = new Wrapper(selectionInterface);

    myPickColor = ObjectPicker.getInstance().registerMesh(selectionsWrapper, c);
    Log.v(LOG_TAG, "   > myPickColor=" + myPickColor);
  }
Exemple #2
0
 private byte convInput(float input) {
   byte r = ObjectPicker.floatToByteColorValue(ObjectPicker.rgb565to888(input), false);
   return r;
 }