[vtkusers] Bugs in vtkSource
John Biddiscombe
john.biddiscombe at mirada-solutions.com
Thu Jan 30 08:22:50 EST 2003
>>>>
I know that it isn't nice.
I don't think that i'm breaking everything.
I try to create an own vtkPolyDataSource, which create a polydata of a
camera.
So I derived my vtkCameraSource from vtkPolyDataSource.
To create a camera polydata, I can use several vtkPolyDataSources and
combine
them to one PolyData with vtkAppendPolyDataFilter (in Execute method of
my
vtkCameraSource).
Instead of updating the vtkAppendPolyDataFilter and copying the polydata
of
that filter into the output polydata of my vtkCameraSource, I redirect
my
Output to the vtkAppendPolyDataFilter (at that moment I did not know
that a
PolyData has exactly one Source).
Theoreticcally it would work (with the side-effect, that my
vtkCameraSource
looses its output after Execute() resp. Update(). Practically it doesn't
work
because of the "bugs".
Now I'm copying the Polydatas because I don't want to loose my Output
polydata!!!
<<<
The correct way to do it is inside your vtkCameraSource
output->CopyStructure(internalappendpolydatafilter->GetOutput());
then you get a reference counted copy of the data
see also point and cell data ->passdata() members if scalars are likely
to be present
JB
More information about the vtkusers
mailing list