Examples of Point


Examples of de.ailis.jollada.model.Point

    public Point buildPoint()
    {
        if (this.color == null)
            throw new IllegalStateException("color must be set");
        final Point point = new Point(this.color);
        point.setConstantAttenuation(this.constantAttenuation);
        point.setLinearAttenuation(this.linearAttenuation);
        point.setQuadraticAttenuation(this.quadraticAttenuation);
        return point;
    }
View Full Code Here

Examples of de.micromata.opengis.kml.v_2_2_0.Point

       
        String description = "";
        if ( fdbo.getString("description") != null )
          description = fdbo.getString("description");
                 
        Point placemark = placemarksFolder.createAndAddPlacemark()
           .withName(fdbo.getString("title")).withOpen(Boolean.TRUE)
           .withDescription(description)
           .createAndSetPoint().addToCoordinates(-0.126236, 51.500152);
      }
    }
View Full Code Here

Examples of de.psi.telco.sumoplayer.util.Point

      }
    }
   
    if (trackedVehicles.contains(vehicleId)){  // handle a tracked vehicle only
      // calculate geo position
      Point p = resolver.resolv(edgeId, laneId, pos);
     
      // calculate jitter if required
      if (jitter > 0){
        double jitterLon = GeoCalc.getLonOffset(p.getX(), p.getY(), jitter)*((Math.random()*2)-1);
        double jitterLat = GeoCalc.getLatOffset(p.getX(), p.getY(), jitter)*((Math.random()*2)-1);
        p = new PointImpl(p.getX()+jitterLon,p.getY()+jitterLat);
      }
     
      // call the listener
      this.listener.LocationUpdated(vehicleId, timestep, p.getX(), p.getY(), speed*3.6);
    }
  }
 
View Full Code Here

Examples of def_classes.Point

    int x, y;
    getIdentifier();
    if (line.contains("POSITION")) {
      x = Integer.valueOf( line.substring(line.indexOf('(')+1, line.indexOf(',')) );
      y = Integer.valueOf( line.substring(line.indexOf(',')+1, line.indexOf(')')) );
      position = new Point(x, y);
    }
  }
View Full Code Here

Examples of ds.moteur.geometrie.Point

        for (Point p : frontiere){
          coords[i++]= (float)p.y;
          coords[i++]= (float)p.z;
          coords[i++]= (float)p.x;
        }
        Point p = frontiere.get(0);
        coords[i++]= (float)p.y;
      coords[i++]= (float)p.z;
      coords[i++]= (float)p.x;
   
        int[] stripCount = {frontiere.size()+1}// ******
 
View Full Code Here

Examples of edu.caltech.csn.geocell.Point

    }
  }

  public static Point getPoint(final String tsv) {
    final String[] coords = tsv.split("\t");
    return new Point(dmsToDecDeg(coords[0]), dmsToDecDeg(coords[1]));
  }
View Full Code Here

Examples of engine.geometry.Point

        translate(shape, vector.getX(), vector.getY());
    }

    public static void translate(final Shape shape, final double x, final double y) {
        if (shape instanceof Point) {
            Point point = (Point) shape;
            point.setX(point.getX() + x);
            point.setY(point.getY() + y);
        } else if (shape instanceof Line) {
            Line line = (Line) shape;
            line.setX1(line.getX1() + x);
            line.setY1(line.getY1() + y);
            line.setX2(line.getX2() + x);
View Full Code Here

Examples of etch.examples.perf.Perf.Point

       
        final int X = 1000000000;
        final int Y = 2000000000;

        while (n-- > 0)
          server.dist( new Point( 1, 2 ), new Point( X, Y ) );

        stopServer( server );
      }
    }.run();
  }
View Full Code Here

Examples of eu.stratosphere.example.java.clustering.KMeans.Point

  }
 
  public static DataSet<Point> getDefaultPointDataSet(ExecutionEnvironment env) {
   
    return env.fromElements(
        new Point(-14.22, -48.01),
        new Point(-22.78, 37.10),
        new Point(56.18, -42.99),
        new Point(35.04, 50.29),
        new Point(-9.53, -46.26),
        new Point(-34.35, 48.25),
        new Point(55.82, -57.49),
        new Point(21.03, 54.64),
        new Point(-13.63, -42.26),
        new Point(-36.57, 32.63),
        new Point(50.65, -52.40),
        new Point(24.48, 34.04),
        new Point(-2.69, -36.02),
        new Point(-38.80, 36.58),
        new Point(24.00, -53.74),
        new Point(32.41, 24.96),
        new Point(-4.32, -56.92),
        new Point(-22.68, 29.42),
        new Point(59.02, -39.56),
        new Point(24.47, 45.07),
        new Point(5.23, -41.20),
        new Point(-23.00, 38.15),
        new Point(44.55, -51.50),
        new Point(14.62, 59.06),
        new Point(7.41, -56.05),
        new Point(-26.63, 28.97),
        new Point(47.37, -44.72),
        new Point(29.07, 51.06),
        new Point(0.59, -31.89),
        new Point(-39.09, 20.78),
        new Point(42.97, -48.98),
        new Point(34.36, 49.08),
        new Point(-21.91, -49.01),
        new Point(-46.68, 46.04),
        new Point(48.52, -43.67),
        new Point(30.05, 49.25),
        new Point(4.03, -43.56),
        new Point(-37.85, 41.72),
        new Point(38.24, -48.32),
        new Point(20.83, 57.85)
        );
  }
