HYDROGUI_ListSelector.cxx
HYDROGUI_ZLayers.cxx
HYDROGUI_ZLayers2.cxx
+ HYDROGUI_ZLayers3.cxx
HYDROGUI_PriorityWidget.cxx
HYDROGUI_PriorityTableModel.cxx
)
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 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
typedef GEOM_SmartPtr<GEOM_ShadingFace> PSFaceSource;
class vtkRenderer;
+class vtkTextActor;
class vtkAppendPolyData;
typedef GEOM_SmartPtr<vtkAppendPolyData> PAppendFilter;
static GEOM_Actor* New();
void SetShape(const TopoDS_Shape& theShape,
- float theDeflection,
+ double theDeflection,
bool theIsVector = false);
- void SetDeflection(float theDeflection);
- float GetDeflection() const{ return myDeflection;}
+ void SetDeflection(double theDeflection);
+ double GetDeflection() const{ return myDeflection;}
void AddToRender(vtkRenderer* theRenderer);
void RemoveFromRender(vtkRenderer* theRenderer);
vtkProperty* GetShadingProperty();
vtkProperty* GetIsolatedEdgeProperty();
vtkProperty* GetVertexProperty();
+ vtkProperty* GetStandaloneVertexProperty();
vtkProperty* GetSharedEdgeProperty();
vtkProperty* GetFaceEdgeProperty();
- void setDeflection(double adef);
virtual void setDisplayMode(int thenewmode);
// Description:
const TopoDS_Shape& getTopo();
void setInputShape(const TopoDS_Shape& ashape, double adef1,
int imode, bool isVector = false);
- double getDeflection();
double isVector();
// SubShape
virtual
bool
GetVectorMode();
-
- void
- StoreIsoNumbers();
+ //! Vertices mode management
+ virtual
void
- RestoreIsoNumbers();
-
+ SetVerticesMode(const bool theMode);
+
+ virtual
+ bool
+ GetVerticesMode();
+
+ //! Name mode management
+ virtual
void
- ResetIsoNumbers();
+ SetNameMode(const bool theMode);
+
+ virtual
+ bool
+ GetNameMode();
protected:
void SetModified();
void GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result);
+ void SetShapeName(const TopoDS_Shape& theShape);
GEOM_Actor();
~GEOM_Actor();
private:
TopoDS_Shape myShape;
- int myNbIsos[2];
bool isOnlyVertex;
- float myDeflection;
+ double myDeflection;
bool myIsForced;
// EDisplayMode myDisplayMode;
bool myIsSelected;
bool myVectorMode;
+ bool myVerticesMode;
+ bool myNameMode;
-protected:
+public:
PDeviceActor myVertexActor;
PVertexSource myVertexSource;
+ PDeviceActor myStandaloneVertexActor;
+ PVertexSource myStandaloneVertexSource;
+
PDeviceActor myIsolatedEdgeActor;
PEdgeSource myIsolatedEdgeSource;
PDeviceActor myHighlightActor;
-private:
+ vtkTextActor* myTextActor;
+
vtkSmartPointer<vtkProperty> myHighlightProp;
vtkSmartPointer<vtkProperty> myPreHighlightProp;
vtkSmartPointer<vtkProperty> myShadingFaceProp;
vtkSmartPointer<vtkProperty> myShadingBackFaceProp;
PAppendFilter myAppendFilter;
-
-protected:
PPolyGeomPainterDataMapper myPolyDataMapper;
private:
GEOM_Actor(const GEOM_Actor&);
void operator=(const GEOM_Actor&);
+public:
double myEdgesInWireframeColor[3];
double myEdgesInShadingColor[3];
double myIsolatedEdgeColor[3];
// Purpose : Constructor
//=======================================================================
HYDROGUI_VTKPrs::HYDROGUI_VTKPrs( const Handle(HYDROData_Entity)& theObject )
-: myObject( theObject ),
+: SVTK_Prs( "" ),
+ myObject( theObject ),
myIsToUpdate( false )
{
// Define IO for actors to be added:
#include <SVTK_ViewModel.h>
#include <SVTK_ViewWindow.h>
#include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
+//#include <SALOME_ListIteratorOfListIO.hxx>
#include <SALOME_InteractiveObject.hxx>
#include <SUIT_ViewManager.h>
#include <SUIT_Accel.h>
SVTK_Viewer* aViewer = module()->getVTKViewer( theViewerId );
if( aViewer )
{
- aViewer->EraseAll( true );
+ aViewer->EraseAll( 0, true );
module()->removeViewVTKPrs( (size_t)aViewer );
EraseScalarBar( theViewerId );
}
#include <PrsMgr_ModedPresentation.hxx>
#include <TColStd_SequenceOfInteger.hxx>
-class PrsMgr_PresentationManager
+void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs, int theLayerId );
+
+void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
+ const int theMode, const int theLayerId )
{
-public:
- static void SetZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
- const Standard_Integer theMode,
- const Standard_Integer theLayerId )
+ PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
+ for (Standard_Integer aIdx = 1; aIdx <= aPresentations.Length (); aIdx++)
{
- PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
- for (Standard_Integer aIdx = 1; aIdx <= aPresentations.Length (); aIdx++)
+ Handle(PrsMgr_Presentation) aPrs = aPresentations (aIdx).Presentation ();
+ if ( aPresentations (aIdx).Mode() == theMode )
{
- Handle(PrsMgr_Presentation) aPrs = aPresentations (aIdx).Presentation ();
- if ( aPresentations (aIdx).Mode() == theMode )
- aPrs->SetZLayer (theLayerId);
+ SetZLayerForPrs( aPrs, theLayerId );
}
}
-};
-
-void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
- const int theMode, const int theLayerId )
-{
- PrsMgr_PresentationManager::SetZLayer( thePresentableObject, theMode, theLayerId );
}
void SetZLayerSettings( const Handle_V3d_Viewer& theViewer3d, int theLayerId, bool theIsOrdered )
--- /dev/null
+// Copyright (C) 2007-2013 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.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <PrsMgr_Presentation.hxx>
+
+class PrsMgr_PresentationManager
+{
+public:
+ static void SetZLayer( const Handle(PrsMgr_Presentation)& thePrs,
+ int theLayerId )
+ {
+ thePrs->SetZLayer( theLayerId );
+ }
+};
+
+void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs,
+ int theLayerId )
+{
+ PrsMgr_PresentationManager::SetZLayer( thePrs, theLayerId );
+}