[vtkusers] How to use "IsTypeOf "?

N Smethurst nick.smethurst at free.fr
Sun Oct 26 10:59:02 EST 2003


Le Dimanche 26 Octobre 2003 15:48, B.su a écrit :
> As we can see, m_Picker->GetClassName() return vtkCellPicker.  It isn't
> what i want to get.

Then m_Picker is obviously not a vtkCell object. I am no expert on picking, 
but I would imagine that you need to get the cell ID with

vtkIdType ID = m_picker->GetCellId();

and cross reference it to get the cell object. So I guess the question to ask 
is "how do I get the vtkCell object from an ID of vtkCellPicker?"

The only thing the IsTypeOf() method does is tell you if a VTK object is a 
certain class type or not. Your current code will hence always return 0 since 
m_picker is not derived from vtkTriangle or vtkLine.




More information about the vtkusers mailing list