Package toxi.geom

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


   * 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

    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

    }

    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

                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

            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.