[vtkusers] how to change the size of plane

myaqua1982 myaqua1982 at 163.com
Wed Sep 29 22:41:24 EDT 2010


Hi all,
I have define two plane with the class of vtkPlanesource. But they are too small. How can I modify the size of the plane?
This is the C# code almost the same as C++.

                vtkPlaneSource planeSource1 = new vtkPlaneSource();
                vtkPlaneSource planeSource2 = new vtkPlaneSource();
                planeSource1.SetCenter(x, y, z);
                planeSource1.SetNormal(0.0, y, 0.0);
                planeSource2.SetCenter(x, y, z);
                planeSource2.SetNormal(x, 0.0, 0.0);
                vtkPolyData plane1 = planeSource1.GetOutput();
                vtkPolyData plane2 = planeSource2.GetOutput();
                vtkPolyDataMapper mapper1 = new vtkPolyDataMapper();
                mapper1.SetInput(plane1);
                vtkPolyDataMapper mapper2 = new vtkPolyDataMapper();
                mapper2.SetInput(plane2);
                vtkActor actor1 = new vtkActor();
                vtkActor actor2 = new vtkActor();
                actor1.SetMapper(mapper1);
                actor2.SetMapper(mapper2);
                actor1.GetProperty().SetColor(0.0, 1.0, 0.0);
                actor2.GetProperty().SetColor(1.0, 0.0, 0.0);
                ren.AddActor(actor1);
                ren.AddActor(actor2);

2010-09-30 



myaqua1982 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100930/2aed2b0d/attachment.htm>


More information about the vtkusers mailing list