本文整理汇总了Python中PyMca5.Object3D.Object3DCTools.get3DGridFromXYZ方法的典型用法代码示例。如果您正苦于以下问题:Python Object3DCTools.get3DGridFromXYZ方法的具体用法?Python Object3DCTools.get3DGridFromXYZ怎么用?Python Object3DCTools.get3DGridFromXYZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyMca5.Object3D.Object3DCTools
的用法示例。
在下文中一共展示了Object3DCTools.get3DGridFromXYZ方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __fillVerticesBufferObject
# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import get3DGridFromXYZ [as 别名]
def __fillVerticesBufferObject(self):
if self.vertices is None:
self.vertices = Object3DCTools.get3DGridFromXYZ(self._x,
self._y,
self._z)
self.indices = numpy.arange(self.nVertices)
self._verticesBufferObject = buffers.VertexBuffer(self.vertices,
GL.GL_STATIC_DRAW)
self.vertices = None
示例2: buildPointListOLD
# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import get3DGridFromXYZ [as 别名]
def buildPointListOLD(self):
if self.vertices is None:
self.vertices = Object3DCTools.get3DGridFromXYZ(self._x,
self._y,
self._z)
GL.glVertexPointerf(self.vertices)
GL.glColorPointerub(self.vertexColors)
GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
GL.glEnableClientState(GL.GL_COLOR_ARRAY)
GL.glDrawArrays(GL.GL_POINTS, 0, self.nVertices)
示例3: Object3DMesh
# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import get3DGridFromXYZ [as 别名]
object3D = Object3DMesh(os.path.basename(f))
else:
data = numpy.arange(200.).astype(numpy.float32)
data.shape = [40, 5]
object3D = Object3DMesh('builtin')
#several options: regular grid, irregular grid
if len(sys.argv) > 1:
#print "IMPOSSING A 1000 OFFSET"
#offset = 1000.0
offset = 0
#irregular grid
xSize, ySize = data.shape[0:2]
zSize = 1
xyz = Object3DCTools.get3DGridFromXYZ(numpy.arange(xSize).astype(numpy.float32)-offset,
numpy.arange(xSize).astype(numpy.float32)+offset,
numpy.arange(1)+1)
a = xyz[:,0] * 1
xyz[:,0] = xyz[:,1] * 1
xyz[:,1] = a[:]
#print xyz[0:3,:]
#print xyz.shape
#print Object3DCTools.getVertexArrayMeshAxes(xyz)
#sys.exit(0)
data.shape = 1, xSize * ySize
xyz[:,2] = data[:]
object3D.setData(data, xyz=xyz)
elif 0:
#flat
object3D.setData(data, z=4)
else: