本文整理匯總了Python中PyMca5.Object3D.Object3DCTools.drawXYZLines方法的典型用法代碼示例。如果您正苦於以下問題:Python Object3DCTools.drawXYZLines方法的具體用法?Python Object3DCTools.drawXYZLines怎麽用?Python Object3DCTools.drawXYZLines使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyMca5.Object3D.Object3DCTools
的用法示例。
在下文中一共展示了Object3DCTools.drawXYZLines方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: drawObject
# 需要導入模塊: from PyMca5.Object3D import Object3DCTools [as 別名]
# 或者: from PyMca5.Object3D.Object3DCTools import drawXYZLines [as 別名]
def drawObject(self):
if self.values is None:
return
GL.glPushAttrib(GL.GL_ALL_ATTRIB_BITS)
GL.glShadeModel(GL.GL_FLAT)
if DEBUG:
t0=time.time()
if self.drawMode == 'NONE':
pass
elif (GL.glGetIntegerv(GL.GL_RENDER_MODE) == GL.GL_SELECT) or \
self._vertexSelectionMode:
GL.glPointSize(self._configuration['common']['pointsize'])
if self._xyz:
self.buildPointListXYZ(selection=True)
else:
self.buildPointList(selection=True)
elif self.drawMode == 'POINT':
GL.glShadeModel(GL.GL_FLAT)
GL.glPointSize(self._configuration['common']['pointsize'])
if self._xyz:
self.buildPointListXYZ(selection=False)
else:
self.buildPointList(selection=False)
elif self.drawMode == 'POINT_SELECTION':
GL.glShadeModel(GL.GL_FLAT)
GL.glPointSize(self._configuration['common']['pointsize'])
self.buildPointList(selection=True)
elif self.drawMode in ['LINES', 'WIRE']:
GL.glLineWidth(self._configuration['common']['linewidth'])
GL.glShadeModel(GL.GL_SMOOTH)
if self._xyz:
if self.facets is None:
self._getFacets()
Object3DCTools.drawXYZLines(self.vertices,
self.vertexColors,
self.values,
self.facets,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
#sys.exit(1)
elif self.__flat:
Object3DCTools.draw3DGridLines(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
else:
Object3DCTools.draw2DGridLines(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
elif self.drawMode == "SURFACE":
GL.glShadeModel(GL.GL_SMOOTH)
if self._xyz:
if self.facets is None:
self._getFacets()
Object3DCTools.drawXYZTriangles(self.vertices,
self.vertexColors,
self.values,
self.facets,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
elif self.__flat:
Object3DCTools.draw3DGridQuads(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
else:
Object3DCTools.draw2DGridQuads(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
else:
print("UNSUPPORTED MODE")
GL.glPopAttrib()
if DEBUG:
print("Drawing takes ", time.time() - t0)