-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
AIS_ListOfInteractive List;
getAISContext()->DisplayedObjects(List);
+#if OCC_VERSION_LARGE <= 0x06060000
if( !onlyInViewer ) {
AIS_ListOfInteractive List1;
getAISContext()->ObjectsInCollector(List1);
List.Append(List1);
- }
+}
+#endif
+
AIS_ListIteratorOfListOfInteractive ite(List);
for ( ; ite.More(); ite.Next() )
continue;
}
+#if OCC_VERSION_LARGE <= 0x06060000
// then try to find presentation in the collector
if(ic->IsInCollector(anAIS))
{
//}
continue;
}
-
+#endif
// if object is not displayed and not found in the collector - display it
if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
{
}
ic->Display( anAIS, false );
-
-#if OCC_VERSION_LARGE > 0x06050200
- Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast(anAIS);
- if ( !aSh.IsNull() ) {
- bool top = (aSh->isTopLevel() && aSh->switchTopLevel());
+ Handle(SALOME_AISShape) aSh = Handle(SALOME_AISShape)::DownCast (anAIS);
+ if (!aSh.IsNull())
+ {
+ aSh->SetClippable (prs->IsClippable());
+ applyExistingClipPlanesToObject (anAIS);
+#if OCC_VERSION_LARGE > 0x06050200
+ bool top = (aSh->isTopLevel() && aSh->switchTopLevel());
ic->SetZLayer( aSh, top ? getTopLayerId() : 0 );
- if(!aSh->toActivate()) {
- ic->Deactivate( aSh );
- }
- }
+ if(!aSh->toActivate())
+ {
+ ic->Deactivate( aSh );
+ }
#endif
+ }
+
//Register anAIS (if it has an entry) in entry2aisobjects map
Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
if ( !anObj.IsNull() && anObj->hasEntry())
Handle(AIS_InteractiveObject) anAIS = aIter.Value();
if ( !anAIS.IsNull() ) {
// erase the object from context : move it to collector
+#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( anAIS, false, forced ? false : true );
-
+#else
+ ic->Erase( anAIS, false );
+#endif
// Set visibility flag if necessary
// Temporarily commented to avoid awful dependecy on SALOMEDS
// TODO: better mechanism of storing display/erse status in a study
// erase an object
Handle(AIS_InteractiveObject) anIO = anIter.Value();
+#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( anIO, false, forced ? false : true );
+#else
+ ic->Erase( anIO, false );
+#endif
// Set visibility flag if necessary
// Temporarily commented to avoid awful dependecy on SALOMEDS
for ( unsigned int ind = 0; ind < List.size(); ind++ )
{
Handle(AIS_InteractiveObject) anAIS=List[ind];
- if(ic->IsDisplayed(anAIS)||ic->IsInCollector(anAIS))
+ if(ic->IsDisplayed(anAIS)
+#if OCC_VERSION_LARGE <= 0x06060000
+ || ic->IsInCollector(anAIS)
+#endif
+ )
{
prs->AddObject( anAIS );
}