Package toxi.geom

Examples of toxi.geom.Vec3D.addSelf()


        List<Vec3D> mid = new ArrayList<Vec3D>(2);
        float len = edge.getLength();
        Vec3D a = edge.a.interpolateTo(edge.b, 0.3333f);
        a.addSelf(a.sub(centroid).normalizeTo(ampA * len));
        Vec3D b = edge.a.interpolateTo(edge.b, 0.6666f);
        b.addSelf(b.sub(centroid).normalizeTo(ampB * len));
        mid.add(a);
        mid.add(b);
        return mid;
    }
}
View Full Code Here


            filtered.clear();
            for (Vertex v : selection) {
                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()) {
View Full Code Here

        for (int i = 0, numV = getNumVertices(); i < numV; i++) {
            neighbors = getNeighborsForVertexID(i, neighbors);
            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);
            }
        }
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.