Package javax.vecmath

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


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

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

            }
        }

        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

  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

          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

    }
    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

  @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

    }
   
    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

       
        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

     * @param pos relative position on the edge (0 <= pos <= 1)
     * @return the Point at relative position 'pos' on the given edge
     */
    private static Point2f getPointOnEdge(Edge edge, float pos){
        // start point vector
        Point2f s = edge.getNode(0).getPoint2f();
        // end point vector
        Point2f e = edge.getNode(1).getPoint2f();
       
        s.interpolate(e, pos);
        return s;
    }
View Full Code Here

TOP

Related Classes of javax.vecmath.Point2f

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.