
Thu, 04/13/2006 - 17:47
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.
Fri, 04/14/2006 - 00:05
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
Thu, 06/29/2006 - 22:47
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
Thu, 06/29/2006 - 23:06
Hi, disregard my message. I got it.
Thanx
Fri, 06/30/2006 - 00:29
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