Package com.vividsolutions.jts.math

Examples of com.vividsolutions.jts.math.Vector2D.multiply()


  public void addSide(int level, Coordinate p0, Coordinate p1) {
    if (level == 0)
      addSegment(p0, p1);
    else {
      Vector2D base = Vector2D.create(p0, p1);
      Coordinate midPt = base.multiply(0.5).translate(p0);
     
      Vector2D heightVec = base.multiply(THIRD_HEIGHT);
      Vector2D offsetVec = heightVec.rotateByQuarterCircle(1);
      Coordinate offsetPt = offsetVec.translate(midPt);
     
View Full Code Here


  public void addSide(int level, Coordinate p0, Coordinate p1) {
    if (level == 0)
      addSegment(p0, p1);
    else {
      Vector2D base = Vector2D.create(p0, p1);
      Coordinate midPt = base.multiply(0.5).translate(p0);
     
      Vector2D heightVec = base.multiply(THIRD_HEIGHT);
      Vector2D offsetVec = heightVec.rotateByQuarterCircle(1);
      Coordinate offsetPt = offsetVec.translate(midPt);
     
View Full Code Here

    Vector2D u2 = Vector2D.create(nearPt, corner[1]).normalize();
    double ang = u1.angle(u2);
    Vector2D innerBisec = u2.rotate(ang / 2);
        Vector2D offset = innerBisec.multiply(dist);
    if (! isInsideCorner(vertexPt, nearPt, corner[0], corner[1])) {
        offset = offset.multiply(-1);
    }
    return offset.translate(vertexPt);
  }

  private static final double MAX_ARM_NEARNESS_ANG = 20.0 / 180.0 * Math.PI;
 
View Full Code Here

   
    double maxAngToBisec = maxAngleToBisector(cornerAng);
   
    Vector2D bisec = u2.rotate(cornerAng / 2);
    if (! isInsideCorner) {
      bisec = bisec.multiply(-1);
      double outerAng = 2 * Math.PI - cornerAng;
      maxAngToBisec = maxAngleToBisector(outerAng);
    }
   
    Vector2D pointwiseDisplacement = Vector2D.create(nearPt, vertexPt).normalize();
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.