-// Copyright (C) 2003 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2012 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
+//
+
+// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
// Module : VISU
-
+//
#ifndef VISU_PrsObject_i_HeaderFile
#define VISU_PrsObject_i_HeaderFile
-#include "VISU_Result_i.hh"
-//#include "VISU_Convertor.hxx"
-#include "Handle_SALOME_InteractiveObject.hxx"
-
-class VISU_Extractor;
-class VISU_FieldTransform;
-class VISU_ScalarBarActor;
-class VISU_LookupTable;
-class VISU_Actor;
-
-class vtkDataSetMapper;
-class vtkDataSet;
-class vtkProperty;
-
-class vtkPolyDataMapper;
-class vtkPolyData;
-class vtkGeometryFilter;
-
-class vtkWarpVector;
-class vtkContourFilter;
-class vtkAppendPolyData;
-
-class vtkGlyph3D;
-class vtkHedgeHog;
-class vtkPolyDataSource;
-class vtkStreamLine;
-
-namespace VISU{
- struct TField;
- //==============================================================================
- class PrsObject_i : public virtual POA_VISU::PrsObject,
- public virtual Storable
- {
- PrsObject_i(const PrsObject_i&);
-
- public:
- PrsObject_i(SALOMEDS::Study_ptr theStudy) :
- myStudy(SALOMEDS::Study::_duplicate(theStudy)) {};
- virtual ~PrsObject_i() {}
-
- protected:
- string myName;
- SALOMEDS::Study_var myStudy;
-
- public:
- virtual const char* GetName() const { return myName.c_str();}
- virtual void SetName( const char* theName );
- const SALOMEDS::Study_var& GetStudyDocument() const { return myStudy;}
- QString GetEntry();
- };
-
-
- //==============================================================================
- class Prs3d_i : public virtual POA_VISU::Prs3d,
- public virtual PrsObject_i
- {
- Prs3d_i();
- Prs3d_i(const Prs3d_i&);
- public:
- Prs3d_i(Result_i* theResult);
- virtual void SameAs(const Prs3d_i* theOrigin);
- virtual ~Prs3d_i();
- virtual void Destroy();
-
- typedef vtkPolyDataMapper MapperType;
- typedef vtkDataSet DataType;
-
- virtual SALOMEDS::Color GetColor() { return myColor;}
- virtual void SetColor(const SALOMEDS::Color& theColor);
-
- protected:
- Result_i* myResult;
- MapperType *myMapper;
- vtkGeometryFilter *myGeomFilter;
- float myBounds[6];
- struct SALOMEDS::Color myColor;
-
- bool myAddToStudy;
- bool CreateActor(VISU_Actor* theActor, const Handle(SALOME_InteractiveObject)& theIO = NULL);
-
- public:
- virtual void Update();
- virtual const char* GetComment() const = 0;
- virtual QString GenerateName() = 0;
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- virtual void ToStream(std::ostringstream& theStr);
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
- virtual void UpdateActor(VISU_Actor* theActor);
- MapperType* GetMapper() const { return myMapper;}
- Result_i* GetResult() const { return myResult; }
- };
-
-
- //==============================================================================
- class Mesh_i : public virtual POA_VISU::Mesh,
- public virtual Prs3d_i
- {
- static int myNbPresent;
- Mesh_i();
- Mesh_i(const Mesh_i&);
- public:
- Mesh_i(Result_i* theResult);
- virtual void SameAs(const Mesh_i* theOrigin);
- virtual ~Mesh_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TMESH;};
-
- virtual void SetCellColor(const SALOMEDS::Color& theColor) { SetColor(theColor);}
- virtual SALOMEDS::Color GetCellColor() { return GetColor();}
-
- virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;}
- virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;}
-
- virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;}
- virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;}
-
- virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;}
- virtual PresentationType GetPresentationType() { return myPresentType;}
-
- typedef VISU::Mesh InterfaceType;
- typedef vtkUnstructuredGridReader InputType;
-
- protected:
- Storable* Build(int theRestoring);
-
- InputType *myInput;
- VISU::VISUType myType;
- string myMeshName;
- int myEntity;
- string mySubMeshName;
- struct SALOMEDS::Color myNodeColor, myLinkColor;
- VISU::PresentationType myPresentType;
-
- public:
- virtual Storable* Create(const char* theMeshName, int theEntity);
- virtual Storable* Create(const char* theMeshName, int theEntity, const char* theFamilyName);
- virtual Storable* Create(const char* theMeshName, const char* theGroupName);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- virtual void ToStream(std::ostringstream& theStr);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
- virtual void UpdateActor(VISU_Actor* theActor);
- virtual InputType* GetInput() const { return myInput;}
- };
- Storable* MeshRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
- //==============================================================================
- class ScalarMap_i : public virtual POA_VISU::ScalarMap,
- public virtual Prs3d_i
- {
- static int myNbPresent;
- ScalarMap_i();
- ScalarMap_i(const ScalarMap_i&);
-
- public:
- ScalarMap_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const ScalarMap_i* theOrigin);
- virtual ~ScalarMap_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TSCALARMAP;};
-
- virtual void SetScalarMode(CORBA::Long theScalarMode);
- virtual CORBA::Long GetScalarMode() { return myScalarMode;}
-
- virtual void SetScaling(VISU::Scaling theScaling);
- virtual VISU::Scaling GetScaling();
-
- virtual void SetRange(CORBA::Double theMin, CORBA::Double theMax);
- virtual CORBA::Double GetMin() { return myScalarRange[0];}
- virtual CORBA::Double GetMax() { return myScalarRange[1];}
-
- virtual void SetOrientation(VISU::ScalarMap::Orientation theOrientation) {
- myOrientation = theOrientation;
- }
- virtual VISU::ScalarMap::Orientation GetOrientation() { return myOrientation;}
-
- virtual void SetPosition(CORBA::Double X, CORBA::Double Y) { myPosition[0] = X; myPosition[1] = Y;}
- virtual CORBA::Double GetPosX() { return myPosition[0];}
- virtual CORBA::Double GetPosY() { return myPosition[1];}
-
- virtual void SetSize(CORBA::Double theWidth, CORBA::Double theHeight) {
- myWidth = theWidth; myHeight = theHeight;
- }
- virtual CORBA::Double GetWidth() { return myWidth;}
- virtual CORBA::Double GetHeight() { return myHeight;}
-
- virtual void SetNbColors(CORBA::Long theNbColors) { myNumberOfColors = theNbColors;}
- virtual CORBA::Long GetNbColors() { return myNumberOfColors;}
-
- virtual void SetLabels(CORBA::Long theNbLabels) { myNumberOfLabels = theNbLabels;}
- virtual CORBA::Long GetLabels() { return myNumberOfLabels;}
-
- virtual void SetTitle(const char* theName) { myTitle = theName;}
- virtual char* GetTitle() { return CORBA::string_dup(myTitle.c_str());}
-
- virtual void CalculateRange();
- virtual void GetFieldRange(float theRange[2]);
- virtual bool isRangeFixed() { return myIsFixedRange; }
-
- virtual double GetIteration() { return myIteration; }
-
- typedef VISU::ScalarMap InterfaceType;
- typedef VISU_Extractor InputType;
-
- protected:
- Storable* Build(int theRestoring);
- virtual DataType* DoHook(int theRestoring);
-
- InputType *myInput;
-
- string myMeshName;
- int myEntity;
- string myFieldName;
- int myScalarMode;
- double myIteration;
- VISU_LookupTable *myMapperTable, *myBarTable;
- VISU_FieldTransform *myFieldTransform;
- const TField* myField;
-
- float myScalarRange[2];
- bool myIsFixedRange;
- bool myIsColored;
- VISU::Scaling myScaling;
- float myMapScale;
-
- string myTitle;
- VISU::ScalarMap::Orientation myOrientation;
- int myNumberOfColors, myNumberOfLabels;
- float myPosition[2], myWidth, myHeight;
-
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- InputType* GetInput() { return myInput;}
-
- const VISU::TField* GetField() const { return myField;}
- const string& GetFieldName() const { return myFieldName;}
- int GetScalarMode() const { return myScalarMode;}
- virtual void SetMapScale(double theMapScale = 1.0);
-
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
- virtual void UpdateActor(VISU_Actor* theActor);
- };
- Storable* ScalarMapRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
- //==============================================================================
- class DeformedShape_i : public virtual POA_VISU::DeformedShape,
- public virtual ScalarMap_i
- {
- static int myNbPresent;
- DeformedShape_i();
- DeformedShape_i(const DeformedShape_i&);
- public:
- DeformedShape_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const DeformedShape_i* theOrigin);
- virtual ~DeformedShape_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TDEFORMEDSHAPE;};
-
- virtual void SetScale(CORBA::Double theScale) { myFactor = theScale;}
- virtual CORBA::Double GetScale() { return myFactor;}
-
- typedef VISU::DeformedShape InterfaceType;
-
- virtual bool isColored() { return myIsColored; }
- virtual void setColored(bool theColor) { myIsColored = theColor; }
- virtual void SetColor(const SALOMEDS::Color& theColor);
-
- protected:
- virtual DataType* DoHook(int theRestoring);
- float myFactor;
- vtkWarpVector *myWarpVector;
-
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void Update();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- float ScaleFactor();
- virtual void SetMapScale(double theMapScale = 1.0);
-
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
- virtual void UpdateActor(VISU_Actor* theActor);
- };
- Storable* DeformedShapeRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
-
-
- //==============================================================================
- class CutPlanes_i : public virtual POA_VISU::CutPlanes,
- public virtual ScalarMap_i
- {
- static int myNbPresent;
- CutPlanes_i();
- CutPlanes_i(const CutPlanes_i&);
- public:
- CutPlanes_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const CutPlanes_i* theOrigin);
- virtual ~CutPlanes_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TCUTPLANES;};
-
- virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) {
- myBasePlane = theOrient;
- }
- virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane;}
+#include "VISUConfig.hh"
- virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement = theDisp;}
- virtual CORBA::Double GetDisplacement() { return myDisplacement;}
-
- virtual void SetNbPlanes(CORBA::Long theNb) { myNbPlanes = theNb;}
- virtual CORBA::Long GetNbPlanes() { return myNbPlanes;}
-
- virtual void SetRotateX(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateX();
- virtual void SetRotateY(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateY();
-
- typedef VISU::CutPlanes InterfaceType;
-
- protected:
- virtual DataType* DoHook(int theRestoring);
-
- int myNbPlanes;
- float myAng[3], myDisplacement;
- vtkAppendPolyData *myAppendPolyData;
- VISU::CutPlanes::Orientation myBasePlane;
-
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void Update();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- void SetPlane(int theId);
- };
- Storable* CutPlanesRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
-
- //==============================================================================
- class CutLines_i : public virtual POA_VISU::CutLines,
- public virtual ScalarMap_i
+namespace VISU
+{
+ //----------------------------------------------------------------------------
+ class VISU_I_EXPORT RemovableObject_i : public virtual POA_VISU::RemovableObject,
+ public virtual Storable
{
- static int myNbPresent;
- CutLines_i();
- CutLines_i(const CutPlanes_i&);
public:
- CutLines_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const CutLines_i* theOrigin);
- virtual ~CutLines_i();
- virtual void Destroy();
+ typedef Storable TSuperClass;
- virtual VISU::VISUType GetType() { return VISU::TCUTLINES;};
+ virtual
+ ~RemovableObject_i();
- virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) {
- myBasePlane[0] = theOrient;
- }
- virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane[0];}
+ SALOMEDS::Study_var
+ GetStudyDocument() const;
- virtual void SetOrientationType2(VISU::CutPlanes::Orientation theOrient) {
- myBasePlane[1] = theOrient;
- }
- virtual VISU::CutPlanes::Orientation GetOrientationType2() { return myBasePlane[1];}
+ SalomeApp_Study*
+ GetGUIStudy() const;
- virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement[0] = theDisp;}
- virtual CORBA::Double GetDisplacement() { return myDisplacement[0];}
- virtual void SetDisplacement2(CORBA::Double theDisp) { myDisplacement[1] = theDisp;}
- virtual CORBA::Double GetDisplacement2() { return myDisplacement[1];}
+ virtual
+ std::string
+ GetEntry();
- virtual void SetNbLines(CORBA::Long theNb) { myNbLines = theNb;}
- virtual CORBA::Long GetNbLines() { return myNbLines;}
-
- virtual void SetRotateX(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateX();
- virtual void SetRotateY(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateY();
+ virtual
+ std::string
+ GetName() const;
- virtual void SetRotateX2(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateX2();
- virtual void SetRotateY2(CORBA::Double theAngle);
- virtual CORBA::Double GetRotateY2();
-
- typedef VISU::CutLines InterfaceType;
+ virtual
+ void
+ SetName(const std::string& theName,
+ bool theIsUpdateStudyAttr);
protected:
- virtual DataType* DoHook(int theRestoring);
-
- int myNbLines;
- vtkAppendPolyData *myAppendPolyData;
- float myAng[2][3], myDisplacement[2];
- VISU::CutPlanes::Orientation myBasePlane[2];
- float myDirLn[3], myBoundPrjLn[3], myBasePnt[3];
-
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- void BuildTableOfReal(SALOMEDS::SObject_ptr theSObject);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void Update();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- };
- Storable* CutLinesRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
-
- //==============================================================================
- class IsoSurfaces_i : public virtual POA_VISU::IsoSurfaces,
- public virtual ScalarMap_i
- {
- static int myNbPresent;
- IsoSurfaces_i();
- IsoSurfaces_i(const IsoSurfaces_i&);
- public:
- IsoSurfaces_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const IsoSurfaces_i* theOrigin);
- virtual ~IsoSurfaces_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TISOSURFACE;};
-
- virtual void SetNbSurfaces(CORBA::Long theNb) { myNbSurface = theNb;}
- virtual CORBA::Long GetNbSurfaces() { return myNbSurface;}
-
- virtual void SetRange(float theMin, float theMax);
- virtual float GetRangeMin() { return myRange[0]; }
- virtual float GetRangeMax() { return myRange[1]; }
-
- typedef VISU::IsoSurfaces InterfaceType;
+ RemovableObject_i();
- protected:
- virtual DataType* DoHook(int theRestoring);
+ void
+ SetStudyDocument(SALOMEDS::Study_ptr theStudy);
- vtkContourFilter *myContourFilter;
- int myNbSurface;
- float myRange[2];
+ private:
+ std::string myName;
+ SalomeApp_Study* myGUIStudy;
+ SALOMEDS::Study_var myStudyDocument;
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void Update();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual void SetMapScale(double theMapScale = 1.0);
+ RemovableObject_i(const RemovableObject_i&);
};
- Storable* IsoSurfacesRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
- //==============================================================================
- class StreamLines_i : public virtual POA_VISU::StreamLines,
- public virtual DeformedShape_i
+ //----------------------------------------------------------------------------
+ class VISU_I_EXPORT PrsObject_i : public virtual POA_VISU::PrsObject,
+ public virtual RemovableObject_i
{
- static int myNbPresent;
- StreamLines_i();
- StreamLines_i(const StreamLines_i&);
- public:
- StreamLines_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const StreamLines_i* theOriginal);
- virtual ~StreamLines_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TSTREAMLINES;}
-
- typedef VISU::StreamLines InterfaceType;
-
- virtual void SetDirection(VISU::StreamLines::Direction theDirection)
- { myDirection = theDirection; }
- virtual VISU::StreamLines::Direction GetDirection() { return myDirection;}
-
- virtual void SetStepLength(CORBA::Double theStep) { myStepLength = theStep; }
- virtual CORBA::Double GetStepLength() { return myStepLength; }
-
- virtual void SetPropagationTime(CORBA::Double theTime) { myPropagationTime = theTime; }
- virtual CORBA::Double GetPropagationTime() { return myPropagationTime; }
-
- virtual void SetIntegrationStep(CORBA::Double theStep) { myIntegrationStep = theStep; }
- virtual CORBA::Double GetIntegrationStep() { return myIntegrationStep; }
-
- virtual void SetSource(VISU::Prs3d_ptr thePrs3d);
- virtual VISU::Prs3d_ptr GetSource();
-
- virtual void SetUsedPoints(CORBA::Double thePercents) { myPercents = thePercents; }
- virtual CORBA::Double GetUsedPoints() { return myPercents; }
-
- protected:
- virtual DataType* DoHook(int theRestoring);
- vtkStreamLine* myStream;
-
- VISU::StreamLines::Direction myDirection;
- float myStepLength;
- float myIntegrationStep;
- float myPropagationTime;
- string mySourceEntry;
- VISU::Prs3d_i* myPrs3di;
- float myPercents;
+ PrsObject_i(const PrsObject_i&);
public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
-
- virtual float GetMinIntegrationStep();
- virtual float GetMaxIntegrationStep();
- virtual float GetBasePropagationTime();
+ typedef RemovableObject_i TSuperClass;
- virtual void Update();
- virtual QString GetSourceEntry() { return QString(mySourceEntry.c_str()); }
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
+ PrsObject_i(SALOMEDS::Study_ptr theStudy = SALOMEDS::Study::_nil());
};
- Storable* StreamLinesRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
-
- //==============================================================================
- class Vectors_i : public virtual POA_VISU::Vectors,
- public virtual DeformedShape_i
- {
- static int myNbPresent;
- Vectors_i();
- Vectors_i(const Vectors_i&);
- public:
- Vectors_i(Result_i* theResult, bool theAddToStudy = true);
- virtual void SameAs(const Vectors_i* theOrigin);
- virtual ~Vectors_i();
- virtual void Destroy();
-
- virtual VISU::VISUType GetType() { return VISU::TVECTORS;};
-
- virtual void SetLineWidth(CORBA::Double theWidth) { myLineWidth = theWidth;}
- virtual CORBA::Double GetLineWidth() { return myLineWidth;}
-
- virtual void SetGlyphType(VISU::Vectors::GlyphType theType) { myTypeGlyph = theType;}
- virtual VISU::Vectors::GlyphType GetGlyphType() { return myTypeGlyph;}
-
- virtual void SetGlyphPos(VISU::Vectors::GlyphPos thePos) { myPosGlyph = thePos;}
- virtual VISU::Vectors::GlyphPos GetGlyphPos() { return myPosGlyph;}
-
- typedef VISU::Vectors InterfaceType;
-
- protected:
- virtual DataType* DoHook(int theRestoring);
-
- float myLineWidth;
- VISU::Vectors::GlyphType myTypeGlyph;
- VISU::Vectors::GlyphPos myPosGlyph;
- vtkGlyph3D *myGlyph;
- vtkHedgeHog *myHog;
-
- public:
- virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
- throw(std::logic_error&);
- static const string myComment;
- virtual const char* GetComment() const;
- virtual QString GenerateName();
- virtual void Update();
- virtual void ToStream(std::ostringstream& theStr);
- static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
- const char* theFieldName, double theIteration);
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
- virtual void UpdateActor(VISU_Actor* theActor);
- };
- Storable* VectorsRestore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
- //==============================================================================
}
-#endif
-
+#endif