Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geoalgo::GeoObjCollection Class Reference

#include <GeoObjCollection.h>

Public Member Functions

void Clear ()
 
void Add (const Point_t &pt, std::string label="", std::string c="")
 
void Add (const AABox_t &box, std::string label="", std::string c="")
 
void Add (const LineSegment_t &seg, std::string label="", std::string c="")
 
void Add (const HalfLine_t &seg, std::string label="", std::string c="")
 
void Add (const Trajectory_t &trj, std::string label="", std::string c="")
 
void Add (const Cone_t &cone, std::string label="", std::string c="")
 
void Add (const Sphere_t &sphere, std::string label="", std::string c="")
 
const std::vector< geoalgo::Point_t > & Point () const
 
const std::vector< std::string > & PointColor () const
 
const std::vector< geoalgo::AABox_t > & AABox () const
 
const std::vector< std::string > & AABoxColor () const
 
const std::vector< geoalgo::LineSegment_t > & LineSegment () const
 
const std::vector< std::string > & LineSegmentColor () const
 
const std::vector< geoalgo::HalfLine_t > & HalfLine () const
 
const std::vector< std::string > & HalfLineColor () const
 
const std::vector< geoalgo::Trajectory_t > & Trajectory () const
 
const std::vector< std::string > & TrajectoryColor () const
 
const std::vector< geoalgo::Cone_t > & Cone () const
 
const std::vector< std::string > & ConeColor () const
 
const std::vector< geoalgo::Sphere_t > & Sphere () const
 
const std::vector< std::string > & SphereColor () const
 
const std::map< geoalgo::Point_t, std::string > & Labels () const
 

Protected Member Functions

const Point_t_Point_ (size_t i) const
 
const AABox_t_AABox_ (size_t i) const
 
const LineSegment_t_LineSegment_ (size_t i) const
 
const Trajectory_t_Trajectory_ (size_t i) const
 
const Cone_t_Cone_ (size_t i) const
 
const Sphere_t_Sphere_ (size_t i) const
 
void _AddLabel_ (const Point_t &pt, std::string label)
 

Protected Attributes

std::vector< geoalgo::Point_t_pt_v
 
std::vector< std::string_pt_col
 
std::vector< geoalgo::AABox_t_box_v
 
std::vector< std::string_box_col
 
std::vector< geoalgo::LineSegment_t_seg_v
 
std::vector< std::string_seg_col
 
std::vector< geoalgo::HalfLine_t_lin_v
 
std::vector< std::string_lin_col
 
std::vector< geoalgo::Trajectory_t_trj_v
 
std::vector< std::string_trj_col
 
std::vector< geoalgo::Cone_t_cone_v
 
std::vector< std::string_cone_col
 
std::vector< geoalgo::Sphere_sphere_v
 
std::vector< std::string_sphere_col
 
std::map< geoalgo::Point_t, std::string_labels
 

Detailed Description

Definition at line 35 of file GeoObjCollection.h.

Member Function Documentation

const AABox_t& geoalgo::GeoObjCollection::_AABox_ ( size_t  i) const
inlineprotected

Definition at line 83 of file GeoObjCollection.h.

84  { return _box_v[i]; }
std::vector< geoalgo::AABox_t > _box_v
void geoalgo::GeoObjCollection::_AddLabel_ ( const Point_t pt,
std::string  label 
)
protected

Definition at line 29 of file GeoObjCollection.cxx.

30  {
31  auto const iter = _labels.find(pt);
32  if(iter==_labels.end())
33 
34  _labels.insert(std::make_pair(pt,Form("%s\n",label.c_str())));
35 
36  else {
37 
38  label = Form("%s%s\n",(*iter).second.c_str(),label.c_str());
39 
40  _labels[pt] = label;
41  }
42  }
std::map< geoalgo::Point_t, std::string > _labels
const Cone_t& geoalgo::GeoObjCollection::_Cone_ ( size_t  i) const
inlineprotected

Definition at line 92 of file GeoObjCollection.h.

