[vtkusers] Information during callback / vtkImplicitPlaneWidget2

Sebastian Gatzka sebastian.gatzka at stud.tu-darmstadt.de
Fri Mar 12 07:17:28 EST 2010


Or can I talk to the textActor like this?

     vtkTextActor *ta = reinterpret_cast<vtkTextActor*>(caller);
     ta->SetInput("TEST");

or like this?

    this->TextActor->SetInput("TEST");

No, does not work either way.



Am 12.03.2010 12:56, schrieb Sebastian Gatzka:
> Ok. Maybe you want can help me if you see something like this:
>
> // Callback for the interaction
> // This does the actual work: updates the vtkPlane implicit function.
> // This in turn causes the pipeline to update and clip the object.
> class vtkIPWCallback : public vtkCommand
> {
> public:
>   static vtkIPWCallback *New()
>     { return new vtkIPWCallback; }
>   virtual void Execute(vtkObject *caller, unsigned long, void*)
>     {
>     vtkImplicitPlaneWidget2 *planeWidget =
>       reinterpret_cast<vtkImplicitPlaneWidget2*>(caller);
>     vtkImplicitPlaneRepresentation *rep =
>       
> reinterpret_cast<vtkImplicitPlaneRepresentation*>(planeWidget->GetRepresentation());
>     rep->GetPlane(this->Plane);
>     TextActor->SetInput("Test");
>     vtkTextActor *ta = 
> reinterpret_cast<vtkTextActor*>(TextActor->GetInput());
>     ta->SetInput("Test 111111");
>     //TextActor->GetInput(this->TextActor);
>     }
>
>   vtkIPWCallback():Plane(0),Actor(0),TextActor(0) {}
>
>   vtkPlane *Plane;
>   vtkActor *Actor;
>   vtkTextActor *TextActor;
>  };
>
> I have no idea what I was doing. As a matter of fact the textActor 
> didn't change.
>
> Am 10.03.2010 15:30, schrieb David Doria:
>> On Wed, Mar 10, 2010 at 6:04 AM, Sebastian Gatzka 
>> <sebastian.gatzka at stud.tu-darmstadt.de 
>> <mailto:sebastian.gatzka at stud.tu-darmstadt.de>> wrote:
>>
>>
>>     Sorry, this is not enough information.
>>
>>     How and where do I have to do things to the textActor?!
>>     I'm not getting the syntax with reinterpret_cast and this and
>>     eveything.
>>     Sorry ...
>>
>>     I tried something from withing this Execute thing but everything
>>     just resulted in errors...
>>
>> Please post the smallest compilable example code which demonstrates 
>> the error.
>>
>> Thanks,
>>
>> David
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/cb9aabad/attachment.htm>


More information about the vtkusers mailing list