Examples of addSelf()


Examples of toxi.geom.Plane.addSelf()

    plane.z = 0;
    //we need to rotate the plane so that it matches the one on the draw view
    plane.normal.rotateY(GLOBAL.rotateModelsY);
    plane.normal.rotateX(GLOBAL.rotateModelsX);

    plane.addSelf(plane.normal.scale(planeIn.z));
    //mouseRayDir.rotateY(GLOBAL.rotateModelsY);
    //mouseRayDir.rotateX(GLOBAL.rotateModelsX);

    mouseRayPos.subSelf(focusCentre);
    ray = new Ray3D(mouseRayPos, mouseRayDir); // this should be the world position of the mouse poiner on the 0,0,-1 plane
View Full Code Here

Examples of toxi.geom.Ray3D.addSelf()

      ray = new Ray3D(mouseRayPos, mouseRayDir.invert());
      intersect = plane.getIntersectionWithRay(ray);
    }

    ray = new Ray3D(mouseRayPos, mouseRayDir);
    ray.addSelf(focusCentre);

    //if(this.mouseDown)
    //  GLOBAL.debugRay = ray;

    if (intersect != null) {
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

  public static Vec2D rotate(Vec2D curVec, Vec2D center, float r) {
    Vec2D returnVec = curVec.copy();
    returnVec.subSelf(center);
    returnVec.rotate(r);
    returnVec.addSelf(center);
    return returnVec;
   
   
  }
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

  public static Vec2D rotate(Vec2D curVec, Vec2D center, float r) {
    Vec2D returnVec = curVec.copy();
    returnVec.subSelf(center);
    returnVec.rotate(r);
    returnVec.addSelf(center);
    return returnVec;
   
   
  }
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

    Vec2D curAnNext = curVec2.sub(prevVec);
    curAnNext.normalize();
    Vec2D newAn = curAnNext.getRotated(angle);
    newAn.normalize();
    newAn.scaleSelf(offsetDelta);
    newAn.addSelf(curVec2);
    return new SketchPoint(newAn.x, newAn.y);

  }

  public Vec2D getPerpendicular(float percent) {
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

      if (curveNormal1 != null) {
        newAnLeft1 = (Vec2D) curveNormal1
            .getRotated((float) (Math.PI / 2));
        newAnLeft1.normalize();
        newAnLeft1.scaleSelf(tempOffset);
        newAnLeft1.addSelf(curVec);

        newAnRight1 = (Vec2D) curveNormal1
            .getRotated((float) (Math.PI / 2));
        newAnRight1.normalize();
        newAnRight1.scaleSelf(-tempOffset);
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

      Vec2D dir = startLeft.copy().sub(startRight).rotate((float) (Math.PI / 2));
      dir.normalize();

      Vec2D bezierLeftStart = this.outineLeft.get(0).copy();
      bezierLeftStart.addSelf(dir.scale(startLen * 1.5f));

      Vec2D bezierRightStart = this.outineRight.get(0).copy();
      bezierRightStart.addSelf(dir.scale(startLen * 1.5f));

      this.path.addBezier(
 
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

      Vec2D bezierLeftStart = this.outineLeft.get(0).copy();
      bezierLeftStart.addSelf(dir.scale(startLen * 1.5f));

      Vec2D bezierRightStart = this.outineRight.get(0).copy();
      bezierRightStart.addSelf(dir.scale(startLen * 1.5f));

      this.path.addBezier(
          startLeft,startLeft.copy(), bezierLeftStart
              .copy());
      this.path.addBezier(startRight,
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

      Vec2D dir = startLeft.copy().sub(startRight).rotate((float) (Math.PI / 2));
      dir.normalize();

      Vec2D bezierLeftStart = this.outineLeft.get(0).copy();
      bezierLeftStart.addSelf(dir.scale(startLen * 1.5f));

      Vec2D bezierRightStart = this.outineRight.get(0).copy();
      bezierRightStart.addSelf(dir.scale(startLen * 1.5f));

     
 
View Full Code Here

Examples of toxi.geom.Vec2D.addSelf()

      Vec2D bezierLeftStart = this.outineLeft.get(0).copy();
      bezierLeftStart.addSelf(dir.scale(startLen * 1.5f));

      Vec2D bezierRightStart = this.outineRight.get(0).copy();
      bezierRightStart.addSelf(dir.scale(startLen * 1.5f));

     
      this.path.addBezier(
          startLeft,
      startLeft.copy(), bezierLeftStart
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.