[vtkusers] Re: Question about mixing 2d and 3d actors again...

Anja Ende anja.ende at googlemail.com
Wed Oct 11 08:53:15 EDT 2006


hmmmmmmmmm... also this SetTransformCoordinate seems only available with
vtkPolyDataMapper2D. Is there anything similar for the vtkImageMapper?

Confusing....! :D

Cheers,
Anja

On 11/10/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> Hi Roger,
>
> Thanks for replying to my question.
>
> I just wanted to clarify it with you. So you had 2d and 3d actors on the
> same scene and you set the coordinate system of the 2D mapper to the world
> coordinate system. Did I understand you correctly?
>
> Cheers,
>
> Anja
>
> On 11/10/06, Anja Ende <anja.ende at googlemail.com> wrote:
> >
> > Hi everyone,
> >
> > I was wondering if anyone has successfully displayed a 3d actor over a
> > 2d actor and be willing to share an example.
> >
> > I tried but unsuccessfully... I am only either able to show the 3d actor
> > that is scaled and my 2d actor is not visible or I see nothing at all. I
> > tried setting camera stuff (especially with  parallel projection) but did
> > not really work. I guess I am shooting in the dark here...
> >
> > I am trying to do something simple like:
> >
> > // Add our 2d actor
> > this->m_renderer->AddActor(this->m_actor2D);
> >
> > vtkPNGReader * cursorImage = vtkPNGReader::New();
> > cursorImage->SetFileName("/home/anja/bin/crosshair.png");
> > cursorImage->Update();
> >
> > vtkImageActor * actor = vtkImageActor::New();
> > actor->SetInput(cursorImage->GetOutput());
> > actor->PickableOn();
> > // Add the 3d actor.
> > this->m_renderer->AddActor(actor);
> > actor->Delete();
> > cursorImage->Delete();
> >
> > // As per David's suggestion.
> > this->m_actor2D->GetProperty()->SetDisplayLocationToBackground();
> >
> > this->m_renderer->GetActiveCamera()->ParallelProjectionOn();
> >
> > Hope you can help me. Thanks again :)
> >
> > I will keep trying and update this thread when this is solved. I think a
> > lot of newbies like me are struggling with this.
> >
> > Cheers,
> >
> > Anja
>
>
>
>
> --
> Cheers,
>
> Anja




-- 
Cheers,

Anja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061011/6a74a052/attachment.htm>


More information about the vtkusers mailing list