Package cc.sketchchair.geometry

Examples of cc.sketchchair.geometry.SlicePlane


    if (GLOBAL.sketchChairs.getCurChair() != null) {

      for (int i = 0; i < GLOBAL.sketchChairs.getCurChair().slicePlanesSlatSlices
          .size(); i++) {
        SlicePlane plane = GLOBAL.sketchChairs.getCurChair().slicePlanesSlatSlices
            .get(i);
        if (plane.getCrossSliceSelection() != null
            && plane.getCrossSliceSelection().selected) {
          plane.select();
          GLOBAL.sketchChairs.getCurChair().selectedPlanes.add(plane);

        }
      }
View Full Code Here


    // TODO Auto-generated constructor stub
  }

  private SlicePlane getMirrored(SlicePlane overPlane) {
    for (int i = 0; i < this.planes.getList().size(); i++) {
      SlicePlane curPlane = this.planes.getList().get(i);

      if (overPlane == curPlane) {
        int mirrorIndex = 0;

        mirrorIndex = this.planes.getList().size() - i;

        SlicePlane returnPlane = this.planes.getList().get(
            mirrorIndex - 1);

        if (returnPlane == overPlane)
          return null;
        else
View Full Code Here

  }

  public void mouseReleased(float mouseX, float mouseY) {

    SlicePlane overPlane = this.getMouseOver(mouseX, mouseY);
    planeClickedOn(overPlane);
  }
View Full Code Here

 
 
  public void planeClickedOn(SlicePlane plane) {
   
   
    SlicePlane overPlane = plane;
    SlicePlane mirroredPlane = null;

    if (overPlane != null) {
     
      if (this.mirrorSelection)
        mirroredPlane = this.getMirrored(overPlane);

      if (GLOBAL.uiTools.keyPressed
          && (GLOBAL.uiTools.keyCode == PConstants.CONTROL || GLOBAL.uiTools.keyCode == 157)) {
        if (GLOBAL.sketchChairs.getCurChair().selectedPlanes.getList()
            .contains(overPlane)) {
          GLOBAL.sketchChairs.getCurChair().selectedPlanes.getList()
              .remove(overPlane);
        } else {
          GLOBAL.sketchChairs.getCurChair().selectedPlanes
              .add(overPlane);
          overPlane.setSelected(true);
        }

        if (mirroredPlane != null) {
          if (GLOBAL.sketchChairs.getCurChair().selectedPlanes
              .getList().contains(mirroredPlane)) {
            GLOBAL.sketchChairs.getCurChair().selectedPlanes
                .getList().remove(mirroredPlane);
          } else {
            GLOBAL.sketchChairs.getCurChair().selectedPlanes
                .add(mirroredPlane);
            mirroredPlane.setSelected(true);
          }
        }

      } else {
        GLOBAL.sketchChairs.getCurChair().slicePlanesSlatSlices.unselectAll();
        GLOBAL.sketchChairs.getCurChair().selectedPlanes.unselectAll();
        GLOBAL.sketchChairs.getCurChair().selectedPlanes.empty();
        GLOBAL.sketchChairs.getCurChair().selectedPlanes.add(overPlane);
       
       
        overPlane.setSelected(true);
        //GLOBAL.sketchChairs.getCurChair().selectedPlanes
        //.add(overPlane);
        if (mirroredPlane != null) {
          GLOBAL.sketchChairs.getCurChair().selectedPlanes
              .add(mirroredPlane);
          mirroredPlane.setSelected(true);

        }
      }

    }
View Full Code Here

TOP

Related Classes of cc.sketchchair.geometry.SlicePlane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.