mesh_xoffsets.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def point_inside_loop(loop_coords, mous_loc):
    nverts = len(loop_coords)
    # vectorize our two item tuple
    out = Vector(outside_loop(loop_coords))
    vec_mous = Vector(mous_loc)
    intersections = 0
    for i in range(0, nverts):
        a = Vector(loop_coords[i-1])
        b = Vector(loop_coords[i])
        if intersect_line_line_2d(vec_mous, out, a, b):
            intersections += 1
    inside = False
    if fmod(intersections, 2):
        inside = True
    return inside


# === OpenGL drawing functions ===
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号