-
Sergi Hernandez authored
The links keep the splines to generate the trajectory. Solved a bug with the computation of the curvature for lanes other than the central one.
Sergi Hernandez authoredThe links keep the splines to generate the trajectory. Solved a bug with the computation of the curvature for lanes other than the central one.
opendrive_geometry.h 1.75 KiB
#ifndef _OPENDRIVE_GEOMETRY_H
#define _OPENDRIVE_GEOMETRY_H
#include "opendrive_common.h"
#ifdef _HAVE_XSD
#include "xml/OpenDRIVE_1.4H.hxx"
#endif
#include <iostream>
class COpendriveGeometry
{
friend class COpendriveRoadNode;
friend class COpendriveRoadSegment;
private:
protected:
COpendriveGeometry();
COpendriveGeometry(const COpendriveGeometry &object);
void load(const planView::geometry_type &geometry_info);
double scale_factor;
double min_s; ///< Starting track coordenate "s" for the geometry.
double max_s; ///< Ending track coordenate "s" for the geometry.
TOpendriveWorldPose pose;
virtual bool transform_local_pose(const TOpendriveTrackPose &track,TOpendriveLocalPose &local) const = 0;
virtual void print(std::ostream &out);
virtual void load_params(const planView::geometry_type &geometry_info) = 0;
virtual std::string get_name(void)=0;
void set_scale_factor(double scale);
void set_start_pose(TOpendriveWorldPose &pose);
void set_max_s(double s);
void set_min_s(double s);
public:
virtual COpendriveGeometry *clone(void) = 0;
bool get_local_pose(const TOpendriveTrackPose &track,TOpendriveLocalPose &local) const;
bool get_world_pose(const TOpendriveTrackPose &track,TOpendriveWorldPose &world) const;
bool in_range(double s) const;
double get_length(void) const;
virtual void get_curvature(double &start,double &end)=0;
double get_max_s(void) const;
double get_min_s(void) const;
TOpendriveWorldPose get_start_pose(void) const;
TOpendriveWorldPose get_end_pose(void) const;
void operator=(const COpendriveGeometry &object);
friend std::ostream& operator<<(std::ostream& out, COpendriveGeometry &geom);
virtual ~COpendriveGeometry();
};
#endif