[vtkusers] Question with "AddObserver" from C# Kitware.VTK
samuelhu
523853955 at qq.com
Thu Aug 7 23:05:33 EDT 2014
Hello:
recently,i have an Question with "AddObserver" from C# Kitware.VTK.
i want to make a pick operation, so i use the "AddObserver" command,but
it's always show errors the following messages:
error 16 parameter 2: can't translate “methods” to “Kitware.VTK.vtkCommand”
D:\VTK\testVTK\Form1.cs 625 71 testVTK
the program line like this:
iren.AddObserver((uint)vtkCommand.EventIds.KeyPressEvent,KeyPressVtk,
0.01f);
note:
public void KeyPressVtk(vtkObject caller, uint eventId, object clientData,
IntPtr callData)
{
string key = iren.GetKeySym();
switch (key.ToLower())
{
case "h":
if (listPickerActors != null)
{
if (listPickerActors.Count > 0)
{
....
}
}
break;
case "c":
//ClearPickers();
break;
default:
break;
}
iren.Render();
}
but,i make it when i use the "VTK-5.0.1-wrap-1.1",it's also make program
with C#
<http://vtk.1045678.n5.nabble.com/file/n5728144/QQ%E6%88%AA%E5%9B%BE20140808105258.png>
so,can you tell me ,how to use the "AddObserver" in C# Kitware.VTK. and
make pick operation
--
View this message in context: http://vtk.1045678.n5.nabble.com/Question-with-AddObserver-from-C-Kitware-VTK-tp5728144.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list