[vtkusers] Help..about use normal vector to find point...
David Doria
daviddoria+vtk at gmail.com
Thu Jan 14 15:43:43 EST 2010
On Thu, Jan 14, 2010 at 2:35 PM, renlishen <renlishen at gmail.com> wrote:
>
> hi everyone
> I have a question after using vtkPolyDataNormals
>
> My code is below
> ===========================================================================
> vtkFloatArray *PointNormalArray = vtkFloatArray::SafeDownCast(
> MyvtkPolyDataNormals()->GetOutput()->GetPointData()->GetNormals() ) ;
> float pointNormal[ 3 ] ;
>
> for( int i = 0 ; i < PointNormalArray->GetNumberOfTuples() ; i++ )
> {
> PointNormalArray->GetTupleValue( i, pointNormal ) ;
> }
> ===========================================================================
>
> When I get the point's normal from "PointNormalArray->GetTupleValue( i,
> pointNormal )"
> How can I know the point's coordinate?
>
> thanks for your help..
> RenLi
>
You don't show the input to the PolyDataNormals filter, but shouldn't
it just be;
double p[3];
input->GetPoint(i,p);
?
David
More information about the vtkusers
mailing list