Exemplo n.º 1
0
    def __init__(self, renderer, data, type, index):
        PeacockActor.__init__(self, renderer)
        self.data = data
        self.type = type
        self.index = index

        self.solid_visible = False
        self.edges_visible = False

        self.mesh = data.GetBlock(type).GetBlock(index)

        self.geom = vtk.vtkDataSetSurfaceFilter()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.geom.SetInput(self.mesh)
        else:
            self.geom.SetInputData(self.mesh)
        self.geom.Update()

        self.mapper = vtk.vtkDataSetMapper()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.mapper.SetInput(self.mesh)
        else:
            self.mapper.SetInputData(self.mesh)

        self.actor = vtk.vtkActor()
        self.actor.SetMapper(self.mapper)
        self.actor.GetProperty().SetPointSize(5)
        self.actor.GetProperty().SetEdgeColor(0,0,0)
        self.actor.GetProperty().SetAmbient(0.3);
Exemplo n.º 2
0
    def __init__(self, renderer, data, type, index):
        PeacockActor.__init__(self, renderer)
        self.data = data
        self.type = type
        self.index = index

        self.solid_visible = False
        self.edges_visible = False

        self.mesh = data.GetBlock(type).GetBlock(index)

        self.geom = vtk.vtkDataSetSurfaceFilter()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.geom.SetInput(self.mesh)
        else:
            self.geom.SetInputData(self.mesh)
        self.geom.Update()

        self.mapper = vtk.vtkDataSetMapper()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.mapper.SetInput(self.mesh)
        else:
            self.mapper.SetInputData(self.mesh)

        self.actor = vtk.vtkActor()
        self.actor.SetMapper(self.mapper)
        self.actor.GetProperty().SetPointSize(5)
        self.actor.GetProperty().SetEdgeColor(0, 0, 0)
        self.actor.GetProperty().SetAmbient(0.3)
Exemplo n.º 3
0
  def __init__(self, original_actor, plane):
    PeacockActor.__init__(self, original_actor.renderer)
    self.original_actor = original_actor
    self.plane = plane

    self.clipper = vtk.vtkTableBasedClipDataSet()
    self.clipper.SetInput(self.original_actor.mesh)
    self.clipper.SetClipFunction(self.plane)
    self.clipper.Update()

    self.clip_mapper = vtk.vtkDataSetMapper()
    self.clip_mapper.SetInput(self.clipper.GetOutput())

    self.clip_actor = vtk.vtkActor()
    self.clip_actor.SetMapper(self.clip_mapper)
Exemplo n.º 4
0
    def __init__(self, original_actor, plane):
        PeacockActor.__init__(self, original_actor.renderer)
        self.original_actor = original_actor
        self.plane = plane

        self.clipper = vtk.vtkTableBasedClipDataSet()
        self.clipper.SetInput(self.original_actor.mesh)
        self.clipper.SetClipFunction(self.plane)
        self.clipper.Update()

        self.clip_mapper = vtk.vtkDataSetMapper()
        self.clip_mapper.SetInput(self.clipper.GetOutput())

        self.clip_actor = vtk.vtkActor()
        self.clip_actor.SetMapper(self.clip_mapper)
Exemplo n.º 5
0
  def __init__(self, renderer, mesh):
    PeacockActor.__init__(self, renderer)
    self.mesh = mesh

    self.geom = vtk.vtkDataSetSurfaceFilter()
    self.geom.SetInput(self.mesh)
    self.geom.Update()

    self.mapper = vtk.vtkPolyDataMapper()
    self.mapper.SetInput(self.geom.GetOutput())

    self.actor = vtk.vtkActor();
    self.actor.SetMapper(self.mapper);
    self.actor.GetProperty().SetPointSize(5)
    self.actor.GetProperty().SetEdgeColor(0,0,0)
    self.actor.GetProperty().SetAmbient(0.3);
Exemplo n.º 6
0
    def __init__(self, original_actor, plane):
        PeacockActor.__init__(self, original_actor.renderer)
        self.original_actor = original_actor
        self.plane = plane

        self.clipper = vtk.vtkTableBasedClipDataSet()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.clipper.SetInput(self.original_actor.mesh)
        else:
            self.clipper.SetInputData(self.original_actor.mesh)

        self.clipper.SetClipFunction(self.plane)
        self.clipper.Update()

        self.clip_mapper = vtk.vtkDataSetMapper()
        if vtk.VTK_MAJOR_VERSION <= 5:
            self.clip_mapper.SetInput(self.clipper.GetOutput())
        else:
            self.clip_mapper.SetInputConnection(self.clipper.GetOutputPort())

        self.clip_actor = vtk.vtkActor()
        self.clip_actor.SetMapper(self.clip_mapper)