+QString HYDROGUI_OCCDisplayer::GetType() const
+{
+ return OCCViewer_Viewer::Type();
+}
+
+bool HYDROGUI_OCCDisplayer::Display( const Handle(HYDROData_Entity)& theObject,
+ const OCCViewer_Viewer* theViewer,
+ const bool theIsForced )
+{
+ bool aRes = false;
+
+ if ( theObject.IsNull() || theObject->IsRemoved() || !theViewer ) {
+ return aRes;
+ }
+
+ // Get interactive context
+ Handle(AIS_InteractiveContext) aCtx = theViewer->getAISContext();
+ if( aCtx.IsNull() ) {
+ return aRes;
+ }
+
+ // Viewer id
+ size_t aViewerId = (size_t)theViewer;
+
+ // Object shape
+ HYDROGUI_Shape* anObjShape = module()->getObjectShape( aViewerId, theObject );
+ // create if needed
+ if ( !anObjShape ) {
+ anObjShape = createShape( aViewerId, aCtx, theObject );
+ if ( anObjShape ) {
+ anObjShape->setIsToUpdate( true );
+ }
+ }
+
+ // Process the shape
+ if ( anObjShape ) {
+ // update if needed
+ if ( anObjShape->getIsToUpdate() || theIsForced ) {
+ anObjShape->update( false );
+ }
+
+ // Set visibility
+ bool anIsVisible = module()->isObjectVisible( aViewerId, theObject );
+ anObjShape->setVisible( anIsVisible, false );
+
+ aRes = true;
+ }
+
+ return aRes;
+}
+
+void HYDROGUI_OCCDisplayer::SetZLayer( const OCCViewer_Viewer* theViewer,
+ const Handle(HYDROData_Entity)& theObject,
+ const int theZLayerId )
+{
+ if ( !theViewer || ( theZLayerId < 0 ) ) {
+ return;
+ }
+
+ // Get interactive context
+ Handle(AIS_InteractiveContext) aCtx = theViewer->getAISContext();
+ if( aCtx.IsNull() ) {
+ return;
+ }