[vtkusers] How to set a normal of a cell?

vtklearny msjean at gmx.de
Tue Jun 9 08:03:27 EDT 2009




daviddoria wrote:
> 
> 
> I just put this up on the wiki:
> http://www.vtk.org/Wiki/Point_and_Cell_Normals
> 
> Is this what you are looking for?
> ...
> Let us know if you have any more problems.
> 
> Thanks,
> 
> David
> 


Thank you a lot David.
That link helped: http://www.vtk.org/Wiki/Point_and_Cell_Normals 

My aim is to modify the normals dynamically on some events.(on point data
changed e.g)
Unfortunately my problem is not solved yet. 
The normal data is changed but the rendering seems not to care.
I modified the getNormals loop of the link's example and changed all normals
by SetTupel(i,TN) to one testvalue.
I expected my testscene(simple cube , light, camera) to look damaged, but
nothing was diffrent.
The faces of the cube were enlightened and recognizable, as before.
Then I tried calling
polydata->GetCellData()->SetNormals(TriangleNormalsRetrievedAndChanged);
again, after the changing loop.
Lots of update()/modified() methods I called desperately but still no
effect.

What am I doing wrong ?Any ideas ?


PS:The downcast to a doubleArray was not necessary by the way. vtkDataArray
worked just fine.

--vtkLearny
-- 
View this message in context: http://www.nabble.com/How-to-set-a-normal-of-a-cell--tp23924126p23941513.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list