當前位置: 首頁>>代碼示例>>Python>>正文


Python Object3DCTools.drawXYZPoints方法代碼示例

本文整理匯總了Python中PyMca5.Object3D.Object3DCTools.drawXYZPoints方法的典型用法代碼示例。如果您正苦於以下問題:Python Object3DCTools.drawXYZPoints方法的具體用法?Python Object3DCTools.drawXYZPoints怎麽用?Python Object3DCTools.drawXYZPoints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PyMca5.Object3D.Object3DCTools的用法示例。


在下文中一共展示了Object3DCTools.drawXYZPoints方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _drawMesh

# 需要導入模塊: from PyMca5.Object3D import Object3DCTools [as 別名]
# 或者: from PyMca5.Object3D.Object3DCTools import drawXYZPoints [as 別名]
 def _drawMesh(self):
     alpha = 1.0 - self._configuration['common']['transparency']
     if alpha < 0:
         alpha = 0
     elif alpha >= 1.0:
         alpha = 255
     else:
         alpha = int(255 * alpha)
     self.pixmap[:, 3] = alpha
     shape = self._imageData.shape
     self._imageData.shape = -1,1
     if DRAW_MODES[self._configuration['common']['mode']] == "POINT":
         if False:
             Object3DCTools.drawXYZPoints(self.vertices,
                                      self.pixmap)
         else:
             Object3DCTools.draw2DGridPoints(self._xValues,
                        self._yValues,
                        self._zValues,
                        self.pixmap)
     elif DRAW_MODES[self._configuration['common']['mode']] == "WIRE":
         Object3DCTools.draw2DGridLines(self._xValues,
                        self._yValues,
                        self._zValues,
                        self.pixmap)
     elif DRAW_MODES[self._configuration['common']['mode']] == "SURFACE":
         Object3DCTools.draw2DGridQuads(self._xValues,
                        self._yValues,
                        self._zValues,
                        self.pixmap)
     self._imageData.shape = shape
開發者ID:dnaudet,項目名稱:pymca,代碼行數:33,代碼來源:Object3DPixmap.py

示例2: buildPointListXYZ

# 需要導入模塊: from PyMca5.Object3D import Object3DCTools [as 別名]
# 或者: from PyMca5.Object3D.Object3DCTools import drawXYZPoints [as 別名]
    def buildPointListXYZ(self, selection=False):
        if 1:
            if selection:
                if self.vertexSelectionColors is None:
                    self._getVertexSelectionColors()
                if self._configuration['private']['colorfilter']:
                    tinyNumber = 1.0e-10
                    minValue = self._configuration['common']['colormap'][2] + tinyNumber
                    maxValue = self._configuration['common']['colormap'][3] - tinyNumber
                    Object3DCTools.drawXYZPoints(self.vertices,
                             self.vertexSelectionColors,
                             self.values,
                             None,
                             0,
                             [1, minValue, maxValue])
                else:
                    Object3DCTools.drawXYZPoints(self.vertices,
                             self.vertexSelectionColors,
                             self.values,
                             None,
                             0,
                             self._configuration['private']['useminmax'])
            else:
                Object3DCTools.drawXYZPoints(self.vertices,
                             self.vertexColors,
                             self.values,
                             None,
                             self._configuration['private']['colorfilter'],
                             self._configuration['private']['useminmax'])
        return


        GL.glVertexPointerf(self.vertices)
        if selection:
            GL.glColorPointerub(self.vertexSelectionColors)
        else:
            GL.glColorPointerub(self.vertexColors)
        GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
        GL.glEnableClientState(GL.GL_COLOR_ARRAY)
        GL.glDrawArrays(GL.GL_POINTS, 0, self.nVertices)
開發者ID:PiRK,項目名稱:pymca,代碼行數:42,代碼來源:Object3DMesh.py


注:本文中的PyMca5.Object3D.Object3DCTools.drawXYZPoints方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。