vtkbone
vtkboneConstraint.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright 2010-2016, Numerics88 Solutions Ltd.
4  http://www.numerics88.com/
5 
6  Copyright (c) Eric Nodwell and Steven K. Boyd
7  See Copyright.txt for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 =========================================================================*/
13 
121 #ifndef __vtkboneConstraint_h
122 #define __vtkboneConstraint_h
123 
124 #include "vtkObject.h"
125 #include "vtkIdTypeArray.h"
126 #include "vtkboneWin32Header.h"
127 
128 // Forward declarations
129 class vtkIdTypeArray;
131 class vtkDataArray;
132 
134 {
135 public:
136  static vtkboneConstraint* New();
137  vtkTypeMacro(vtkboneConstraint, vtkObject);
138  void PrintSelf(ostream& os, vtkIndent indent);
139 
140  void Initialize();
141 
145  NUMBER_OF_ConstraintAppliedTo
146  };
147 
151  NUMBER_OF_ConstraintType
152  };
153 
155  SENSE_X = 0,
156  SENSE_Y = 1,
157  SENSE_Z = 2
158  };
159 
168  NUMBER_OF_Distribution
169  };
170 
172  static const char* GetConstraintAppliedToAsString(int ConstraintAppliedTo);
173 
175  static const char* GetConstraintTypeAsString(int ConstraintType);
176 
178  static const char* GetDistributionAsString(int Distribution);
179 
181 
182  vtkSetStringMacro(Name);
183  vtkGetStringMacro(Name);
185 
187 
188  vtkSetObjectMacro(Indices, vtkIdTypeArray);
189  vtkGetObjectMacro(Indices, vtkIdTypeArray);
191 
193  unsigned long int GetMTime();
194 
196 
197  vtkSetClampMacro(ConstraintAppliedTo,
198  int, 0, NUMBER_OF_ConstraintAppliedTo);
199  vtkGetMacro(ConstraintAppliedTo, int);
201 
203 
204  vtkSetClampMacro(ConstraintType,
205  int, 0, NUMBER_OF_ConstraintType);
206  vtkGetMacro(ConstraintType, int);
208 
210 
212  {return this->GetIndices()->GetNumberOfTuples();}
214 
216 
220  virtual void RemoveValue(vtkIdType id);
221  virtual void RemoveLastValue();
223 
225  vtkDataSetAttributes *GetAttributes() {return this->Attributes;};
226 
232  virtual int CheckAttributes();
233 
236  virtual int Merge(vtkboneConstraint* other);
237 
239 
243  virtual void ShallowCopy(vtkboneConstraint *constraint);
244  virtual void DeepCopy(vtkboneConstraint *constraint);
246 
247 protected:
250 
251  char* Name;
252  vtkIdTypeArray* Indices; // node or element set
253  vtkDataSetAttributes* Attributes; // Scalars, vectors, etc. associated w/ each point
254 
257 
258 private:
259  vtkboneConstraint(const vtkboneConstraint&); // Not implemented.
260  void operator=(const vtkboneConstraint&); // Not implemented.
261 };
262 
263 #endif
264 
#define VTKBONE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
vtkDataSetAttributes * GetAttributes()
int vtkIdType
a constraint for a finite element mesh
virtual vtkIdType GetNumberOfValues()
vtkDataSetAttributes * Attributes
virtual vtkMTimeType GetMTime()
vtkIdTypeArray * Indices
static vtkObject * New()
void operator=(const vtkObjectBase &)