当前位置: 首页>>代码示例>>Java>>正文


Java FloatPoint.right_tangential_point方法代码示例

本文整理汇总了Java中geometry.planar.FloatPoint.right_tangential_point方法的典型用法代码示例。如果您正苦于以下问题:Java FloatPoint.right_tangential_point方法的具体用法?Java FloatPoint.right_tangential_point怎么用?Java FloatPoint.right_tangential_point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在geometry.planar.FloatPoint的用法示例。


在下文中一共展示了FloatPoint.right_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);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:34,代码来源:LocateFoundConnectionAlgoAnyAngle.java

示例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);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:34,代码来源:LocateFoundConnectionAlgoAnyAngle.java

示例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);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:31,代码来源:LocateFoundConnectionAlgoAnyAngle.java

示例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);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:31,代码来源:LocateFoundConnectionAlgoAnyAngle.java


注:本文中的geometry.planar.FloatPoint.right_tangential_point方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。