def drawCube(self, point): ygh.beginDraw() ygh.drawPoint(point) ygh.endDraw() glPushMatrix() glTranslated(point[0], point[1], point[2]) glutWireCube(.1) glPopMatrix()
def extraDrawCallback(): frame = viewer.getCurrentFrame() meshPositions = meshMotion[frame].getPointPositions() ygh.drawPoint( ysu.getUpperCOMPos(meshPositions, vertexMasses, upperVertexIndices, upperMass)) ygh.drawPoint(ysu.getCOMPos(meshPositions, vertexMasses, totalMass), (255, 255, 0)) if frame > 0: meshVelocities = meshMotion.getPointVelocities(frame, frame - 1) ygh.drawVector( ysu.getUpperCOMVel(meshVelocities, vertexMasses, upperVertexIndices, upperMass), ysu.getUpperCOMPos(meshPositions, vertexMasses, upperVertexIndices, upperMass)) ygh.drawVector( ysu.getCOMVel(meshVelocities, vertexMasses, totalMass), ysu.getCOMPos(meshPositions, vertexMasses, totalMass), (255, 255, 0))
def extraDrawCallback(): for p in pointsA: ygh.drawPoint(p, (255,0,0)) for p in pointsB: ygh.drawPoint(p, (0,255,0)) for p in pointsC: ygh.drawPoint(p, (0,255,255))
def extraDraw(): frame = viewer.getCurrentFrame() for footName in footNames: # if footName == RFOOT: if footName == LFOOT: # if True: footPos = motion[frame].getPosition(footName) Rg = motion[frame].getGlobalRFromParent(footName) # ygh.drawSO3(Rg, footPos, (0,255,0)) logRg = mm.logSO3(Rg) logRg_sagittal = mm.projectionOnVector(logRg, sagittalAxis) logRg_lateral = mm.projectionOnVector(logRg, lateralAxisMap[footName]) ygh.drawVector(logRg_sagittal, footPos, (255, 255, 0)) ygh.drawVector(logRg_lateral, footPos, (0, 255, 255)) for index, contactStates in list(contactStatesMap.items()): if contactStates[frame]: ygh.drawPoint(motion.getPosition(index, frame), (255, 255, 255), 5.)
def extraDrawCallback(): frame = viewer.getCurrentFrame() for i in range(jointMotions[0][0].skeleton.getElementNum()): ygh.drawPoint(jointMotions[0][frame].getPosition(i))
def extraDrawCallback(): for p in positions: ygh.drawPoint(p)
def extraDrawCallback(): frame = viewer.getCurrentFrame() for index, contactStates in contactStatesMap.items(): if contactStates[frame]: ygh.drawPoint(motion.getPosition(index, frame), (255, 255, 255), 5.)