Search found 23 matches

by CCNewbieL6
Mon Apr 26, 2021 4:49 am
Forum: Plugins
Topic: How to remove a point form a ccPointCloud object?
Replies: 2
Views: 15118

How to remove a point form a ccPointCloud object?

Hello daniel,
Now I know how to add/ modify(rotate/ translate) a piont. But I cannot find a method to remove a point by a given index from a ccPointCloud object.
Could you help me?
Thank you very much.
by CCNewbieL6
Tue Apr 06, 2021 9:19 am
Forum: Plugins
Topic: How to Modify points and Rotate an point cloud object?
Replies: 4
Views: 17087

Re: How to Modify points and Rotate an point cloud object?

Thank you, Daniel! I got it. To rotate a point cloud object or a mesh: #include <cmath> ccPointCloud pc; // pc is a point cloud. pc.addPoint(CCVector3(x, y, z)); // add a point ...... // here, we can add some more points CCVector3 axis3dx(1, 0, 0); // rotate around the x-axis CCVector3 axis3dy(0, 1,...
by CCNewbieL6
Mon Apr 05, 2021 8:15 am
Forum: Plugins
Topic: How to Modify points and Rotate an point cloud object?
Replies: 4
Views: 17087

How to Modify points and Rotate an point cloud object?

Hello, It is me again. As the title shown, I want to change the xyz value of a point cloud object. And I want to rotate the object. ccPointCloud pc; pc.addPoint(CCVector3(x, y, z)); ...... // at here, I want to change the xyz value of pc. I have read a former post(Move mesh in plugin), in which I sa...
by CCNewbieL6
Sun Mar 07, 2021 3:00 pm
Forum: Plugins
Topic: How to Refresh PoinCloud in Plugin?
Replies: 5
Views: 18041

Re: How to Refresh PoinCloud in Plugin?

Thank you, daniel! My issue has been solved perfectly. Let me make a Summarize: To refresh the display of a point cloud, just simply call "pc->redrawDisplay();": ccPointCloud *pc; ...... pc->redrawDisplay(); // refresh Before adding a Point to pc, we should reserve memory first: pc->reserv...
by CCNewbieL6
Sun Mar 07, 2021 2:30 pm
Forum: Plugins
Topic: How to add ScalarValue while adding points?
Replies: 2
Views: 13152

Re: How to add ScalarValue while adding points?

Thank you, daniel! Your suggestion have solved my issue perfectly. What needs to be added is “pc->setCurrentDisplayedScalarField(0); ” This is the modified code: ccPointCloud *pc; ...... pc->setDisplay(m_app->getActiveGLWindow()); pc->addScalarField("DefaultScalarField"); pc->enableScalarF...
by CCNewbieL6
Sun Mar 07, 2021 11:54 am
Forum: Plugins
Topic: How to Sleep in Plugin?
Replies: 3
Views: 14599

Re: How to Sleep in Plugin?

I solved this problem by creating a thread. To create a thread to do something like sleep(). This way: #include <thread> #include <windows.h> void Scanner(int a){ ...... Sleep(100); } ...... std::thread *lidarThread; //To run Scanner(1) in a thread; lidarThread = new std::thread(Scanner, 1);
by CCNewbieL6
Sun Mar 07, 2021 11:45 am
Forum: Plugins
Topic: How to add ScalarValue while adding points?
Replies: 2
Views: 13152

How to add ScalarValue while adding points?

Hello, I try to add ScalarValue while adding points. I tried these codes, but nothing happened. ccPointCloud *pc; ...... pc->setDisplay(m_app->getActiveGLWindow()); pc->addScalarField("DefaultScalarField"); pc->enableScalarField(); pc->setCurrentScalarField(0); pc->showColors(true); pc->se...
by CCNewbieL6
Sun Mar 07, 2021 8:41 am
Forum: Plugins
Topic: How to Refresh PoinCloud in Plugin?
Replies: 5
Views: 18041

Re: How to Refresh PoinCloud in Plugin?

Thank you for your reply, WargodHernandez. I have tried these, but it does not work: ccMainAppInterface *m_app; ccHObject *container; ccPointCloud *pc; container = new ccHObject("Scan001"); pc = new ccPointCloud("RealScan"); container->addChild(pc); m_app->addToDB(container, true...
by CCNewbieL6
Sat Mar 06, 2021 6:40 pm
Forum: Plugins
Topic: How to Refresh PoinCloud in Plugin?
Replies: 5
Views: 18041

How to Refresh PoinCloud in Plugin?

Hello! During running my plugin, I add points in a ccPointCloud object. How can I refresh it so that I can get a real-time updated pointcloud view? ccMainAppInterface *m_app; ccHObject *container; ccPointCloud *pc; container = new ccHObject("Scan001"); pc = new ccPointCloud("RealScan&...