Entity select mode signals

Feel free to ask any question here
Post Reply
kasper
Posts: 29
Joined: Thu May 17, 2018 6:13 am

Entity select mode signals

Post by kasper »

Because I want to try to rewrite a small program that similar to ccviewer but simpler.

Im using ccGLWindow class with a QWidget in my project

Now I got a problem for selecting the entity to draw a selected bounding-box .


I connect these signals and slots, but all ccHObject* type object I get from slots FastPicking & EntitySelect are nullptr.

connect(m_glWindow_, &ccGLWindow::itemPicked, this, &Viewer3D::PointPicking);
connect(m_glWindow_, &ccGLWindow::itemPickedFast, this, &Viewer3D::FastPicking);
connect(m_glWindow_, &ccGLWindow::entitySelectionChanged, this, &Viewer3D::EntitySelect);

Am I use the wrong signals? how to get the correct singnals. Thanks!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Entity select mode signals

Post by daniel »

itemPicked is for points or triangles (so it's not the right signal).
itemPickedFast is for internal use (for 2D labels, interactors, etc.)

entitySelectionChanged is the right signal. Then if you don't get anything you may want to debug the startOpenGLPicking method (I know that some GPU/chipset drivers don't handle OpenGL picking buffer properly)
Daniel, CloudCompare admin
Post Reply