本文整理匯總了Java中geometry.planar.FloatPoint.left_tangential_point方法的典型用法代碼示例。如果您正苦於以下問題:Java FloatPoint.left_tangential_point方法的具體用法?Java FloatPoint.left_tangential_point怎麽用?Java FloatPoint.left_tangential_point使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類geometry.planar.FloatPoint
的用法示例。
在下文中一共展示了FloatPoint.left_tangential_point方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: right_turn_next_corner
import geometry.planar.FloatPoint; //導入方法依賴的package包/類
/**
* Calculates as first line the left side tangent from p_from_corner to
* the circle with center p_to_corner and radius p_dist.
* As second line the right side tangent from p_to_corner to the circle
* with center p_next_corner and radius 2 * p_dist is constructed.
* The second line is than translated by the distance p_dist to the left.
* Returned is the intersection of the first and the second line.
*/
private FloatPoint right_turn_next_corner(FloatPoint p_from_corner, double p_dist, FloatPoint p_to_corner, FloatPoint p_next_corner)
{
FloatPoint curr_tangential_point = p_from_corner.left_tangential_point(p_to_corner, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.right_turn_next_corner: left tangential point is null");
}
return p_from_corner;
}
FloatLine first_line = new FloatLine(p_from_corner, curr_tangential_point);
curr_tangential_point = p_to_corner.right_tangential_point(p_next_corner, 2 * p_dist + c_tolerance);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.right_turn_next_corner: right tangential point is null");
}
return p_from_corner;
}
FloatLine second_line = new FloatLine(p_to_corner, curr_tangential_point);
second_line = second_line.translate(p_dist);
return first_line.intersection(second_line);
}
示例2: left_turn_next_corner
import geometry.planar.FloatPoint; //導入方法依賴的package包/類
/**
* Calculates as first line the right side tangent from p_from_corner to
* the circle with center p_to_corner and radius p_dist.
* As second line the left side tangent from p_to_corner to the circle
* with center p_next_corner and radius 2 * p_dist is constructed.
* The second line is than translated by the distance p_dist to the right.
* Returned is the intersection of the first and the second line.
*/
private FloatPoint left_turn_next_corner(FloatPoint p_from_corner, double p_dist, FloatPoint p_to_corner, FloatPoint p_next_corner)
{
FloatPoint curr_tangential_point = p_from_corner.right_tangential_point(p_to_corner, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.left_turn_next_corner: right tangential point is null");
}
return p_from_corner;
}
FloatLine first_line = new FloatLine( p_from_corner, curr_tangential_point);
curr_tangential_point = p_to_corner.left_tangential_point(p_next_corner, 2 * p_dist + c_tolerance);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.left_turn_next_corner: left tangential point is null");
}
return p_from_corner;
}
FloatLine second_line = new FloatLine(p_to_corner, curr_tangential_point);
second_line = second_line.translate(-p_dist);
return first_line.intersection(second_line);
}
示例3: right_left_tangential_point
import geometry.planar.FloatPoint; //導入方法依賴的package包/類
/**
* Calculates the right tangential line from p_from_point and the
* left tangential line from p_to_point to the circle
* with center p_center and radius p_dist.
* Returns the intersection of the 2 lines.
*/
private FloatPoint right_left_tangential_point(FloatPoint p_from_point, FloatPoint p_to_point, FloatPoint p_center, double p_dist)
{
FloatPoint curr_tangential_point = p_from_point.right_tangential_point(p_center, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. right_left_tangential_point: right tangential point is null");
}
return null;
}
FloatLine first_line = new FloatLine(p_from_point, curr_tangential_point);
curr_tangential_point = p_to_point.left_tangential_point(p_center, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. right_left_tangential_point: left tangential point is null");
}
return null;
}
FloatLine second_line = new FloatLine(p_to_point, curr_tangential_point);
return first_line.intersection(second_line);
}
示例4: left_right_tangential_point
import geometry.planar.FloatPoint; //導入方法依賴的package包/類
/**
* Calculates the left tangential line from p_from_point and the
* right tangential line from p_to_point to the circle
* with center p_center and radius p_dist.
* Returns the intersection of the 2 lines.
*/
private FloatPoint left_right_tangential_point(FloatPoint p_from_point, FloatPoint p_to_point, FloatPoint p_center, double p_dist)
{
FloatPoint curr_tangential_point = p_from_point.left_tangential_point(p_center, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. left_right_tangential_point: left tangential point is null");
}
return null;
}
FloatLine first_line = new FloatLine(p_from_point, curr_tangential_point);
curr_tangential_point = p_to_point.right_tangential_point(p_center, p_dist);
if (curr_tangential_point == null)
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. left_right_tangential_point: right tangential point is null");
}
return null;
}
FloatLine second_line = new FloatLine(p_to_point, curr_tangential_point);
return first_line.intersection(second_line);
}