[vtkusers] Determining Actor type

Kenneth Porter shiva at sewingwitch.com
Sat Feb 20 01:43:30 EST 2010


--On Friday, February 19, 2010 10:18 PM -0700 David Gobbi 
<david.gobbi at gmail.com> wrote:

> All VTK classes also have a casting method called SafeDownCast() that
> should be used instead of dynamic_cast<>().

Again, this only works for leaf classes. It doesn't have any machinery for 
matching an intermediate class. Leaf classes are the most common case, so 
this will work in most cases.

But suppose you wanted to find all 2D actors. For that you'd need a 
dynamic_cast.





More information about the vtkusers mailing list