Examples of Point2f


Examples of com.modestmaps.core.Point2f

                  GeoData geo = foto.getGeoData();
                  float lat = geo.getLatitude();
                  float lon = geo.getLongitude();
                  System.out.println("\"" + fotoName + "\"" + " Has GeoData! -> Lat:" + lat + " Lon:" + lon + " PlaceID: " + foto.getPlaceId());

                  Point2f pointOnScreen   = map.locationPoint(new Location(lat, lon));
//                  System.out.println(" -> Point on Screen: " + pointOnScreen);

                  Vector3D vecOnScreen   = new Vector3D(0,0,0f);
//                  Vector3D vecOnScreen   = new Vector3D(pointOnScreen.x , pointOnScreen.y , 0.01f);
//                  Vector3D vecOnScreen   = new Vector3D(pointOnScreen.x -p.width/2 +128, pointOnScreen.y -p.height/2 +128, 0.01f);
View Full Code Here

Examples of javax.vecmath.Point2f

                this.attenuationGain[i] = gain[gainLength - 1];
            }
        }
        Point2f [] attenuation = new Point2f[distanceLength];
        for (int i=0; i<distanceLength; i++) {
             attenuation[i] = new Point2f(this.attenuationDistance[i],
                                          this.attenuationGain[i]);
        }
        dispatchAttribChange(DISTANCE_GAIN_DIRTY_BIT, attenuation);
  if (source != null && source.isLive()) {
      notifySceneGraphChanged(false);
View Full Code Here

Examples of javax.vecmath.Point2f

      ((Tuple2f)value).get(this.value);
  }

  @Override
  Object get() {
      return new Point2f(value);
  }
View Full Code Here

Examples of javax.vecmath.Point2f

            }
        }

        Point2f [] attenuation = new Point2f[distanceLength];
        for (int i=0; i<distanceLength; i++) {
             attenuation[i] = new Point2f(this.backAttenuationDistance[i],
                                          this.backAttenuationGain[i]);
        }
        dispatchAttribChange(BACK_DISTANCE_GAIN_DIRTY_BIT, attenuation);
  if (source != null && source.isLive()) {
      notifySceneGraphChanged(false);
View Full Code Here

Examples of javax.vecmath.Point2f

  int flag, n = 0, inc = -1;

  // Extrusion shape is restricted to be single contour, monotonous
  // increasing, non-self-intersecting curve. Throw exception otherwise
  while (!pIt.isDone()) {
     Point2f vertex = new Point2f();
     flag = pIt.currentSegment(tmpCoords);
     if (flag == PathIterator.SEG_LINETO){
       vertex.x = tmpCoords[0];
       vertex.y = tmpCoords[1];
       if (inc == -1){
View Full Code Here

Examples of javax.vecmath.Point2f

          debugPrint("     no filtering");
        }
        else {
      Point2f[] attenuation = new Point2f[arraySize];
      for (int i=0; i< arraySize; i++)
          attenuation[i] = new Point2f();
      attribs.getDistanceFilter(attenuation);
      double[] distance = new double[arraySize];
      float[] cutoff = new float[arraySize];
      for (int i=0; i< arraySize; i++)  {
          distance[i] = attenuation[i].x;
View Full Code Here

Examples of javax.vecmath.Point2f

    }
    else {
        Point2f[] attenuation = new Point2f[arraySize];
        Point2f[] backAttenuation = new Point2f[arraySize];
        for (int i=0; i< arraySize; i++) {
      attenuation[i] = new Point2f();
      backAttenuation[i] = new Point2f();
        }
        cnSound.getDistanceGain(attenuation, backAttenuation);
        double[] frontDistance = new double[arraySize];
        float[] frontGain = new float[arraySize];
        double[] backDistance = new double[arraySize];
        float[] backGain = new float[arraySize];
        for (int i=0; i< arraySize; i++) {
      frontDistance[i] = attenuation[i].x;
      frontGain[i] = attenuation[i].y;
      backDistance[i] = backAttenuation[i].x;
      backGain[i] = backAttenuation[i].y;
        }
        audioDevice3D.setDistanceGain(index,
          frontDistance, frontGain, backDistance, backGain);
    }
      }  // ConeSound distanceGain
      else if (sound instanceof PointSoundRetained) {
    PointSoundRetained ptSound = (PointSoundRetained)sound;

    // set distance attenuation
    arraySize = ptSound.getDistanceGainLength();
    if (arraySize == 0) {
        // send default
        audioDevice3D.setDistanceGain(index, null, null, null, null);
    }
    else {
        Point2f[] attenuation = new Point2f[arraySize];
        for (int i=0; i< arraySize; i++)
      attenuation[i] = new Point2f();
        ptSound.getDistanceGain(attenuation);
        double[] frontDistance = new double[arraySize];
        float[] frontGain = new float[arraySize];
        for (int i=0; i< arraySize; i++) {
      frontDistance[i] = attenuation[i].x;
View Full Code Here

Examples of javax.vecmath.Point2f

  @Override
  Object get() {
      Tuple2f[] arr = new Tuple2f[this.length];
      for (int i = 0; i < this.length; i++) {
    int j = i * 2;
                arr[i] = new Point2f();
    arr[i].x = this.value[j+0];
    arr[i].y = this.value[j+1];
      }
      return arr;
  }
View Full Code Here

Examples of javax.vecmath.Point2f

    }
   
    public Shape getShape(){
        GeneralPath path = new GeneralPath();
       
        Point2f p = nodes[0].getPoint2f();
        path.moveTo(p.x, p.y);
        p = nodes[1].getPoint2f();
        path.lineTo(p.x, p.y);
        p = nodes[2].getPoint2f();
        path.lineTo(p.x, p.y);
View Full Code Here

Examples of javax.vecmath.Point2f

       
        List<Edge> edges = mesh.getEdges();
        Line2D[] lines = new Line2D[mesh.getEdgeCount()];
        for (int i = 0; i < lines.length; i++) {
            Edge e = edges.get(i);
            Point2f p0 = e.getNode(0).getPoint2f();
            Point2f p1 = e.getNode(1).getPoint2f();
            lines[i] = new Line2D.Float(p0.x, p0.y, p1.x, p1.y);
           
            for(int j=0; j<i; j++){
                if(lines[i].intersectsLine(lines[j])){
                    if(!(lines[i].getP1().equals(lines[j].getP1()) ||
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.