[vtkusers] Information during callback / vtkImplicitPlaneWidget2
Sebastian Gatzka
sebastian.gatzka at stud.tu-darmstadt.de
Fri Mar 12 06:56:22 EST 2010
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/36e108a1/attachment.htm>
More information about the vtkusers
mailing list