93  { return _cone_v[i]; }
std::vector< geoalgo::Cone_t > _cone_v
const LineSegment_t& geoalgo::GeoObjCollection::_LineSegment_ ( size_t  i) const
inlineprotected

Definition at line 86 of file GeoObjCollection.h.

87  { return _seg_v[i]; }
std::vector< geoalgo::LineSegment_t > _seg_v
const Point_t& geoalgo::GeoObjCollection::_Point_ ( size_t  i) const
inlineprotected

Definition at line 80 of file GeoObjCollection.h.

81  { return _pt_v[i]; }
std::vector< geoalgo::Point_t > _pt_v
const Sphere_t& geoalgo::GeoObjCollection::_Sphere_ ( size_t  i) const
inlineprotected

Definition at line 95 of file GeoObjCollection.h.

96  { return _sphere_v[i]; }
std::vector< geoalgo::Sphere > _sphere_v
const Trajectory_t& geoalgo::GeoObjCollection::_Trajectory_ ( size_t  i) const
inlineprotected

Definition at line 89 of file GeoObjCollection.h.

90  { return _trj_v[i]; }
std::vector< geoalgo::Trajectory_t > _trj_v
const std::vector< geoalgo::AABox_t >& geoalgo::GeoObjCollection::AABox ( ) const
inline

Definition at line 58 of file GeoObjCollection.h.

58 { return _box_v; }
std::vector< geoalgo::AABox_t > _box_v
const std::vector< std::string >& geoalgo::GeoObjCollection::AABoxColor ( ) const
inline

Definition at line 59 of file GeoObjCollection.h.

59 { return _box_col; }
std::vector< std::string > _box_col
void geoalgo::GeoObjCollection::Add ( const Point_t pt,
std::string  label = "",
std::string  c = "" 
)

Definition at line 44 of file GeoObjCollection.cxx.

