Examples of vectorFrom()


Examples of ca.eandb.jmist.math.Point3.vectorFrom()

    if (!recorder.interval().contains(t))
      return;

    Point3      p = ray.pointAt(t);
    Vector3      r = p.vectorFrom(this.origin);
    Point2      uv = new Point2(r.dot(basis.u()), r.dot(basis.v()));

    if (!this.inside(uv))
      return;
View Full Code Here

Examples of ca.eandb.jmist.math.Point3.vectorFrom()

    double t = this.plane.intersect(ray);

    if (recorder.interval().contains(t)) {

      Point3 p = ray.pointAt(t);
      Vector3 dp = p.vectorFrom(this.center);

      double u = 0.5 + 0.5 * dp.dot(basis.u()) / ru;
      double v = 0.5 + 0.5 * dp.dot(basis.v()) / rv;

      if (MathUtil.inRangeCC(u, 0.0, 1.0) && MathUtil.inRangeCC(v, 0.0, 1.0)) {
View Full Code Here

Examples of ca.eandb.jmist.math.Point3.vectorFrom()

    double  length = rel.length();

    if (length > 0.0)
    {
      rel = rel.times(major / length);
      return p.vectorFrom(Point3.ORIGIN.plus(rel));
    }
    else
      return Vector3.K;

  }
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.