mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027682: Visualization - provide method Prs3d_Drawer::SetShaderProgram() for setting program
AIS_ColoredDrawer has been moved to dedicated file. AIS_ColoredShape::CustomAspectsMap() - added public method for accessing aspects map. AIS_InteractiveObject::SynchronizeAspects() - added method for synchronizing all primitive aspects at low-level (TKOpenGl) after their modification.
This commit is contained in:
@@ -671,3 +671,50 @@ void AIS_InteractiveObject::SetIsoOnTriangulation (const Standard_Boolean theIsE
|
||||
{
|
||||
myDrawer->SetIsoOnTriangulation (theIsEnabled);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SynchronizeAspects
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_InteractiveObject::SynchronizeAspects()
|
||||
{
|
||||
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
|
||||
{
|
||||
const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue().Presentation();
|
||||
if (aPrs3d.IsNull()
|
||||
|| aPrs3d->Presentation().IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPrs3d->Presentation()->Groups()); aGroupIter.More(); aGroupIter.Next())
|
||||
{
|
||||
Handle(Graphic3d_Group)& aGrp = aGroupIter.ChangeValue();
|
||||
if (aGrp.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_AspectLine3d) aLineAspect = aGrp->LineAspect();
|
||||
Handle(Graphic3d_AspectFillArea3d) aFaceAspect = aGrp->FillAreaAspect();
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAspect = aGrp->MarkerAspect();
|
||||
Handle(Graphic3d_AspectText3d) aTextAspect = aGrp->TextAspect();
|
||||
if (!aLineAspect.IsNull())
|
||||
{
|
||||
aGrp->SetGroupPrimitivesAspect (aLineAspect);
|
||||
}
|
||||
if (!aFaceAspect.IsNull())
|
||||
{
|
||||
aGrp->SetGroupPrimitivesAspect (aFaceAspect);
|
||||
}
|
||||
if (!aMarkerAspect.IsNull())
|
||||
{
|
||||
aGrp->SetGroupPrimitivesAspect (aMarkerAspect);
|
||||
}
|
||||
if (!aTextAspect.IsNull())
|
||||
{
|
||||
aGrp->SetGroupPrimitivesAspect (aTextAspect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user