def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkTriangularTCoords(), 'Processing.', ('vtkPolyData',), ('vtkPolyData',), replaceDoc=True, inputFunctions=None, outputFunctions=None)
def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__(self, module_manager, vtk.vtkTriangularTCoords(), 'Processing.', ('vtkPolyData', ), ('vtkPolyData', ), replaceDoc=True, inputFunctions=None, outputFunctions=None)
renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) aTriangularTexture = vtk.vtkTriangularTexture() aTriangularTexture.SetTexturePattern(2) aTriangularTexture.SetScaleFactor(1.3) aTriangularTexture.SetXSize(64) aTriangularTexture.SetYSize(64) aSphere = vtk.vtkSphereSource() aSphere.SetThetaResolution(20) aSphere.SetPhiResolution(20) tCoords = vtk.vtkTriangularTCoords() tCoords.SetInputConnection(aSphere.GetOutputPort()) triangleMapper = vtk.vtkPolyDataMapper() triangleMapper.SetInputConnection(tCoords.GetOutputPort()) aTexture = vtk.vtkTexture() aTexture.SetInputConnection(aTriangularTexture.GetOutputPort()) aTexture.InterpolateOn() texturedActor = vtk.vtkActor() texturedActor.SetMapper(triangleMapper) texturedActor.SetTexture(aTexture) texturedActor.GetProperty().BackfaceCullingOn() texturedActor.GetProperty().SetDiffuseColor(GetRGBColor('banana')) texturedActor.GetProperty().SetSpecular(.4)