actor picking with vtkWin32RenderWindowInteractor
Patric.Weis at mycrona.de
Patric.Weis at mycrona.de
Mon May 22 09:51:51 EDT 2000
Hi Agris!
Maybe the following can help:
To 1)
Did you try the mfc sample in the ..\sample directory, loading e.g.
weldedSpheres.vtk? Does this work? It's no problem with Win NT.
To 2)
The easiest way is an explicit call of
vtkWin32RenderWindowInteractor::OnChar() in your menu command function,
e.g.
m_pIren->OnChar(this->GetSafeHwnd(), int('p'), 1, 0);
Patric Weis
MYCRONA GmbH
- - - Original Message - - -
"Agris Klimkans"
<agris at phc.chalmers.se> An: "vtk" <vtkusers at public.kitware.com>
Gesendet von: Kopie:
owner-vtkusers at public.k Thema: actor picking with vtkWin32RenderWindowInteractor
itware.com
20.05.00 17:37
Bitte antworten an
"Agris Klimkans"
Hi!
I am writing a MFC doc/view program on a w2k computer and encountered
difficulties with actor picking.
To set up the renderer, window and interactor I am using the following code
void CMadelungView::PrepareForUnitCellPlot()
{
....
m_pRenderer = vtkRenderer::New();
m_pRenWin = vtkWin32OpenGLRenderWindow::New();
HWND hwnd = this->GetSafeHwnd();
m_pRenWin->AddRenderer(m_pRenderer);
m_pRenWin->SetParentId(hwnd);
m_pIren = vtkWin32RenderWindowInteractor::New();
m_pIren->SetRenderWindow(m_pRenWin);
......
}
1) I can rotate and zoom actors with mouse, but keyboard commands (like "p"
- picking, "w" - wireframe, etc.) doesn't work. Is there something missing
in my code?
2) I would like also to start picking of actors with a menu command instead
of "p". Is there an easy way how to do it?
Thanks in advance!
---------------------------------
Agris Klimkans
Department of Physical Chemistry
Chalmers University of Technology
S-41296 Goteborg
Sweden
tel. 46-031-7723051
fax. 46-031-7723858
mailto:agris at phc.chalmers.se
http://www.che.chalmers.se/~agris
---------------------------------
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list