[vtkusers] How to use "IsTypeOf "?
Andrew
supersub at ccea.zju.edu.cn
Sun Oct 26 10:35:31 EST 2003
Yes, you are right. ^_^
Thank you.
----------------------------
B.su
----- Original Message -----
From: "N Smethurst" <nick.smethurst at free.fr>
To: "B.su" <supersub at ccea.zju.edu.cn>; <vtkusers at vtk.org>
Sent: Sunday, October 26, 2003 11:59 PM
Subject: Re: [vtkusers] How to use "IsTypeOf "?
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.
_______________________________________________
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://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list