Draw large number of points in OCC

I want to draw large number(about 100 millon) of points in occ,but each point has different color.
If I use AIS_Shape it will very very very slow
So is there any method to display such large number of points in occ(each point has different color)?

Thanks!

Forum supervisor's picture

Dear Joney,
Differently colored points can be effectively drawn using Graphic3d_ArrayOfPoints (see Graphic3d package).
Best regards
FSR

Andrey Pozdeev's picture

Hi Joney,

Look at https://code.google.com/p/openshapefactory/source/browse/SFMQTDLL/src/sr...

For an example, the line commented adds color to the group. To add unique colors to each point, I would define a struct to store the point and color then pass a list filled with many of these structs to the constructor and use the coordinate and color info stored in the list.

My example is only using the point data. It can display many millions of points...

Search the forum for this class I made, I dont remember how many millions but I had millions of points gathered from a 3d laser point scanner. The code I gave you worked but was a bit jittery after 40 million points. I then did a pure opengl test to load the points and it worked fine and fast with 100 million points.

If you experience slow rotates and performance issues.

Look at the user defined opengl callback feature of AIS to draw directly to opengl.

Good luck,

Cheers,

AP