[vtkusers] Bug or Design: Rendering concave polygons with vtkActor2D
Xiaofeng Z
xf10036 at hotmail.com
Tue May 4 11:38:43 EDT 2010
Concave polygons are not rendered as expected with vtkPolyDataMapper and vtkActor2D (see below). Is it by design or is it a bug? If it's by design, is there any flag can be set to alter the rendering behaviour?
Thanks!
Xiaofeng
Hi all,
How do I make uniform transparency in a concave polygon, instead of getting multiple shades, e.g. in the attached graph?
The polygon are created with:
vtkPoints* points = vtkPoints::New();
vtkCellArray* cells = vtkCellArray::New();
points->SetNumberOfPoints(4);
// create a concave polygon (equilateral with a cutout at the bottom)
points->SetPoint(0, 10.0, 10.0, 0.0);
points->SetPoint(1, 110.0, 183.2, 0.0);
points->SetPoint(2, 210.0, 10.0, 0.0);
points->SetPoint(3, 110.0, 110.0, 0.0);
cells->Allocate(1, 5);
cells->InsertNextCell(5);
cells->InsertCellPoint(0);
cells->InsertCellPoint(1);
cells->InsertCellPoint(2);
cells->InsertCellPoint(3);
cells->InsertCellPoint(0);
vtkPolyData* poly = vtkPolyData::New();
poly->Initialize();
poly->SetGlobalWarningDisplay(1);
poly->SetPoints(points);
poly->SetPolys(cells);
A vtkActor2D and a vtkPolyDataMapper2D was used for the rendering.
Many thanks!
Xiaofeng
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy.
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100504/413c34aa/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concavepolygon.png
Type: image/png
Size: 32662 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100504/413c34aa/attachment.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100504/413c34aa/attachment.txt>
More information about the vtkusers
mailing list