[vtkusers] Again, I am doing something wrong. (Mace.cxx)

Nick Edgington OutOfTurn at Yahoo.com
Tue Jan 22 09:05:45 EST 2002


    I am using Vtk40 under winnt.

    I attach a scalar to a vtkGlyph3D


main(){
...........................
     scalars = vtkFloatArray::New();


      scalars->InsertTuple1(0, .5);
      scalars->InsertTuple1(1, .5);
      scalars->InsertTuple1(2, 1);
      scalars->InsertTuple1(3, 0);
      scalars->InsertTuple1(4, 1);
      scalars->InsertTuple1(5, 0);

        ............
       vtkDataSet *input = glyph->GetInput();
      vtkPointData * pd = input->GetPointData();
      pd->SetScalars(scalars);
}

When I trace through

void vtkGlyph3D::Execute()
{

        ...........

        pd->GetScalars();      <<<<<===  returns NULL
                                          <<<<< === because
this->GetAttribute(SCALARS); returns -1
                                          <<<<<===  even thought it was
originally set to 0 by the pd->SetScalars(scalars);

I can force it to work by changing the flag myself.

                    Thanks in advance
                            Nick Edgington



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the vtkusers mailing list