コード例 #1
0
def test_plane_point_side_v3_point_in_front_of_plane() -> None:
    """Check if point is in direction of plane normal or on other side."""
    p = np.array([1, 1, 1, 0])
    v = np.array([2, 2, 2])
    sign = plane_point_side_v3(p, v)
    assert sign > 0
コード例 #2
0
def test_plane_point_side_v3_behind_plane() -> None:
    """Check if a point is in direction of plane normal or on other side."""
    p = np.array([1, 1, 1, 0])
    v = np.array([-1, -1, -1])
    sign = plane_point_side_v3(p, v)
    assert sign < 0