Package toxi.geom

Examples of toxi.geom.Vec3D.dot()


    public TriangleMesh faceOutwards() {
        computeCentroid();
        for (Face f : faces) {
            Vec3D n = f.getCentroid().sub(centroid);
            float dot = n.dot(f.normal);
            if (dot < 0) {
                f.flipVertexOrder();
            }
        }
        return this;
View Full Code Here


        if (det > -EPS && det < EPS) {
            return -1;
        }
        float invDet = 1f / det;
        Vec3D tvec = ro.sub(a);
        float u = tvec.dot(pvec) * invDet;
        if (u < 0.0 || u > 1.0) {
            return -1;
        }
        Vec3D qvec = tvec.cross(e1);
        float v = dir.dot(qvec) * invDet;
 
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.