[vtkusers] how to color a mesh by scalars of cell normals?
Terence Lim
tlim at mda.ca
Wed Oct 24 14:02:50 EDT 2001
Hi,
Does anyone know a way in which I can color the cells of my resulting
polygonal mesh by the scalars generated by the normal of each cell? I think
I know how to get the scalars but I do not know how to use these scalars to
color my resulting mesh. Here is what I have so far:
vtkPolyDataNormals *pdn = vtkPolyDataNormals::New();
pdn->SetInput(Delaunay->GetOutput());
pdn->ComputeCellNormalsOn();
float scalar_value_of_some_id =
pdn->GetOutput()->GetCellData()->GetScalars()->GetScalar(someid);
Thanks in advance for any hints,
Terence Lim
More information about the vtkusers
mailing list