EZC3D
Points.h
Go to the documentation of this file.
1 #ifndef POINTS_H
2 #define POINTS_H
3 
11 #include <Point.h>
12 
17  //---- CONSTRUCTORS ----//
18 public:
22  Points();
23 
28  Points(size_t nbPoints);
29 
30 
31  //---- STREAM ----//
32 public:
39  void print() const;
40 
47  void write(std::fstream &f) const;
48 
49 
50  //---- POINT ----//
51 protected:
52  std::vector<ezc3d::DataNS::Points3dNS::Point> _points;
53 public:
58  size_t nbPoints() const;
59 
67  const ezc3d::DataNS::Points3dNS::Point& point(size_t idx) const;
68 
80 
93  void point(const ezc3d::DataNS::Points3dNS::Point& point, size_t idx = SIZE_MAX);
94 
99  const std::vector<ezc3d::DataNS::Points3dNS::Point>& points() const;
100 
105  bool isempty() const;
106 };
107 
108 #endif
const std::vector< ezc3d::DataNS::Points3dNS::Point > & points() const
Get all the points from the 3D points data.
Definition: Points.cpp:75
std::vector< ezc3d::DataNS::Points3dNS::Point > _points
Holder of the 3D points.
Definition: Points.h:52
ezc3d::DataNS::Points3dNS::Point & point_nonConst(size_t idx)
Get a particular point of index idx from the 3D points data in order to be modified by the caller...
Definition: Points.cpp:52
Points holder for C3D data 3D points data.
Definition: Points.h:16
void write(std::fstream &f) const
Write points to an opened file.
Definition: Points.cpp:29
void print() const
Print the points.
Definition: Points.cpp:23
Declaration of Point class.
size_t nbPoints() const
Get the number of points.
Definition: Points.cpp:35
Points()
Create an empty holder for 3D points.
Definition: Points.cpp:13
Namespace ezc3d.
Definition: ezc3d.h:68
bool isempty() const
Return if the points are empty.
Definition: Points.cpp:80
const ezc3d::DataNS::Points3dNS::Point & point(size_t idx) const
Get a particular point of index idx from the 3D points data.
Definition: Points.cpp:40