View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003441VTK(No Category)public2006-06-24 14:152013-04-05 19:56
ReporterDominik Szczerba 
Assigned ToClinton Stimpson 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003441: problems with QVTKWidget and vtkCellPicker
DescriptionI am sending an EndPickEvent to a slot in a widget containing a QVTKWidget:

void aWidget::pick(vtkObject* caller){
  vtkRenderWindowInteractor* iren =
vtkRenderWindowInteractor::SafeDownCast(caller);

 vtkCellPicker *cellPicker = (vtkCellPicker *)iren->GetPicker();
  cellPicker->PrintSelf(cerr,vtkIndent());
  long id = cellPicker->GetCellId();
  cerr << "cellPicker->GetCellId() = " << id << endl;
}

I connect to it as follows during the widget's initialization:

vtkEventQtSlotConnect* connections = vtkEventQtSlotConnect::New();
connections->Connect(widget.GetRenderWindow()->GetInteractor(),
vtkCommand::EndPickEvent,&widget,SLOT(pick(vtkObject*)));
connections->PrintSelf(cerr, vtkIndent());

The slot routine is invoked properly with the 'p' hey and all infos from PrintSelf make
sense (e.g. event position, window size, etc.), but GetCellId() doesnt
(big negative constant). What am I doing wrong, with "plain" vtkCommands (without Qt)
it works fine?

regards,
Dominik
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0007863)
Clinton Stimpson (developer)
2007-06-12 16:49

Works for me.

What if you change
vtkCellPicker *cellPicker =
  (vtkCellPicker*)iren->GetPicker();

to
vtkCellPicker* cellPicker =
  vtkCellPicker::SafeDownCast(iren->GetPicker());

just to be sure you have a vtkCellPicker?

If I took my vtkCellPicker out and used the default one (not a vtkCellPicker) then I got large negative numbers.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2013-04-05 19:56 Berk Geveci Status customer review => closed


Copyright © 2000 - 2018 MantisBT Team