31 auto const iter =
_labels.find(pt);
34 _labels.insert(std::make_pair(pt, Form(
"%s\n", label.c_str())));
38 label = Form(
"%s%s\n", (*iter).second.c_str(), label.c_str());
46 if (name.empty()) name = Form(
"Pt (%zu)",
_pt_v.size());
54 if (name.empty()) name = Form(
"AABox (%zu)",
_box_v.size());
62 if (name.empty()) name = Form(
"LSeg (%zu)",
_seg_v.size());
70 if (name.empty()) name = Form(
"Line (%zu)",
_lin_v.size());
78 if (trj.size() < 2)
throw GeoAlgoException(
"Trajectory size cannot be smaller than 2!");
79 if (name.empty()) name = Form(
"Trj (%zu)",
_trj_v.size());
89 if (name.empty()) name = Form(
"Cone (%zu)",
_cone_v.size());
97 if (name.empty()) name = Form(
"Sphere (%zu)",
_sphere_v.size());
std::vector< std::string > _pt_col
void _AddLabel_(const Point_t &pt, std::string label)
const Point_t & Start() const
Start getter.
std::vector< geoalgo::AABox_t > _box_v
std::vector< std::string > _cone_col
std::vector< geoalgo::Cone_t > _cone_v
Class def header for a class GeoAlgoException.
Representation of a simple 3D line segment Defines a finite 3D straight line by having the start and ...
std::vector< geoalgo::Sphere > _sphere_v
Representation of a 3D rectangular box which sides are aligned w/ coordinate axis. A representation of an Axis-Aligned-Boundary-Box, a simple & popular representation of 3D boundary box for collision detection. The concept was taken from the reference, Real-Time-Collision-Detection (RTCD), and in particular Ch. 4.2 (page 77): .
void Add(const Point_t &pt, std::string label="", std::string c="")
double Length() const
Length getter.
const Point_t & Min() const
Minimum point getter.
std::map< geoalgo::Point_t, std::string > _labels
std::vector< std::string > _trj_col
std::vector< std::string > _box_col
Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties: Start po...
std::vector< geoalgo::Trajectory_t > _trj_v
const Point_t & End() const
End getter.
std::vector< geoalgo::HalfLine_t > _lin_v
const Vector_t & Dir() const
Direction getter.
const Point_t & Center() const
Center getter.
std::vector< std::string > _lin_col
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
const Point_t & Max() const
Maximum point getter.
std::vector< std::string > _sphere_col
std::vector< std::string > _seg_col
std::vector< geoalgo::Point_t > _pt_v
std::vector< geoalgo::LineSegment_t > _seg_v
Class def header for a class GeoObjCollection.