public float distance(Vector3f point) { return FastMath.sqrt(distanceSquared(point)); }
public LineSegment(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
/** * <p>Evaluates whether a given point is contained within the axis aligned bounding box * that contains this LineSegment.</p><p>This function is float error aware.</p> */ public boolean isPointInsideBounds(Vector3f point) { return isPointInsideBounds(point, Float.MIN_VALUE); }
public void set(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
public float distance(Ray r) { return FastMath.sqrt(distanceSquared(r)); }
/** * <p>Evaluates whether a given point is contained within the axis aligned bounding box * that contains this LineSegment.</p><p>This function is float error aware.</p> */ public boolean isPointInsideBounds(Vector3f point) { return isPointInsideBounds(point, Float.MIN_VALUE); }
origin.subtract(test.getOrigin(), compVec1); float negativeDirectionDot = -(direction.dot(test.getDirection())); float diffThisDot = compVec1.dot(direction); float diffTestDot = -(compVec1.dot(test.getDirection())); float lengthOfDiff = compVec1.lengthSquared(); vars.release(); s1 = negativeDirectionDot * diffThisDot - diffTestDot; extentDeterminant0 = extent * determinant; extentDeterminant1 = test.getExtent() * determinant; s1 = test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { s1 = -test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { if (tempS1 < -test.getExtent()) { s1 = -test.getExtent(); squareDistance = s1 * (s1 - (2.0f) * tempS1) + s0 * (s0 + (2.0f) * diffThisDot) + lengthOfDiff; } else if (tempS1 <= test.getExtent()) { s1 = tempS1; squareDistance = -s1 * s1 + s0 + lengthOfDiff;
public float distance(LineSegment ls) { return FastMath.sqrt(distanceSquared(ls)); }
/** * <p>Evaluates whether a given point is contained within the axis aligned bounding box * that contains this LineSegment.</p><p>This function is float error aware.</p> */ public boolean isPointInsideBounds(Vector3f point) { return isPointInsideBounds(point, Float.MIN_VALUE); }
public LineSegment(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
public float distance(Vector3f point) { return FastMath.sqrt(distanceSquared(point)); }
public void set(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
public float distance(Ray r) { return FastMath.sqrt(distanceSquared(r)); }
public void set(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
public float distance(LineSegment ls) { return FastMath.sqrt(distanceSquared(ls)); }
public LineSegment(LineSegment ls) { this.origin = new Vector3f(ls.getOrigin()); this.direction = new Vector3f(ls.getDirection()); this.extent = ls.getExtent(); }
public float distance(Vector3f point) { return FastMath.sqrt(distanceSquared(point)); }
origin.subtract(test.getOrigin(), compVec1); float negativeDirectionDot = -(direction.dot(test.getDirection())); float diffThisDot = compVec1.dot(direction); float diffTestDot = -(compVec1.dot(test.getDirection())); float lengthOfDiff = compVec1.lengthSquared(); vars.release(); s1 = negativeDirectionDot * diffThisDot - diffTestDot; extentDeterminant0 = extent * determinant; extentDeterminant1 = test.getExtent() * determinant; s1 = test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { s1 = -test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { if (tempS1 < -test.getExtent()) { s1 = -test.getExtent(); squareDistance = s1 * (s1 - (2.0f) * tempS1) + s0 * (s0 + (2.0f) * diffThisDot) + lengthOfDiff; } else if (tempS1 <= test.getExtent()) { s1 = tempS1; squareDistance = -s1 * s1 + s0 + lengthOfDiff;
public float distance(LineSegment ls) { return FastMath.sqrt(distanceSquared(ls)); }
origin.subtract(test.getOrigin(), compVec1); float negativeDirectionDot = -(direction.dot(test.getDirection())); float diffThisDot = compVec1.dot(direction); float diffTestDot = -(compVec1.dot(test.getDirection())); float lengthOfDiff = compVec1.lengthSquared(); vars.release(); s1 = negativeDirectionDot * diffThisDot - diffTestDot; extentDeterminant0 = extent * determinant; extentDeterminant1 = test.getExtent() * determinant; s1 = test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { s1 = -test.getExtent(); tempS0 = -(negativeDirectionDot * s1 + diffThisDot); if (tempS0 < -extent) { if (tempS1 < -test.getExtent()) { s1 = -test.getExtent(); squareDistance = s1 * (s1 - (2.0f) * tempS1) + s0 * (s0 + (2.0f) * diffThisDot) + lengthOfDiff; } else if (tempS1 <= test.getExtent()) { s1 = tempS1; squareDistance = -s1 * s1 + s0 + lengthOfDiff;