Examples of scaleSelf()


Examples of gml4u.model.GmlPoint.scaleSelf()

      //}

      for(int i=0; i<points.size(); i++) {
        GmlPoint p = points.get(i);
        p.subSelf(originShift);
        p.scaleSelf(scaling);

        // Fix NaN
        if (p.x != p.x || p.y != p.y || p.z != p.z) {
          points.remove(i);
        }
View Full Code Here

Examples of toxi.geom.Matrix4x4.scaleSelf()

    public void testInverse() {
        Matrix4x4 m = new Matrix4x4();
        m.translateSelf(100, 100, 0);
        m.rotateX(MathUtils.HALF_PI);
        m.scaleSelf(10, 10, 10);
        System.out.println(m);
        Vec3D v = new Vec3D(0, 1, 0);
        Vec3D w = m.applyTo(v);
        m = m.getInverted();
        ReadonlyVec3D v2 = m.applyTo(w);
View Full Code Here

Examples of toxi.geom.Vec2D.scaleSelf()

    Vec2D prevVec = vec2;// (Vec2D) centrePath.get(centrePath.size() - 3);
    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);

  }
View Full Code Here

Examples of toxi.geom.Vec2D.scaleSelf()

 
      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();
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

    Vec3D centre = new Vec3D();

    for (SlicePlane plane : this.getList()) {
      centre.addSelf(plane.getPlane());
    }
    centre.scaleSelf(1 / this.getList().size());

    return centre;
  }

  public SlicePlane getFirst() {
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

   * Scale the current design.
   * @param scale
   */
  private void scale(float scale) {
    Vec3D centre = this.getCentreOfMass();
    centre.scaleSelf(1 / GLOBAL.jBullet.scale);
    this.getSlicePlanesY().scale(scale, centre);
    this.scale += scale;
  }

  /*
 
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

    Vec3D vecDirOffset = vecDir.copy();

    vecDirOffset.rotateZ((float) (Math.PI / 2));

    vecDirOffset.scaleSelf(crossSliceSelection.spacing);

    vecPosStart.addSelf(vecDirOffset);

    vecDir.rotateZ((float) (Math.PI / 2));
    //vecDir.rotateX((float) (Math.PI/2 ));
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

    }

    protected void alignAttachedParticle(DLAParticle p, Vec3D target) {
        Vec3D d = p.sub(target).normalize();
        d.interpolateToSelf(dirCurvePoint, config.getCurveAlign());
        d.scaleSelf(config.getGrowthScale());
        d.normalizeTo(config.getParticleRadius());
        p.set(target).addSelf(d);
    }

    /**
 
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

                final Vec3D laplacian = new Vec3D();
                final List<WEVertex> neighbours = ((WEVertex) v).getNeighbors();
                for (WEVertex n : neighbours) {
                    laplacian.addSelf(n);
                }
                laplacian.scaleSelf(1f / neighbours.size());
                filtered.put(v, laplacian);
            }
            for (Vertex v : filtered.keySet()) {
                mesh.vertices.get(v).set(filtered.get(v));
            }
View Full Code Here

Examples of toxi.geom.Vec3D.scaleSelf()

            if (neighbors != null && neighbors.size() > 0) {
                Vec3D l = new Vec3D();
                for (Vec3D n : neighbors) {
                    l.addSelf(n);
                }
                l.scaleSelf(1f / neighbors.size());
                lapIndex.put(i, l);
            }
        }
        SpatialIndex newVerts = new SpatialIndex(vertices.getDelta());
        for (Iterator<AttributedFace> i = faces.iterator(); i.hasNext();) {
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.