@@ -78,7 +78,7 @@ namespace py = pybind11;
78
78
/* An edge of a triangle consisting of an triangle index in the range 0 to
79
79
* ntri-1 and an edge index in the range 0 to 2. Edge i goes from the
80
80
* triangle's point i to point (i+1)%3. */
81
- struct TriEdge
81
+ struct TriEdge final
82
82
{
83
83
TriEdge ();
84
84
TriEdge (int tri_, int edge_);
@@ -111,7 +111,7 @@ struct XY
111
111
};
112
112
113
113
// 3D point with x,y,z coordinates.
114
- struct XYZ
114
+ struct XYZ final
115
115
{
116
116
XYZ (const double & x_, const double & y_, const double & z_);
117
117
XYZ cross (const XYZ& other) const ;
@@ -123,7 +123,7 @@ struct XYZ
123
123
};
124
124
125
125
// 2D bounding box, which may be empty.
126
- class BoundingBox
126
+ class BoundingBox final
127
127
{
128
128
public:
129
129
BoundingBox ();
@@ -138,7 +138,7 @@ class BoundingBox
138
138
/* A single line of a contour, which may be a closed line loop or an open line
139
139
* strip. Identical adjacent points are avoided using push_back(), and a closed
140
140
* line loop should also not have identical first and last points. */
141
- class ContourLine : public std ::vector<XY>
141
+ class ContourLine final : public std::vector<XY>
142
142
{
143
143
public:
144
144
ContourLine ();
@@ -157,7 +157,7 @@ void write_contour(const Contour& contour);
157
157
158
158
/* Triangulation with npoints points and ntri triangles. Derived fields are
159
159
* calculated when they are first needed. */
160
- class Triangulation
160
+ class Triangulation final
161
161
{
162
162
public:
163
163
typedef py::array_t <double , py::array::c_style | py::array::forcecast> CoordinateArray;
@@ -254,7 +254,7 @@ class Triangulation
254
254
255
255
private:
256
256
// An edge of a triangulation, composed of start and end point indices.
257
- struct Edge
257
+ struct Edge final
258
258
{
259
259
Edge () : start(-1 ), end(-1 ) {}
260
260
Edge (int start_, int end_) : start(start_), end(end_) {}
@@ -267,7 +267,7 @@ class Triangulation
267
267
/* An edge of a boundary of a triangulation, composed of a boundary index
268
268
* and an edge index within that boundary. Used to index into the
269
269
* boundaries collection to obtain the corresponding TriEdge. */
270
- struct BoundaryEdge
270
+ struct BoundaryEdge final
271
271
{
272
272
BoundaryEdge () : boundary(-1 ), edge(-1 ) {}
273
273
BoundaryEdge (int boundary_, int edge_)
@@ -328,7 +328,7 @@ class Triangulation
328
328
329
329
330
330
// Contour generator for a triangulation.
331
- class TriContourGenerator
331
+ class TriContourGenerator final
332
332
{
333
333
public:
334
334
typedef Triangulation::CoordinateArray CoordinateArray;
@@ -508,7 +508,7 @@ class TriContourGenerator
508
508
* colinear points but only in the simplest of cases. No explicit testing of
509
509
* the validity of the triangulation is performed as this is a computationally
510
510
* more complex task than the trifinding itself. */
511
- class TrapezoidMapTriFinder
511
+ class TrapezoidMapTriFinder final
512
512
{
513
513
public:
514
514
typedef Triangulation::CoordinateArray CoordinateArray;
@@ -551,7 +551,7 @@ class TrapezoidMapTriFinder
551
551
/* A Point consists of x,y coordinates as well as the index of a triangle
552
552
* associated with the point, so that a search at this point's coordinates
553
553
* can return a valid triangle index. */
554
- struct Point : XY
554
+ struct Point final : XY
555
555
{
556
556
Point () : XY(), tri(-1 ) {}
557
557
Point (const double & x, const double & y) : XY(x,y), tri(-1 ) {}
@@ -565,7 +565,7 @@ class TrapezoidMapTriFinder
565
565
* the Edge which are used to map from trapezoid to triangle index. Also
566
566
* stores pointers to the 3rd points of the below and above triangles,
567
567
* which are only used to disambiguate triangles with colinear points. */
568
- struct Edge
568
+ struct Edge final
569
569
{
570
570
Edge (const Point * left_,
571
571
const Point * right_,
@@ -608,7 +608,7 @@ class TrapezoidMapTriFinder
608
608
class Node ; // Forward declaration.
609
609
610
610
// Helper structure used by TrapezoidMapTriFinder::get_tree_stats.
611
- struct NodeStats
611
+ struct NodeStats final
612
612
{
613
613
NodeStats ()
614
614
: node_count(0 ), trapezoid_count(0 ), max_parent_count(0 ),
@@ -632,7 +632,7 @@ class TrapezoidMapTriFinder
632
632
* The parent collection acts as a reference count to the number of times
633
633
* a Node occurs in the search tree. When the parent count is reduced to
634
634
* zero a Node can be safely deleted. */
635
- class Node
635
+ class Node final
636
636
{
637
637
public:
638
638
Node (const Point * point, Node* left, Node* right);// Type_XNode.
@@ -717,7 +717,7 @@ class TrapezoidMapTriFinder
717
717
* To obtain the index of the triangle corresponding to a particular
718
718
* Trapezoid, use the Edge member variables below.triangle_above or
719
719
* above.triangle_below. */
720
- struct Trapezoid
720
+ struct Trapezoid final
721
721
{
722
722
Trapezoid (const Point * left_,
723
723
const Point * right_,
0 commit comments