Back to index

salome-paravis  6.5.0
vtkMedFamilyOnEntity.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __vtkMedFamilyOnEntity_h_
00021 #define __vtkMedFamilyOnEntity_h_
00022 
00023 // Description :
00024 // This class represents the intersection between a family and an entity.
00025 
00026 #include "vtkObject.h"
00027 #include "vtkMed.h"
00028 #include "vtkMedUtilities.h"
00029 
00030 class vtkMedEntityArray;
00031 class vtkMedFamily;
00032 class vtkMedGrid;
00033 class vtkMedFamilyOnEntityOnProfile;
00034 class vtkMedIntArray;
00035 
00036 class VTK_EXPORT vtkMedFamilyOnEntity : public vtkObject
00037 {
00038 public :
00039   static vtkMedFamilyOnEntity* New();
00040   vtkTypeRevisionMacro(vtkMedFamilyOnEntity, vtkObject)
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00043   // Description:
00044   // This is the family of this family on entity.
00045   virtual void  SetFamily(vtkMedFamily*);
00046   vtkGetObjectMacro(Family, vtkMedFamily);
00047 
00048   // Description:
00049   // This is the entity array this family on entity is on.
00050   virtual void  SetEntityArray(vtkMedEntityArray*);
00051   vtkGetObjectMacro(EntityArray, vtkMedEntityArray);
00052 
00053   // Description:
00054   // This is the grid this family on entity is reffering to
00055   virtual void  SetParentGrid(vtkMedGrid*);
00056   vtkGetObjectMacro(ParentGrid, vtkMedGrid);
00057 
00058   // Description :
00059   //  Returns vtkMedUtilities::OnPoint (0) or vtkMedUtilities::OnCell (1)
00060   virtual int  GetPointOrCell();
00061 
00062   // Description :
00063   // Returns true if the family is on points or if the entity is MED_POINT1
00064   // of if it is MED_BALL or MED_PARTICLE elements
00065   virtual int  GetVertexOnly();
00066 
00067   // Description:
00068   // returns the entity descriptor associated with this family on entity
00069   virtual vtkMedEntity GetEntity();
00070 
00071   // Description:
00072   // Fields can use profile to be stored on a subset of entities.
00073   // a priori, profiles and families are independent notions.
00074   // In case there are profiles, we create the intersection of the profile and
00075   // the FamilyOnEntity to be able to map the field on the geometry.
00076   // BEFORE calling those function, you have to have assigned a profile
00077   // to the vtkMedFamilyOnEntityOnProfile
00078   void  AddFamilyOnEntityOnProfile(vtkMedFamilyOnEntityOnProfile*);
00079   int GetNumberOfFamilyOnEntityOnProfile();
00080   vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(vtkMedProfile*);
00081   vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(int index);
00082 
00083 protected:
00084   vtkMedFamilyOnEntity();
00085   virtual ~vtkMedFamilyOnEntity();
00086 
00087   vtkMedFamily* Family;
00088   vtkMedEntityArray* EntityArray;
00089   vtkMedGrid* ParentGrid;
00090 
00091   std::map<vtkMedProfile*, vtkSmartPointer<vtkMedFamilyOnEntityOnProfile> >
00092       FamilyOnEntityOnProfile;
00093 
00094 private:
00095   vtkMedFamilyOnEntity(const vtkMedFamilyOnEntity&); // Not implemented.
00096   void operator=(const vtkMedFamilyOnEntity&); // Not implemented.
00097 
00098 };
00099 
00100 #endif //__vtkMedFamilyOnEntity_h_