if ( !myPreviewPlane.IsNull() && ic->IsDisplayed( myPreviewPlane ) )
{
+#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( myPreviewPlane, false, false );
+#else
+ ic->Erase( myPreviewPlane, false );
+#endif
ic->Remove( myPreviewPlane, false );
myPreviewPlane.Nullify();
}
#include <Visual3d_View.hxx>
-#include <Basics_OCCTVersion.hxx>
// VSR: Uncomment below line to allow texture background support in OCC viewer
#define OCC_ENABLE_TEXTURED_BACKGROUND
// init CasCade viewers
myV3dViewer = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Viewer3d").ToExtString() );
myV3dViewer->Init();
+
+#if OCC_VERSION_LARGE <= 0x06060000 // Porting to OCCT higher 6.6.0 version
myV3dCollector = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Collector3d").ToExtString() );
myV3dCollector->Init();
+#endif
// init selector
+#if OCC_VERSION_LARGE <= 0x06060000
myAISContext = new AIS_InteractiveContext( myV3dViewer, myV3dCollector );
-
+#else
+ myAISContext = new AIS_InteractiveContext( myV3dViewer );
+#endif
myAISContext->SelectionColor( Quantity_NOC_WHITE );
// display isoline on planar faces (box for ex.)
{
myAISContext.Nullify();
myV3dViewer.Nullify();
+#if OCC_VERSION_LARGE <= 0x06060000
myV3dCollector.Nullify();
+#endif
}
/*!
AIS_ListOfInteractive List;
myAISContext->DisplayedObjects(List);
+#if OCC_VERSION_LARGE <= 0x06060000
if( !onlyInViewer )
{
AIS_ListOfInteractive List1;
myAISContext->ObjectsInCollector(List1);
List.Append(List1);
}
+#endif
AIS_ListIteratorOfListOfInteractive ite(List);
for ( ; ite.More(); ite.Next() )
#include <V3d_View.hxx>
#include <AIS_Trihedron.hxx>
#include <AIS_InteractiveContext.hxx>
+#include <Basics_OCCTVersion.hxx>
class QKeyEvent;
class QMouseEvent;
public:
Handle(V3d_Viewer) getViewer3d() const { return myV3dViewer;}
+#if OCC_VERSION_LARGE <= 0x06060000
Handle(V3d_Viewer) getCollector3d() const { return myV3dCollector; }
+#endif
Handle(AIS_InteractiveContext) getAISContext() const { return myAISContext; }
Handle(AIS_Trihedron) getTrihedron() const { return myTrihedron; }
protected:
Handle(V3d_Viewer) myV3dViewer;
+
+#if OCC_VERSION_LARGE <= 0x06060000
Handle(V3d_Viewer) myV3dCollector;
+#endif
+
Handle(AIS_Trihedron) myTrihedron;
Handle(AIS_InteractiveContext) myAISContext;
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) ) )
{
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 );
}