18 #ifndef __itkTriangleCell_h
19 #define __itkTriangleCell_h
44 template<
typename TCellInterface >
66 itkStaticConstMacro(NumberOfPoints,
unsigned int, 3);
67 itkStaticConstMacro(NumberOfVertices,
unsigned int, 3);
68 itkStaticConstMacro(NumberOfEdges,
unsigned int, 3);
69 itkStaticConstMacro(CellDimension,
unsigned int, 2);
73 virtual CellGeometry GetType(
void)
const
74 {
return Superclass::TRIANGLE_CELL; }
75 virtual void MakeCopy(CellAutoPointer &)
const;
78 virtual unsigned int GetDimension(
void)
const;
80 virtual unsigned int GetNumberOfPoints(
void)
const;
82 virtual CellFeatureCount GetNumberOfBoundaryFeatures(
int dimension)
const;
84 virtual bool GetBoundaryFeature(
int dimension, CellFeatureIdentifier,
86 virtual void SetPointIds(PointIdConstIterator first);
88 virtual void SetPointIds(PointIdConstIterator first,
89 PointIdConstIterator last);
91 virtual void SetPointId(
int localId, PointIdentifier);
92 virtual PointIdIterator PointIdsBegin(
void);
94 virtual PointIdConstIterator PointIdsBegin(
void)
const;
96 virtual PointIdIterator PointIdsEnd(
void);
98 virtual PointIdConstIterator PointIdsEnd(
void)
const;
101 virtual CellFeatureCount GetNumberOfVertices(
void)
const;
103 virtual CellFeatureCount GetNumberOfEdges(
void)
const;
105 virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
106 virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
108 virtual bool EvaluatePosition(CoordRepType *,
113 InterpolationWeightType *);
119 CoordRepType ComputeArea(PointsContainer *);
121 PointType ComputeBarycenter(CoordRepType *,
124 PointType ComputeCenterOfGravity(PointsContainer *);
126 PointType ComputeCircumCenter(PointsContainer *);
130 m_PointIds( NumberOfPoints,
NumericTraits< PointIdentifier >::max() )
140 void operator=(
const Self &);
144 double DistanceToLine(PointType x, PointType p1, PointType p2,
145 double & t, CoordRepType *closestPoint);
147 double DistanceToLine(PointType x, PointType p1, PointType p2,
148 double & t, PointType & closestPoint);
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkTriangleCell.hxx"