mesh_xoffsets.py 文件源码

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

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def get_rotated_pt(piv_co, ang_diff_rad, rot_dat, mov_co):
    axis_lk = rot_dat.axis_lk
    mov_aligned = mov_co - piv_co
    rot_val = []
    if   axis_lk == '':  # arbitrary axis / spherical rotations
        rot_val = Quaternion(rot_dat.piv_norm, ang_diff_rad)
    elif axis_lk == 'X':
        rot_val = Euler((ang_diff_rad, 0.0, 0.0), 'XYZ')
    elif axis_lk == 'Y':
        rot_val = Euler((0.0, ang_diff_rad, 0.0), 'XYZ')
    elif axis_lk == 'Z':
        rot_val = Euler((0.0, 0.0, ang_diff_rad), 'XYZ')
    mov_aligned.rotate(rot_val)
    return mov_aligned + piv_co


# Takes a ref_pts (ReferencePoints class) argument and modifies its member
# variable lp_ls (lock pt list). The lp_ls variable is assigned a modified list
# of 3D coordinates (if an axis lock was provided), the contents of the
# ref_pts' rp_ls var (if no axis lock was provided), or an empty list (if there
# wasn't enough ref_pts or there was a problem creating the modified list).
# todo : move inside ReferencePoints class ?
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号