[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    [vtkusers] how to change the size of plane
From:       "myaqua1982" <myaqua1982 () 163 ! com>
Date:       2010-09-30 2:41:24
Message-ID: 201009301041242814427 () 163 ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"><LINK rel=stylesheet 
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"></HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana>Hi all,</FONT></DIV>
<DIV>I have define two plane with the class of vtkPlanesource. But they are too 
small. How can I modify the size of the plane?</DIV>
<DIV>This is the C# code almost the same as C++.</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;vtkPlaneSource&nbsp;planeSource1&nbsp;=&nbsp;new&nbsp;vtkPlaneSource();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;vtkPlaneSource&nbsp;planeSource2&nbsp;=&nbsp;new&nbsp;vtkPlaneSource();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;planeSource1.SetCenter(x,&nbsp;y,&nbsp;z);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;planeSource1.SetNormal(0.0,&nbsp;y,&nbsp;0.0);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;planeSource2.SetCenter(x,&nbsp;y,&nbsp;z);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;planeSource2.SetNormal(x,&nbsp;0.0,&nbsp;0.0);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;vtkPolyData&nbsp;plane1&nbsp;=&nbsp;planeSource1.GetOutput();</DIV> \
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;vtkPolyData&nbsp;plane2&nbsp;=&nbsp;planeSource2.GetOutput();</DIV> \
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;vtkPolyDataMapper&nbsp;mapper1&nbsp;=&nbsp;new&nbsp;vtkPolyDataMapper();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapper1.SetInput(plane1);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;vtkPolyDataMapper&nbsp;mapper2&nbsp;=&nbsp;new&nbsp;vtkPolyDataMapper();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapper2.SetInput(plane2);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkActor&nbsp;actor1&nbsp;=&nbsp;new&nbsp;vtkActor();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkActor&nbsp;actor2&nbsp;=&nbsp;new&nbsp;vtkActor();</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actor1.SetMapper(mapper1);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actor2.SetMapper(mapper2);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actor1.GetProperty().SetColor(0.0,&nbsp;1.0,&nbsp;0.0);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actor2.GetProperty().SetColor(1.0,&nbsp;0.0,&nbsp;0.0);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ren.AddActor(actor1);</DIV>
 <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ren.AddActor(actor2);</DIV></DIV>
 <DIV><FONT size=2 face=Verdana></FONT>&nbsp;</DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2010-09-30 
</FONT></DIV><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>

<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>myaqua1982</SPAN> 
</FONT></DIV></FONT></BODY></HTML>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic