1 #define EZC3D_API_EXPORTS 20 _points.resize(nbPoints);
25 for (
size_t i = 0; i < nbPoints(); ++i)
31 for (
size_t i = 0; i < nbPoints(); ++i)
37 return _points.size();
43 return _points.at(idx);
44 }
catch(std::out_of_range) {
45 throw std::out_of_range(
"Points::point method is trying to access the point " 46 + std::to_string(idx) +
47 " while the maximum number of points is " 48 + std::to_string(nbPoints()) +
".");
55 return _points.at(idx);
56 }
catch(std::out_of_range) {
57 throw std::out_of_range(
"Points::point method is trying to access the point " 58 + std::to_string(idx) +
59 " while the maximum number of points is " 60 + std::to_string(nbPoints()) +
".");
67 _points.push_back(point);
69 if (idx >= nbPoints())
70 _points.resize(idx+1);
82 for (
Point point : points())
const std::vector< ezc3d::DataNS::Points3dNS::Point > & points() const
Get all the points from the 3D points data.
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...
Declaration of Points class.
void write(std::fstream &f) const
Write points to an opened file.
void print() const
Print the points.
size_t nbPoints() const
Get the number of points.
Points()
Create an empty holder for 3D points.
bool isempty() const
Return if the points are empty.
const ezc3d::DataNS::Points3dNS::Point & point(size_t idx) const
Get a particular point of index idx from the 3D points data.