Displaying an average of 100 000 points

Hi everyone !

I'm trying to display many points which are in an OCAF tree. I want to change their presentations. Something is wrong with my code the view is very slow. I use this part of code to display my events :

while(pos!=NULL)
{

pEvent=(WEvent*) asceneex->m_listEvents->GetNext(pos);

labcurr = lab1.NewChild();

TDataStd_Point::Set(labcurr, gp_Pnt(pEvent->m_pstructLocationData->m_dNorth,pEvent->m_pstructLocationData->m_dEast,pEvent->m_pstructLocationData->m_dDown));

// Get the TPrsStd_AISPresentation of the new point TNaming_NamedShape
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(labcurr, TDataStd_Point::GetID());

prs->Display();

prs->GetAIS()->Attributes()->PointAspect()->SetColor(Quantity_NOC_RED);
prs->Update();

}
Please tell me how can I display these points with a good graphics acceleration with an OCAF tree. What did I do wrong ?

Thank you very much for your help !

Philippe.

Patrik Mueller's picture

Hi,

if it is just for display you could try to add all points to a TopoDS_Compound and then just display the compound.

Greets,

Patrik

mamadou sy's picture

Hi Patrik

Could you please help find out my erros: it is aying DFBrowser.dll missing when trying to execute the sample OCAF (OCC 6.1). How do I get and where to put this DFBrowser.dll.
Lynking was not an issue.
Thank you very much

mamadou sy's picture

Hi, disregard my message. I got it.
Thanx

Stephane Routelous's picture

if you want better performances for displaying points :
use
prs->GetAIS()->Attributes()->PointAspect()->SetScale(5);
prs->GetAIS()->Attributes()->PointAspect()->SetTypeOfMarker(Aspect_TOM_POINT);

to change the marker to TOM_POINT which is the OpenGL primitive (a pixel) instead of a bitmap (marker)

HTH
Stephane