ivutils
|
VecContour<2>
is a class - a set of 2D points that describes a 2D contour.
Important members and methods of the class:
self.GetNPoints()
- the number of points in the contourself.SetPoint(int i, Vector_2 vec)
- adding a vec point to the ith place in the contourself.add(Vector_2)
- adding a vec point to the end of the contour.self.getPoint(int indx)
- returns the nearest point in the contour.Example:
Vector_2 value(0,0); VecContour<2> cnt1(10), cnt2(10); for (int i=0; i < cnt2.GetNPoints(); i++, value[1]++) cnt2.SetPoint(i, value); cnt2.add(Vector_2(0,10)); cnt2.add(Vector_2(0,11)); VecContour<2>::point_iterator it=cnt1.points_begin(),end=cnt1.points_end();
VecContour<3>
is a class - a set of 3D points that describes a 3D contour.
Important members and methods of the class:
self.GetNPoints()
- the number of points in the contourself.SetPoint(int i, Vector_3 vec)
- adding a vec point to the ith place in the contourself.add(Vector_3)
- adding a vec point to the end of the contour.self.getPoint(int indx)
- returns the nearest point in the contour.Example:
Vector_3 value(0,0); VecContour<3> cnt1(10), cnt2(10); for (int i=0; i < cnt3.GetNPoints(); i++, value[1]++) cnt2.SetPoint(i, value); cnt2.add(Vector_3(0,10)); cnt2.add(Vector_3(0,11)); VecContour<3>::point_iterator it=cnt1.points_begin(),end=cnt1.points_end();