We have to clear actors in vtkCellPicker object before InitializePickList.

In the function Pick, the picker object will addItem to increase its reference count.

So we need to do the following tasks for picker object in class destructor function to avoid crash or weird visible bug.

m_ItemPicker->GetActors()->RemoveAllItems();
m_ItemPicker->GetProp3Ds()->RemoveAllItems();
m_ItemPicker->InitializePickList();
m_ItemPicker->RemoveAllObservers();
Categories: VTK

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Convert Chinese
: help you to convert Simplified Chinese and Traditional Chinese.

X
A prohibited operation
0
Would love your thoughts, please comment.x
()
x