Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISU_I / VISU_Vectors_i.hh
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  VISU OBJECT : interactive object for VISU entities implementation
24 //  File   : VISU_PrsObject_i.hxx
25 //  Author : Alexey PETROV
26 //  Module : VISU
27 //
28 #ifndef VISU_Vectors_i_HeaderFile
29 #define VISU_Vectors_i_HeaderFile
30
31 #include "VISU_DeformedShape_i.hh"
32
33 class VISU_VectorsPL;
34
35 namespace VISU
36 {
37   //----------------------------------------------------------------------------
38   class VISU_I_EXPORT Vectors_i : public virtual POA_VISU::Vectors,
39                                   public virtual DeformedShape_i
40   {
41     static int myNbPresent;
42     Vectors_i(const Vectors_i&);
43
44   public:
45     //----------------------------------------------------------------------------
46     typedef DeformedShape_i TSuperClass;
47     typedef VISU::Vectors TInterface;
48
49     explicit
50     Vectors_i(EPublishInStudyMode thePublishInStudyModep);
51
52     virtual
53     void
54     SameAs(const Prs3d_i* theOrigin);
55
56     virtual
57     ~Vectors_i();
58
59     virtual
60     VISU::VISUType 
61     GetType() 
62     { 
63       return VISU::TVECTORS;
64     }
65
66     virtual
67     void 
68     SetLineWidth(CORBA::Double theWidth);
69
70     virtual
71     CORBA::Double
72     GetLineWidth();
73
74     virtual 
75     void 
76     SetGlyphType(VISU::Vectors::GlyphType theType);
77
78     virtual
79     VISU::Vectors::GlyphType 
80     GetGlyphType();
81
82     virtual 
83     void 
84     SetGlyphPos(VISU::Vectors::GlyphPos thePos);
85
86     virtual 
87     VISU::Vectors::GlyphPos 
88     GetGlyphPos();
89
90     VISU_VectorsPL* 
91     GetSpecificPL() const
92     { 
93       return myVectorsPL; 
94     }
95     
96   protected:
97     //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
98     virtual
99     void
100     CreatePipeLine(VISU_PipeLine* thePipeLine);
101
102     //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
103     virtual 
104     bool 
105     CheckIsPossible();
106
107     virtual
108     VISU_PipeLine* 
109     GetActorPipeLine();
110
111     VISU_VectorsPL *myVectorsPL;
112     float myLineWidth;
113
114   public:
115     //! Redefines VISU_ColoredPrs3d_i::IsPossible
116     static 
117     size_t 
118     IsPossible(Result_i* theResult, 
119                const std::string& theMeshName, 
120                VISU::Entity theEntity,
121                const std::string& theFieldName, 
122                CORBA::Long theTimeStampNumber,
123                bool theIsMemoryCheck);
124
125     //! Redefines VISU_ColoredPrs3d_i::Create
126     virtual
127     Storable* 
128     Create(const std::string& theMeshName, 
129            VISU::Entity theEntity,
130            const std::string& theFieldName, 
131            CORBA::Long theTimeStampNumber);
132
133     //! Redefines VISU_ColoredPrs3d_i::ToStream
134     virtual
135     void
136     ToStream(std::ostringstream& theStr);
137
138     //! Redefines VISU_ColoredPrs3d_i::Restore
139     virtual
140     Storable* 
141     Restore(SALOMEDS::SObject_ptr theSObject,
142             const Storable::TRestoringMap& theMap);
143
144     static const std::string myComment;
145
146     //! Redefines VISU_ColoredPrs3d_i::GetComment
147     virtual
148     const char* 
149     GetComment() const;
150
151     //! Redefines VISU_ColoredPrs3d_i::GenerateName
152     virtual
153     QString
154     GenerateName();
155
156     virtual
157     const char* 
158     GetIconName();
159
160     //! Redefines VISU_ColoredPrs3d_i::CreateActor
161     virtual
162     VISU_Actor* 
163     CreateActor();
164
165     //! Redefines VISU_ColoredPrs3d_i::UpdateActor
166     virtual
167     void
168     UpdateActor(VISU_ActorBase* theActor) ;
169   };
170 }
171
172 #endif