Page 1 of 1

Entity select mode signals

Posted: Tue Aug 27, 2019 5:35 pm
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!

Re: Entity select mode signals

Posted: Tue Aug 27, 2019 8:19 pm
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)