[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> </DIV>
<DIV>
<DIV> &nb \
sp; vtkPlaneSource planeSource1 = new vtkPlaneSource();</DIV>
<DIV> &n \
bsp; vtkPlaneSource planeSource2 = new vtkPlaneSource();</DIV>
<DIV> planeSource1.SetCenter(x, y, z);</DIV>
<DIV> planeSource1.SetNormal(0.0, y, 0.0);</DIV>
<DIV> planeSource2.SetCenter(x, y, z);</DIV>
<DIV> planeSource2.SetNormal(x, 0.0, 0.0);</DIV>
<DIV> &n \
bsp; vtkPolyData plane1 = planeSource1.GetOutput();</DIV> \
<DIV> &nb \
sp; vtkPolyData plane2 = planeSource2.GetOutput();</DIV> \
<DIV> &nb \
sp; vtkPolyDataMapper mapper1 = new vtkPolyDataMapper();</DIV>
<DIV> mapper1.SetInput(plane1);</DIV>
<DIV> &n \
bsp; vtkPolyDataMapper mapper2 = new vtkPolyDataMapper();</DIV>
<DIV> mapper2.SetInput(plane2);</DIV>
<DIV> vtkActor actor1 = new vtkActor();</DIV>
<DIV> vtkActor actor2 = new vtkActor();</DIV>
<DIV> actor1.SetMapper(mapper1);</DIV>
<DIV> actor2.SetMapper(mapper2);</DIV>
<DIV> actor1.GetProperty().SetColor(0.0, 1.0, 0.0);</DIV>
<DIV> actor2.GetProperty().SetColor(1.0, 0.0, 0.0);</DIV>
<DIV> ren.AddActor(actor1);</DIV>
<DIV> ren.AddActor(actor2);</DIV></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </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