<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi vtk users,<BR><BR><BR>I need some help with the vtkSphereWidget. I managed to use it but now I need to detect when the Left Button is released (or pressed whatever)<BR>SO i did something like that: <BR><BR><BR> sphereCallback = vtkSphereCallback::New();<BR><BR>  sphereCallback-&gt;m_myClass= this;<BR><BR>  m_lineWidget-&gt;GetSphereSource ()-&gt;AddObserver(vtkCommand::LeftButtonReleaseEvent,sphereCallback);<BR><BR><BR><BR>where vtkSPhereCallBack is<BR><BR><BR>class vtkSphereCallback : public vtkCommand<BR>{<BR>      public:<BR>        static vtkSphereCallback *New()<BR>      {<BR>           return new vtkSphereCallback;<BR>      }<BR> <BR>      virtual void Execute(vtkObject *caller, unsigned long, void*)<BR>     { <BR>                   }<BR><BR>    <BR>    }<BR>   vtkSphereCallback():m_myClass(0){}<BR>   MyClass  * m_myClass;<BR> <BR>};<BR><BR><BR><BR><BR><BR>But It doesn't work... the callback is not called when I release the the left button on the sphere... BUT if if put vtkCommand::InteractionEvent<BR>instead of vtkCommand::LeftButtonReleaseEvent in this case it works .. ! the callback is called... but now it will be called for everything.. but still not for the mouse click unclick...<BR>Even if I put " if (vtkCommand::LeftButtonReleaseEvent) {} " in the Execute function...<BR><BR><BR><BR><BR>Does someone has any Idea why ?,<BR><BR><BR>Regards,<BR>Adeline<BR><BR><BR>
    

                                               <br /><hr />Envie de naviguer sur Internet sans laisser de trace? <a href='http://clk.atdmt.com/FRM/go/207186970/direct/01/' target='_new'>La solution avec Internet Explorer 8</a></body>
</html>