View Full Code Here

Examples of flash.swf.builder.types.Point

    public static Rect addMiterLimitStrokeToBounds(ShapeRecord segment1,
            ShapeRecord segment2, double miterLimit, double halfWeight, Rect pathBBox,
            int xPrev, int yPrev, int x, int y)
    {
        // The tip of the joint
        Point jointPoint = new Point(x, y);
       
        //If a joint lies miterLimit*strokeWeight/2 away from pathBox,
        //it is considered an inner joint and has no effect on bounds. So stop 
        //processing in this case.       
        if (isInnerJoint(jointPoint, pathBBox, miterLimit, halfWeight))
        {
            return pathBBox;
        }
       
        // End tangent for segment1:
        Point t0 = getTangent(segment1, false /*start*/, xPrev, yPrev);
 
        // Start tangent for segment2:
        Point t1 = getTangent(segment2, true /*start*/, x, y);
  
        // Valid tangents?
        if (getPointLength(t0) == 0 || getPointLength(t1) == 0)
        {
            return pathBBox;
        }

        // The tip of the stroke lies on the bisector of the angle and lies at
        // a distance of weight / sin(A/2), where A is the angle between the
        // tangents.
        t0 = normalize(t0, 1);
        t0.x = -t0.x;
        t0.y = -t0.y;
        t1 = normalize(t1, 1);
       
        // Find the vector from t0 to the midPoint from t0 to t1
        Point halfT0T1 = new Point((t1.x - t0.x) * 0.5, (t1.y - t0.y) * 0.5);
  
        // sin(A/2) == halfT0T1.length / t1.length()
        double sinHalfAlpha = getPointLength(halfT0T1);
        if (Math.abs(sinHalfAlpha) < 1.0E-9)
        {
            // Don't count degenerate joints that are close to 0 degrees so
            // we avoid cases like this one L 0 0  0 50  100 0  30 0 50 0 Z
            return pathBBox;
        }

        // Find the vector of the bisect
        Point bisect = new Point(-0.5 * (t0.x + t1.x), -0.5 * (t0.y + t1.y));
        double bisectLength = getPointLength(bisect);
        if (bisectLength == 0)
        {
            // 180 degrees, nothing to contribute
            return pathBBox;
        }
  
        Rect newRect = pathBBox;
        // Is there miter limit at play?
        if (sinHalfAlpha == 0 || miterLimit < 1 / sinHalfAlpha)
        {
            // The miter limit is reached. Calculate two extra points that may
            // contribute to the bounds.
            // The points lie on the line perpendicular to the bisect and
            // intersecting it at offset of miterLimit * weight from the
            // joint tip. The points are equally offset from the bisect by a
            // factor of X, where X / sinAlpha == (weight / sinAlpha -
            // miterLimit * weight) / bisect.lenght.
  
            bisect = normalize(bisect, 1);
            halfT0T1 = normalize(halfT0T1, (halfWeight - miterLimit * halfWeight * sinHalfAlpha) / bisectLength);

            Point pt0 = new Point(jointPoint.x + miterLimit * halfWeight * bisect.x + halfT0T1.x,
                   jointPoint.y + miterLimit * halfWeight * bisect.y + halfT0T1.y);

            Point pt1 = new Point(jointPoint.x + miterLimit * halfWeight * bisect.x - halfT0T1.x,
                   jointPoint.y + miterLimit * halfWeight * bisect.y - halfT0T1.y);

            // Add it to the rectangle:
            newRect = rectUnion((int)StrictMath.rint(pt0.x), (int)StrictMath.rint(pt0.y),
                    (int)StrictMath.rint(pt0.x), (int)StrictMath.rint(pt0.y), newRect);
            newRect = rectUnion((int)StrictMath.rint(pt1.x), (int)StrictMath.rint(pt1.y),
                    (int)StrictMath.rint(pt1.x), (int)StrictMath.rint(pt1.y), newRect);
        }
        else
        {
            // miter limit is not reached, add the tip of the stroke
            bisect = normalize(bisect, 1);
            Point strokeTip = new Point(jointPoint.x + bisect.x * halfWeight / sinHalfAlpha,
                   jointPoint.y + bisect.y * halfWeight / sinHalfAlpha);
  
            // Add it to the rectangle:
            newRect = rectUnion((int)StrictMath.rint(strokeTip.x), (int)StrictMath.rint(strokeTip.y),
                    (int)StrictMath.rint(strokeTip.x), (int)StrictMath.rint(strokeTip.y), newRect);
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.