1 // Copyright (C) 2010-2013 CEA/DEN, EDF R&D
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 #ifndef __vtkMedFamilyOnEntity_h_
21 #define __vtkMedFamilyOnEntity_h_
24 // This class represents the intersection between a family and an entity.
26 #include "vtkObject.h"
28 #include "vtkMedUtilities.h"
30 class vtkMedEntityArray;
33 class vtkMedFamilyOnEntityOnProfile;
36 class VTK_EXPORT vtkMedFamilyOnEntity : public vtkObject
39 static vtkMedFamilyOnEntity* New();
40 vtkTypeMacro(vtkMedFamilyOnEntity, vtkObject)
41 void PrintSelf(ostream& os, vtkIndent indent);
44 // This is the family of this family on entity.
45 virtual void SetFamily(vtkMedFamily*);
46 vtkGetObjectMacro(Family, vtkMedFamily);
49 // This is the entity array this family on entity is on.
50 virtual void SetEntityArray(vtkMedEntityArray*);
51 vtkGetObjectMacro(EntityArray, vtkMedEntityArray);
54 // This is the grid this family on entity is reffering to
55 virtual void SetParentGrid(vtkMedGrid*);
56 vtkGetObjectMacro(ParentGrid, vtkMedGrid);
59 // Returns vtkMedUtilities::OnPoint (0) or vtkMedUtilities::OnCell (1)
60 virtual int GetPointOrCell();
63 // Returns true if the family is on points or if the entity is MED_POINT1
64 // of if it is MED_BALL or MED_PARTICLE elements
65 virtual int GetVertexOnly();
68 // returns the entity descriptor associated with this family on entity
69 virtual vtkMedEntity GetEntity();
72 // Fields can use profile to be stored on a subset of entities.
73 // a priori, profiles and families are independent notions.
74 // In case there are profiles, we create the intersection of the profile and
75 // the FamilyOnEntity to be able to map the field on the geometry.
76 // BEFORE calling those function, you have to have assigned a profile
77 // to the vtkMedFamilyOnEntityOnProfile
78 void AddFamilyOnEntityOnProfile(vtkMedFamilyOnEntityOnProfile*);
79 int GetNumberOfFamilyOnEntityOnProfile();
80 vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(vtkMedProfile*);
81 vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(int index);
84 vtkMedFamilyOnEntity();
85 virtual ~vtkMedFamilyOnEntity();
88 vtkMedEntityArray* EntityArray;
89 vtkMedGrid* ParentGrid;
91 std::map<vtkMedProfile*, vtkSmartPointer<vtkMedFamilyOnEntityOnProfile> >
92 FamilyOnEntityOnProfile;
95 vtkMedFamilyOnEntity(const vtkMedFamilyOnEntity&); // Not implemented.
96 void operator=(const vtkMedFamilyOnEntity&); // Not implemented.
100 #endif //__vtkMedFamilyOnEntity_h_