def DrawPosOnly()

in renderer/glViewer.py [0:0]


def DrawPosOnly():
    global g_colors
    global g_frameIdx#, g_normals
    global g_speech,g_speechGT
    global g_bApplyRootOffset

    global g_posOnly
    global g_bodyNormals, g_faceNormals

    #print(g_frameIdx)
    if g_posOnly is None:
        return

    for humanIdx in range(len(g_posOnly)):

        if(g_frameIdx >= g_posOnly[humanIdx].shape[1]):
            continue

        # if(humanIdx==1):
        #     continue


        skel = g_posOnly[humanIdx][:, g_frameIdx]
        # normal = g_normals[skelIdx, :, g_idx]
        color = g_colors[humanIdx % len(g_colors)]
        glColor3ub(color[0], color[1], color[2])


        glPushMatrix()
        glTranslate(skel[0], skel[1], skel[2])

        if humanIdx==0:#or humanIdx==1:
            glutSolidCube(10)
        elif False:#humanIdx==1:#or humanIdx==1:
            glutWireSphere(10,10,10)
        else:
            glutSolidSphere(10,10,10)
        glPopMatrix()

        #Draw body normal
        if g_bodyNormals is not None and len(g_bodyNormals)> humanIdx:

            if g_bodyNormals[humanIdx].shape[1]>g_frameIdx:
                normal3D = g_bodyNormals[humanIdx][:,g_frameIdx]  #3x1
                #drawbodyNormal(normal3D, skel, [255, 0, 0])
                drawNormal(normal3D, skel, [255, 0, 0])


        #Draw face normal
        if g_faceNormals is not None and len(g_faceNormals)> humanIdx:

            if g_faceNormals[humanIdx].shape[1]>g_frameIdx:
                normal3D = g_faceNormals[humanIdx][:,g_frameIdx]  #3x1
                drawNormal(normal3D, skel, [0, 255, 0], normalLength = 30)


        #Draw Speaking Info
        if g_speech is not None and g_skeletons is None:    #If g_skeletons is valid, draw speech there
            if len(g_speech[humanIdx]['indicator'])>g_frameIdx:
                draw_speaking_general(skel, g_speech[humanIdx]['indicator'][g_frameIdx], g_speech[humanIdx]['word'][g_frameIdx],  g_colors[humanIdx % len(g_colors)], offset=[0,0,23])