Ejemplo n.º 1
0
  /**
   * draw surfaces to pick them
   *
   * @param renderer opengl context
   */
  public void drawForPickingSurfaces(Renderer renderer) {

    renderer.disableCulling();

    drawListForPickingSurface(renderer, lists[Drawable3D.DRAW_TYPE_SURFACES]);
    drawListForPickingSurface(renderer, lists[Drawable3D.DRAW_TYPE_CLOSED_SURFACES_NOT_CURVED]);

    renderer.enableCulling();

    renderer.setCullFaceFront();
    drawListForPickingSurface(renderer, lists[Drawable3D.DRAW_TYPE_CLOSED_SURFACES_CURVED]);
    renderer.setCullFaceBack();
    drawListForPickingSurface(renderer, lists[Drawable3D.DRAW_TYPE_CLOSED_SURFACES_CURVED]);

    renderer.disableCulling();

    if (containsClippedSurfacesInclLists()) {
      renderer.enableClipPlanesIfNeeded();
      drawListForPickingSurface(renderer, lists[Drawable3D.DRAW_TYPE_CLIPPED_SURFACES]);
      renderer.disableClipPlanesIfNeeded();
    }

    renderer.enableCulling();

    // lists
    for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_LISTS].iterator(); d.hasNext(); ) {
      ((DrawList3D) d.next()).getDrawable3DLists().drawForPickingSurfaces(renderer);
    }
  }
Ejemplo n.º 2
0
  private void drawForPickingPointsAndCurves(Renderer renderer, DrawList3D parent) {

    renderer.disableCulling();

    drawListForPickingPointOrCurve(renderer, lists[Drawable3D.DRAW_TYPE_DEFAULT]);
    drawListForPickingPointOrCurve(renderer, lists[Drawable3D.DRAW_TYPE_POINTS]);
    drawListForPickingPointOrCurve(renderer, lists[Drawable3D.DRAW_TYPE_CURVES]);

    if (containsClippedCurves()) {
      renderer.enableClipPlanesIfNeeded();
      drawListForPickingPointOrCurve(renderer, lists[Drawable3D.DRAW_TYPE_CLIPPED_CURVES]);
      renderer.disableClipPlanesIfNeeded();
    }

    renderer.enableCulling();
    renderer.setCullFaceBack();

    // lists
    for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_LISTS].iterator(); d.hasNext(); ) {
      ((DrawList3D) d.next()).getDrawable3DLists().drawForPickingPointsAndCurves(renderer);
    }
  }