1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // VISU OBJECT : interactive object for VISU entities implementation
21 // File: VISU_MergedPL.cxx
22 // Author: Alexey PETROV
25 #include "VISU_MergedPL.hxx"
26 #include "VISU_PipeLine.hxx"
29 //----------------------------------------------------------------------------
32 ::DoShallowCopy(VISU_PipeLine *thePipeLine,
35 if(VISU_MergedPL *aPipeLine = dynamic_cast<VISU_MergedPL*>(thePipeLine)){
36 if ( this == aPipeLine )
39 if ( aPipeLine->IsExternalGeometryUsed() ) {
41 int aNbOfGeometry = aPipeLine->GetNumberOfGeometry();
42 for ( int aGeomNumber = 0; aGeomNumber < aNbOfGeometry; aGeomNumber++ ) {
43 VISU::TName aGeomName;
44 AddGeometry( aPipeLine->GetGeometry( aGeomNumber, aGeomName ), aGeomName );
51 //----------------------------------------------------------------------------
54 ::AddGeometryName(const VISU::TName& theGeomName)
56 myGeometryNames.push_back( theGeomName );
59 //----------------------------------------------------------------------------
62 ::GetGeometryName( int theGeomNumber ) const
64 if( theGeomNumber < myGeometryNames.size() )
65 return myGeometryNames[ theGeomNumber ];
69 //----------------------------------------------------------------------------
72 ::GetGeometryNames() const
74 return myGeometryNames;
77 //----------------------------------------------------------------------------
80 ::ClearGeometryNames()
82 myGeometryNames.clear();