コード例 #1
0
ファイル: MeshComponent.java プロジェクト: GloryKuo/droidar
  /**
   * @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);
  }
コード例 #2
0
ファイル: SystemTests.java プロジェクト: GloryKuo/droidar
 private byte convInput(float input) {
   byte r = ObjectPicker.floatToByteColorValue(ObjectPicker.rgb565to888(input), false);
   return r;
 }