45  {
46  if(name.empty()) name = Form("Pt (%zu)",_pt_v.size());
47  _AddLabel_(pt,name);
48  _pt_v.push_back(pt);
49  _pt_col.push_back(c);
50  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< geoalgo::Point_t > _pt_v
std::vector< std::string > _pt_col
void geoalgo::GeoObjCollection::Add ( const AABox_t box,
std::string  label = "",
std::string  c = "" 
)

Definition at line 52 of file GeoObjCollection.cxx.

53  {
54  if(name.empty()) name = Form("AABox (%zu)",_box_v.size());
55  _AddLabel_(box.Min() + (box.Max() - box.Min())/2.,name);
56  _box_v.push_back(box);
57  _box_col.push_back(c);
58  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< std::string > _box_col
std::vector< geoalgo::AABox_t > _box_v
void geoalgo::GeoObjCollection::Add ( const LineSegment_t seg,
std::string  label = "",
std::string  c = "" 
)

Definition at line 60 of file GeoObjCollection.cxx.

61  {
62  if(name.empty()) name = Form("LSeg (%zu)",_seg_v.size());
63  _AddLabel_(seg.End(),name);
64  _seg_v.push_back(seg);
65  _seg_col.push_back(c);
66  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< geoalgo::LineSegment_t > _seg_v
std::vector< std::string > _seg_col
void geoalgo::GeoObjCollection::Add ( const HalfLine_t seg,
std::string  label = "",
std::string  c = "" 
)

Definition at line 69 of file GeoObjCollection.cxx.

70  {
71  if(name.empty()) name = Form("Line (%zu)",_lin_v.size());
72  _AddLabel_(lin.Start()+lin.Start()*10,name);
73  _lin_v.push_back(lin);
74  _lin_col.push_back(c);
75  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< geoalgo::HalfLine_t > _lin_v
std::vector< std::string > _lin_col
void geoalgo::GeoObjCollection::Add ( const Trajectory_t trj,
std::string  label = "",
std::string  c = "" 
)

Definition at line 77 of file GeoObjCollection.cxx.

78  {
79  if(trj.size()<2)
80  throw GeoAlgoException("Trajectory size cannot be smaller than 2!");
81  if(name.empty()) name = Form("Trj (%zu)",_trj_v.size());
82  _AddLabel_(trj.back(),name);
83  _trj_v.push_back(trj);
84  _trj_col.push_back(c);
85 
86  return;
87  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< geoalgo::Trajectory_t > _trj_v
std::vector< std::string > _trj_col
void geoalgo::GeoObjCollection::Add ( const Cone_t cone,
std::string  label = "",
std::string  c = "" 
)

Definition at line 89 of file GeoObjCollection.cxx.

90  {
91  if(name.empty()) name = Form("Cone (%zu)",_cone_v.size());
92  _AddLabel_(cone.Start()+cone.Dir()*cone.Length(),name);
93  _cone_v.push_back(cone);
94  _cone_col.push_back(c);
95  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< std::string > _cone_col
std::vector< geoalgo::Cone_t > _cone_v
void geoalgo::GeoObjCollection::Add ( const Sphere_t sphere,
std::string  label = "",
std::string  c = "" 
)

Definition at line 98 of file GeoObjCollection.cxx.

99  {
100  if(name.empty()) name = Form("Sphere (%zu)",_sphere_v.size());
101  _AddLabel_(sphere.Center(),name);
102  _sphere_v.push_back(sphere);
103  _sphere_col.push_back(c);
104  }
static QCString name
Definition: declinfo.cpp:673
void _AddLabel_(const Point_t &pt, std::string label)
std::vector< geoalgo::Sphere > _sphere_v
std::vector< std::string > _sphere_col
void geoalgo::GeoObjCollection::Clear ( void  )

Definition at line 10 of file GeoObjCollection.cxx.

11  {
12  _pt_v.clear();
13  _box_v.clear();
14  _seg_v.clear();
15  _trj_v.clear();
16  _lin_v.clear();
17  _cone_v.clear();
18  //_sphere_v.clear();
19  _pt_col.clear();
20  _box_col.clear();
21  _seg_col.clear();
22  _trj_col.clear();
23  _lin_col.clear();
24  _cone_col.clear();
25  _sphere_col.clear();
26  _labels.clear();
27  }
std::vector< std::string > _cone_col
std::vector< geoalgo::LineSegment_t > _seg_v
std::vector< geoalgo::HalfLine_t > _lin_v
std::vector< std::string > _box_col
std::vector< geoalgo::Trajectory_t > _trj_v
std::vector< geoalgo::Cone_t > _cone_v
std::vector< geoalgo::Point_t > _pt_v
std::vector< std::string > _trj_col
std::vector< std::string > _lin_col
std::vector< geoalgo::AABox_t > _box_v
std::vector< std::string > _pt_col
std::vector< std::string > _sphere_col
std::vector< std::string > _seg_col
std::map< geoalgo::Point_t, std::string > _labels
const std::vector< geoalgo::Cone_t >& geoalgo::GeoObjCollection::Cone ( ) const
inline

Definition at line 70 of file GeoObjCollection.h.

70 { return _cone_v; }
std::vector< geoalgo::Cone_t > _cone_v
const std::vector< std::string >& geoalgo::GeoObjCollection::ConeColor ( ) const
inline

Definition at line 71 of file GeoObjCollection.h.

71 { return _cone_col; }
std::vector< std::string > _cone_col
const std::vector< geoalgo::HalfLine_t >& geoalgo::GeoObjCollection::HalfLine ( ) const
inline

Definition at line 64 of file GeoObjCollection.h.

64 { return _lin_v; }
std::vector< geoalgo::HalfLine_t > _lin_v
const std::vector< std::string >& geoalgo::GeoObjCollection::HalfLineColor ( ) const
inline

Definition at line 65 of file GeoObjCollection.h.

65 { return _lin_col; }
std::vector< std::string > _lin_col
const std::map<geoalgo::Point_t,std::string>& geoalgo::GeoObjCollection::Labels ( ) const
inline

Definition at line 76 of file GeoObjCollection.h.

76 { return _labels;}
std::map< geoalgo::Point_t, std::string > _labels
const std::vector< geoalgo::LineSegment_t >& geoalgo::GeoObjCollection::LineSegment ( ) const
inline

Definition at line 61 of file GeoObjCollection.h.

61 { return _seg_v; }
std::vector< geoalgo::LineSegment_t > _seg_v
const std::vector< std::string >& geoalgo::GeoObjCollection::LineSegmentColor ( ) const
inline

Definition at line 62 of file GeoObjCollection.h.

62 { return _seg_col; }
std::vector< std::string > _seg_col
const std::vector< geoalgo::Point_t >& geoalgo::GeoObjCollection::Point ( ) const
inline

Definition at line 55 of file GeoObjCollection.h.

55 { return _pt_v; }
std::vector< geoalgo::Point_t > _pt_v
const std::vector< std::string >& geoalgo::GeoObjCollection::PointColor ( ) const
inline

Definition at line 56 of file GeoObjCollection.h.

56 { return _pt_col; }
std::vector< std::string > _pt_col
const std::vector< geoalgo::Sphere_t >& geoalgo::GeoObjCollection::Sphere ( ) const
inline

Definition at line 73 of file GeoObjCollection.h.

73 { return _sphere_v; }
std::vector< geoalgo::Sphere > _sphere_v
const std::vector< std::string >& geoalgo::GeoObjCollection::SphereColor ( ) const
inline

Definition at line 74 of file GeoObjCollection.h.

74 { return _sphere_col; }
std::vector< std::string > _sphere_col
const std::vector< geoalgo::Trajectory_t >& geoalgo::GeoObjCollection::Trajectory ( ) const
inline

Definition at line 67 of file GeoObjCollection.h.

67 { return _trj_v; }
std::vector< geoalgo::Trajectory_t > _trj_v
const std::vector< std::string >& geoalgo::GeoObjCollection::TrajectoryColor ( ) const
inline

Definition at line 68 of file GeoObjCollection.h.

68 { return _trj_col; }
std::vector< std::string > _trj_col

Member Data Documentation

std::vector< std::string > geoalgo::GeoObjCollection::_box_col
protected

Definition at line 104 of file GeoObjCollection.h.

std::vector< geoalgo::AABox_t > geoalgo::GeoObjCollection::_box_v
protected

Definition at line 103 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_cone_col
protected

Definition at line 112 of file GeoObjCollection.h.

std::vector< geoalgo::Cone_t > geoalgo::GeoObjCollection::_cone_v
protected

Definition at line 111 of file GeoObjCollection.h.

std::map<geoalgo::Point_t,std::string > geoalgo::GeoObjCollection::_labels
protected

Definition at line 115 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_lin_col
protected

Definition at line 108 of file GeoObjCollection.h.

std::vector< geoalgo::HalfLine_t > geoalgo::GeoObjCollection::_lin_v
protected

Definition at line 107 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_pt_col
protected

Definition at line 102 of file GeoObjCollection.h.

std::vector< geoalgo::Point_t > geoalgo::GeoObjCollection::_pt_v
protected

Definition at line 101 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_seg_col
protected

Definition at line 106 of file GeoObjCollection.h.

std::vector< geoalgo::LineSegment_t > geoalgo::GeoObjCollection::_seg_v
protected

Definition at line 105 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_sphere_col
protected

Definition at line 114 of file GeoObjCollection.h.

std::vector< geoalgo::Sphere > geoalgo::GeoObjCollection::_sphere_v
protected

Definition at line 113 of file GeoObjCollection.h.

std::vector< std::string > geoalgo::GeoObjCollection::_trj_col
protected

Definition at line 110 of file GeoObjCollection.h.

std::vector< geoalgo::Trajectory_t > geoalgo::GeoObjCollection::_trj_v
protected

Definition at line 109 of file GeoObjCollection.h.


The documentation for this class was generated from the following files: