[vtkusers] vtkScalars.h

Ruben Patel ruben at imr.no
Thu Mar 21 11:17:42 EST 2002


>From VTK 4.0 you have to use vtkDataArray or som of its subclasses.
This is how i did it:

vtkFloatArray *newScalars = vtkFloatArray::New();

  for (i=0; i<npts; i++)
    {
    xyz[0] = xV[i]; xyz[1] = yV[i]; xyz[2] = zV[i];
    newPts->InsertPoint(i, xyz);
    newScalars->InsertValue(i, sV[i]);
    }

  dataSet->SetPoints(newPts);
  dataSet->GetPointData()->SetScalars((vtkDataArray *)newScalars);

  newPts->Delete(); //reference counted - it's okay
  newScalars->Delete();

Ruben.


-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]On Behalf Of Isaac Ben
Sent: 21. mars 2002 16:32
To: vtkusers at public.kitware.com
Subject: [vtkusers] vtkScalars.h


Hi all,
I'm trying to compile the modelling example found in
"examples/modeling/cxx/financial.cxx"  When Building,
however I recieve the error
"g:\dev\src\VTK\Examples\Modelling\Cxx\finance.cxx(30):
fatal error C1083: Cannot open include file: 'vtkScalars.h':
No such file or directory"

I'm using the cvs source and have updated as recently as
March 20th.  I've also downloaded the 4.0 src and searched
for the vtkScalars.h file to no avail.

What am I missing?

IB
The Salt... a local element @ http://www.thesalt.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