[vtkusers] getting normals

K.R.Subramanian krs at cs.uncc.edu
Tue Jul 9 17:56:00 EDT 2002


Alexander Smondyrev wrote:

>   Hi,
>
> Thank you so much for your help. I actually found
> another solution, which probably does the same thing.
>
> vtkDataArray *norm1 = vtkFloatArray::New();
>   norm1 =
> normals->GetOutput()->GetPointData()->GetNormals();

vtkDataArray by default creates a FloatArray, it seems.

Which brings up another question.  Why is vtkDoubleArray
accepting and returning floats among its member functions - shouldnt
these be doubles?  Very confusing.  Similarly vtkIntArray..

    -- krs

>
>
> Now it works for me just fine.
>
> I really appreciate your help.
>
>   - Alex.
>
> --- "K.R.Subramanian" <krs at cs.uncc.edu> wrote:
> > You didnt read my email fully -:)  you must cast as
> > follows:
> >
> > vtkFloatArray *norm1 = vtkFloatArray::New();
> >     norm1 = (vtkFloatArray *)
> > normals->GetOutput()->GetPointData()->GetNormals();
> >
> > This works for me.. likely, its returning a
> > vtkDataArray type , which must
> > be cast to a specific concrete type.
> >
> >     -- krs
> >
> > --
> > K.R.Subramanian                        Phone: (704)
> > 687-4872
> > Department of Computer Science         FAX:   (704)
> > 687-4893
> > UNC Charlotte, CARC 311                Email:
> > krs at cs.uncc.edu
> > Charlotte, NC 28223-0001               Web:
> > http://www.cs.uncc.edu/~krs
> >
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com

--
K.R.Subramanian                        Phone: (704) 687-4872
Department of Computer Science         FAX:   (704) 687-4893
UNC Charlotte, CARC 311                Email: krs at cs.uncc.edu
Charlotte, NC 28223-0001               Web: http://www.cs.uncc.edu/~krs






More information about the vtkusers mailing list