Package javax.vecmath

Examples of javax.vecmath.Vector3d.scaleAdd()


    dt.sub(pt, end);
    return dt.lengthSquared();
  }

  // We projected somewhere along the segment, calculate the closest point
  dt.scaleAdd(proj / segSquared, dir, start);
  if (closest != null) closest.set(dt);

  // return the distance from the point to the closest point on the segment
  dt.sub(pt, dt);
  return dt.lengthSquared();
View Full Code Here


  // Project the ray onto itself
  double raySquared = dir.lengthSquared();

  // We projected somewhere along the ray, calculate the closest point
  dt.scaleAdd(proj / raySquared, dir, start);
  if (closest != null) closest.set(dt);

  // return the distance from the point to the closest point on the ray
  dt.sub(pt, dt);
  return dt.lengthSquared();
View Full Code Here

/* 502 */       t = 0.0D;
/* 503 */       if (rayint != null) rayint.set(rayorig);
/* 504 */       if (param != null) param[0] = t;
/*     */     }
/* 506 */     else { t /= raydir.dot(raydir);
/* 507 */       diff.scaleAdd(-t, raydir, diff);
/* 508 */       if (rayint != null) rayint.scaleAdd(t, raydir, rayorig);
/* 509 */       if (param != null) param[0] = t;
/*     */     }
/* 511 */     return diff.dot(diff);
/*     */   }
View Full Code Here

/* 548 */         if (param != null) param[0] = t;
/*     */       }
/*     */       else
/*     */       {
/* 551 */         t /= mDotm;
/* 552 */         diff.scaleAdd(-t, segdir, diff);
/* 553 */         if (segint != null) segint.scaleAdd(t, segdir, segstart);
/* 554 */         if (param != null) param[0] = t;
/*     */       }
/*     */     }
/* 557 */     return diff.dot(diff);
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.