[vtkusers] Question regarding setting up a plane
Neerav Patel
neeravpatel at hotmail.com
Sat Aug 18 13:23:49 EDT 2007
Hi,
I want to set a set of planes at specific Z coordinates. I tried to add the following code and it doesnt do anything. Any help would be greatly appreciated.
vtkTransform *transPlane0 = vtkTransform::New();
transPlane0->RotateZ(180.0);
transPlane0->Scale(640.0,480.0,1.0);
transPlane0->Translate(-320,240,0.0);//-320.0,240.0,0.0);
transPlane0->Scale(-640,480,1.0);
// Add planes... one for each image
vtkPlaneSource *plane0 = vtkPlaneSource::New();
// Premultiply the plane transformation
vtkTransformPolyDataFilter *planefilter0 = vtkTransformPolyDataFilter::New();
planefilter0->SetInput(plane0->GetOutput());
planefilter0->SetTransform(transPlane0);
planefilter0->Update();
vtkPolyDataMapper *planeMapper0 = vtkPolyDataMapper::New();
planeMapper0->SetInput(planefilter0->GetOutput());
planeMapper0->SetColorModeToMapScalars();
vtkActor *planeActor0 = vtkActor::New();
planeActor0->SetMapper(planeMapper0);
planeActor0->GetProperty()->SetOpacity(0.35);
ren->AddActor(planeActor0);
Thanks
Neerav Patel
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070818/56f733f5/attachment.htm>
More information about the vtkusers
mailing list