Example #1
0
def createTexturedPlane():
    source = vtk.vtkPlaneSource()
    textureMap = vtk.vtkTextureMapToPlane()
    textureMap.SetInput(source.GetOutput())

    textureMap.Update()
    return shallowCopy(textureMap.GetOutput())
Example #2
0
def createTexturedPlane():
    source = vtk.vtkPlaneSource()
    textureMap = vtk.vtkTextureMapToPlane()
    textureMap.SetInput(source.GetOutput())

    textureMap.Update()
    return shallowCopy(textureMap.GetOutput())
Example #3
0
 def addPlane(self, origin, normal, width, height, resolution=1, color=[1,1,1]):
     plane = vtk.vtkPlaneSource()
     plane.SetOrigin(-width/2.0, -height/2.0, 0.0)
     plane.SetPoint1(width/2.0, -height/2.0, 0.0)
     plane.SetPoint2(-width/2.0, height/2.0, 0.0)
     plane.SetCenter(origin)
     plane.SetNormal(normal)
     plane.SetResolution(resolution, resolution)
     plane.Update()
     self.addPolyData(plane.GetOutput(), color)
Example #4
0
 def addPlane(self, origin, normal, width, height, resolution=1, color=[1, 1, 1]):
     plane = vtk.vtkPlaneSource()
     plane.SetOrigin(-width / 2.0, -height / 2.0, 0.0)
     plane.SetPoint1(width / 2.0, -height / 2.0, 0.0)
     plane.SetPoint2(-width / 2.0, height / 2.0, 0.0)
     plane.SetCenter(origin)
     plane.SetNormal(normal)
     plane.SetResolution(resolution, resolution)
     plane.Update()
     self.addPolyData(plane.GetOutput(), color)