1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026885: Visualization - drop redundant aspects from structure level

Graphic3d_CStructure and OpenGl_Structure do not store structure aspects anymore.
Graphic3d_Structure, Prs3d_Presentation - structure aspect methods have been removed.

AIS_InteractiveObject::SetAspect() - globalChange argument has been removed.

Undocumented test methods V3d::DrawSphere(), ::SetPlane(), ::PickGrid() have been removed.
This commit is contained in:
kgv
2016-06-20 19:10:51 +03:00
committed by bugmaster
parent a47d34efa9
commit 2831708b17
29 changed files with 75 additions and 1207 deletions

View File

@@ -483,15 +483,14 @@ Handle(Prs3d_Presentation) AIS_InteractiveObject::Presentation() const
//function : SetAspect
//purpose :
//=======================================================================
void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
const Standard_Boolean globalChange) {
void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect)
{
if( HasPresentation() ) {
Handle(Prs3d_Presentation) prs = Presentation();
{ Handle(Prs3d_ShadingAspect) aspect =
Handle(Prs3d_ShadingAspect)::DownCast(anAspect);
if( !aspect.IsNull() ) {
if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
return;
}
@@ -499,7 +498,6 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
{ Handle(Prs3d_LineAspect) aspect =
Handle(Prs3d_LineAspect)::DownCast(anAspect);
if( !aspect.IsNull() ) {
if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
return;
}
@@ -507,7 +505,6 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
{ Handle(Prs3d_PointAspect) aspect =
Handle(Prs3d_PointAspect)::DownCast(anAspect);
if( !aspect.IsNull() ) {
if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
return;
}
@@ -515,7 +512,6 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
{ Handle(Prs3d_TextAspect) aspect =
Handle(Prs3d_TextAspect)::DownCast(anAspect);
if( !aspect.IsNull() ) {
if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
return;
}
@@ -543,7 +539,6 @@ void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
if ( !aPrs3d.IsNull() ) {
const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
if( !aStruct.IsNull() ) {
aStruct->SetPrimitivesAspect( myDrawer->ShadingAspect()->Aspect() );
// Workaround for issue 23115: Need to update also groups, because their
// face aspect ALWAYS overrides the structure's.
const Graphic3d_SequenceOfGroup& aGroups = aStruct->Groups();