[vtkusers] AddObserver with C#
Андрей Глухов
realandron at gmail.com
Tue Feb 9 05:08:56 EST 2010
Hello.
Could you show an example for Addobserver in C #? Or suggest how to alter an
example:
class vtkBWCallback : public vtkCommand
{
public:
static vtkBWCallback *New()
{ return new vtkBWCallback; }
virtual void Execute(vtkObject *caller, unsigned long, void*)
{
vtkBoxWidget *boxWidget = reinterpret_cast<vtkBoxWidget*>(caller);
boxWidget->GetTransform(this->Transform);
this->Actor->SetUserTransform(this->Transform);
}
vtkBWCallback():Transform(0),Actor(0) {}
vtkTransform *Transform;
vtkActor *Actor;
};
...
boxWidget->AddObserver(vtkCommand::InteractionEvent,myCallback);
...
--
С Уважением,
Андрей.
Best regards, Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100209/29f734c8/attachment.htm>
More information about the vtkusers
mailing list