[vtkusers] Overriding RequestData() (Ellipsoid source)

David Doria daviddoria+vtk at gmail.com
Mon Oct 12 06:09:10 EDT 2009


I am trying to create an ellipsoid source by simply creating a subclass of
vtkSphereSource and applying a transformation to it. Before even writing the
transformation code, I wanted to make sure the new subclass was working
properly so I created a quick test VisualizeEllipsoid.cpp (this along with
the vtkEllipsoidSource class can be found here:
http://www.rpi.edu/~doriad/VTK_List/vtkEllipsoidSource/<http://www.rpi.edu/%7Edoriad/VTK_List/vtkEllipsoidSource/>
)

If I do not override RequestData(), the example works properly and displays
a sphere. However if I override RequestData to simply call the parent class
(SphereSource) RequestData function, I get the following error:

vtkEllipsoidSource (0x8b27df8): Definition of Execute() method should be in
subclass and you should really use the ExecuteData(vtkInformation
*request,...) signature instead

Can anyone explain what this means? Also, it looks like the
RequestInformation function of vtkSphereSource is creating a bounding box.
What is this used for? (i.e. do I actually need to override
RequestInformation for the new source to find the ellipsoid's bounding box?)

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091012/9d41be8d/attachment.htm>


More information about the vtkusers mailing list