Package jinngine.math

Examples of jinngine.math.Vector3.sub()


        // check the next vertex from poly2
        if (poly2iter.hasNext()) {
          p2 = poly2iter.next();
         
          // distance less that epsilon
          if (p2.sub(p1).xynorm() >= epsilon)
            return false;
        } else {
          // no more vertices
          return true;
        }   
View Full Code Here


        } else {
          // no more vertices
          return true;
        }   
      } else {
        if (p2.sub(p1).xynorm() < epsilon) {
          traversalStarted = true;
        }
      }
    }
View Full Code Here

    p2p1.z = 0; // we only work in the xy plane
    final double t = x.sub(p1).dot(p2p1) / p2p1.squaredNorm();
    if (t>= -epsilon && t <= 1+epsilon) {
      // closest point on line
      Vector3 lp = p1.add(p2.sub(p1).multiply(t));
      if lp.sub(x).xynorm() < epsilon ) {
        intPoint.assign(lp);
        return true;
      }
    }
   
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.