[vtkusers] Normal on PolyData
Amy Henderson
amy.henderson at kitware.com
Mon Jul 15 09:04:23 EDT 2002
At 06:36 PM 7/14/2002 +0000, Yuan Jin wrote:
>Hi all,
>
>How to get the normal of a particular point on a PolyData in vtk4.0, since
>vtkNormals is obsolete.
>
>in vtk3.2, we can use as below:
>
>PolyData.GetPointData().GetNormals().GetNormal(pointId)
>
>How about vtk4.0?
Each data set attribute in VTK 4.0 is stored as a vtkDataArray, which is
why vtkNormals, vtkScalars, vtkVectors, etc., are obsolete. You can still call
PolyData->GetPointData()->GetNormals(),
but it will return a vtkDataArray instead of a vtkNormals, so to get a
normal for a particular point, you use a GetTuple(pointId) call, which
returns a float*. So the above line would look like this:
PolyData->GetPointData()->GetNormals()->GetTuple(pointId).
- Amy
>Thanks,
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list