Skip to content
Snippets Groups Projects
Commit e84b7b7a authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Moved the default and copy constructors as protected.

Removed the parameter constructor.
Added an abstract function to get the start and end curvature.
parent b44f59c7
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,8 @@ class COpendriveGeometry ...@@ -13,6 +13,8 @@ class COpendriveGeometry
friend class COpendriveRoadNode; friend class COpendriveRoadNode;
private: private:
protected: protected:
COpendriveGeometry();
COpendriveGeometry(const COpendriveGeometry &object);
void load(const planView::geometry_type &geometry_info); void load(const planView::geometry_type &geometry_info);
double scale_factor; double scale_factor;
double min_s; ///< Starting track coordenate "s" for the geometry. double min_s; ///< Starting track coordenate "s" for the geometry.
...@@ -24,14 +26,12 @@ class COpendriveGeometry ...@@ -24,14 +26,12 @@ class COpendriveGeometry
virtual std::string get_name(void)=0; virtual std::string get_name(void)=0;
void set_scale_factor(double scale); void set_scale_factor(double scale);
public: public:
COpendriveGeometry();
COpendriveGeometry(double min_s, double max_s, double x, double y, double heading);
COpendriveGeometry(const COpendriveGeometry &object);
virtual COpendriveGeometry *clone(void) = 0; virtual COpendriveGeometry *clone(void) = 0;
bool get_local_pose(TOpendriveTrackPoint &track,TOpendriveLocalPoint &local) const; bool get_local_pose(TOpendriveTrackPoint &track,TOpendriveLocalPoint &local) const;
bool get_world_pose(TOpendriveTrackPoint &track,TOpendriveWorldPoint &world) const; bool get_world_pose(TOpendriveTrackPoint &track,TOpendriveWorldPoint &world) const;
bool in_range(double s) const; bool in_range(double s) const;
double get_length(void) const; double get_length(void) const;
virtual void get_curvature(double &start,double &end)=0;
void operator=(const COpendriveGeometry &object); void operator=(const COpendriveGeometry &object);
friend std::ostream& operator<<(std::ostream& out, COpendriveGeometry &geom); friend std::ostream& operator<<(std::ostream& out, COpendriveGeometry &geom);
virtual ~COpendriveGeometry(); virtual ~COpendriveGeometry();
......
...@@ -11,16 +11,6 @@ COpendriveGeometry::COpendriveGeometry() ...@@ -11,16 +11,6 @@ COpendriveGeometry::COpendriveGeometry()
this->scale_factor=DEFAULT_SCALE_FACTOR; this->scale_factor=DEFAULT_SCALE_FACTOR;
} }
COpendriveGeometry::COpendriveGeometry(double min_s, double max_s, double x, double y, double heading)
{
this->min_s = min_s;
this->max_s = max_s;
this->pose.x = x;
this->pose.y = y;
this->pose.heading = heading;
this->scale_factor=DEFAULT_SCALE_FACTOR;
}
COpendriveGeometry::COpendriveGeometry(const COpendriveGeometry &object) COpendriveGeometry::COpendriveGeometry(const COpendriveGeometry &object)
{ {
this->min_s = object.min_s; this->min_s = object.min_s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment