CARLA
Classes | Functions | Variables
carla::geom Namespace Reference

Classes

class  BoundingBox
 
class  CubicPolynomial
 Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3. More...
 
class  GeoLocation
 
class  Location
 
class  Math
 
class  Mesh
 Mesh data container, validator and exporter. More...
 
class  MeshFactory
 Mesh helper generator. More...
 
struct  MeshMaterial
 Material that references the vertex index start and end of a mesh where it is affecting. More...
 
class  PointCloudRtree
 Rtree class working with 3D point clouds. More...
 
class  Rotation
 
class  SegmentCloudRtree
 Rtree class working with 3D segment clouds. More...
 
class  Transform
 
class  Vector2D
 
class  Vector3D
 
class  Vector3DInt
 
struct  VertexInfo
 
struct  VertexNeighbors
 
struct  VertexWeight
 

Functions

static VertexWeight ComputeVertexWeight (const MeshFactory::RoadParameters &road_param, const VertexInfo &vertex_info, const VertexInfo &neighbor_info)
 
std::vector< VertexNeighborsGetVertexNeighborhoodAndWeights (const MeshFactory::RoadParameters &road_param, std::vector< std::unique_ptr< Mesh >> &lane_meshes)
 
static void LatLonAddMeters (double lat_start, double lon_start, double dx, double dy, double &lat_end, double &lon_end)
 Adds meters dx/dy to given lat/lon and returns new lat/lon. More...
 
template<class float_type >
static void LatLonToMercator (double lat, double lon, double scale, float_type &mx, float_type &my)
 Converts lat/lon/scale to mx/my (mx/my in meters if correct scale is given). More...
 
static double LatToScale (double lat)
 Convert latitude to scale, which is needed by mercator transformations. More...
 
static void MercatorToLatLon (double mx, double my, double scale, double &lat, double &lon)
 Converts mx/my/scale to lat/lon (mx/my in meters if correct scale is given). More...
 
Mesh operator+ (const Mesh &lhs, const Mesh &rhs)
 
std::ostream & operator<< (std::ostream &out, const Vector3D &vector3D)
 

Variables

static constexpr double EARTH_RADIUS_EQUA = 6378137.0
 Earth radius at equator [m]. More...
 
static constexpr double EPSILON = 10.0 * std::numeric_limits<double>::epsilon()
 We use this epsilon to shift the waypoints away from the edges of the lane sections to avoid floating point precision errors. More...
 
static constexpr double MESH_EPSILON = 50.0 * std::numeric_limits<double>::epsilon()
 

Function Documentation

◆ ComputeVertexWeight()

static VertexWeight carla::geom::ComputeVertexWeight ( const MeshFactory::RoadParameters road_param,
const VertexInfo vertex_info,
const VertexInfo neighbor_info 
)
static

Definition at line 370 of file MeshFactory.cpp.

References carla::geom::Math::Distance(), carla::geom::VertexInfo::is_static, carla::geom::MeshFactory::RoadParameters::lane_ends_multiplier, carla::geom::VertexInfo::lane_mesh_idx, carla::geom::MeshFactory::RoadParameters::max_weight_distance, carla::geom::MeshFactory::RoadParameters::same_lane_weight_multiplier, and carla::geom::VertexInfo::vertex.

Referenced by GetVertexNeighborhoodAndWeights().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVertexNeighborhoodAndWeights()

std::vector<VertexNeighbors> carla::geom::GetVertexNeighborhoodAndWeights ( const MeshFactory::RoadParameters road_param,
std::vector< std::unique_ptr< Mesh >> &  lane_meshes 
)

Definition at line 396 of file MeshFactory.cpp.

References ComputeVertexWeight(), carla::geom::VertexNeighbors::neighbors, and carla::geom::VertexNeighbors::vertex.

Referenced by carla::geom::MeshFactory::MergeAndSmooth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LatLonAddMeters()

static void carla::geom::LatLonAddMeters ( double  lat_start,
double  lon_start,
double  dx,
double  dy,
double &  lat_end,
double &  lon_end 
)
static

Adds meters dx/dy to given lat/lon and returns new lat/lon.

Definition at line 51 of file GeoLocation.cpp.

References LatLonToMercator(), LatToScale(), and MercatorToLatLon().

Referenced by carla::geom::GeoLocation::Transform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LatLonToMercator()

template<class float_type >
static void carla::geom::LatLonToMercator ( double  lat,
double  lon,
double  scale,
float_type &  mx,
float_type &  my 
)
static

Converts lat/lon/scale to mx/my (mx/my in meters if correct scale is given).

Definition at line 38 of file GeoLocation.cpp.

References EARTH_RADIUS_EQUA, carla::logging::log(), and carla::geom::Math::ToRadians().

Referenced by LatLonAddMeters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LatToScale()

static double carla::geom::LatToScale ( double  lat)
static

Convert latitude to scale, which is needed by mercator transformations.

Parameters
latlatitude in degrees (DEG)
Returns
scale factor
Note
when converting from lat/lon -> mercator and back again, or vice versa, use the same scale in both transformations!

Definition at line 31 of file GeoLocation.cpp.

References carla::geom::Math::ToRadians().

Referenced by LatLonAddMeters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MercatorToLatLon()

static void carla::geom::MercatorToLatLon ( double  mx,
double  my,
double  scale,
double &  lat,
double &  lon 
)
static

Converts mx/my/scale to lat/lon (mx/my in meters if correct scale is given).

Definition at line 45 of file GeoLocation.cpp.

Referenced by LatLonAddMeters().

+ Here is the caller graph for this function:

◆ operator+()

Mesh carla::geom::operator+ ( const Mesh lhs,
const Mesh rhs 
)

Definition at line 323 of file Mesh.cpp.

Referenced by carla::geom::Mesh::Mesh().

+ Here is the caller graph for this function:

◆ operator<<()

std::ostream& carla::geom::operator<< ( std::ostream &  out,
const Vector3D vector3D 
)

Variable Documentation

◆ EARTH_RADIUS_EQUA

constexpr double carla::geom::EARTH_RADIUS_EQUA = 6378137.0
static

Earth radius at equator [m].

Definition at line 23 of file GeoLocation.cpp.

Referenced by LatLonToMercator().

◆ EPSILON

constexpr double carla::geom::EPSILON = 10.0 * std::numeric_limits<double>::epsilon()
static

We use this epsilon to shift the waypoints away from the edges of the lane sections to avoid floating point precision errors.

Definition at line 26 of file MeshFactory.cpp.

Referenced by carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateWalls(), carla::geom::MeshFactory::GenerateWallsWithMaxLen(), and carla::geom::MeshFactory::GenerateWithMaxLen().

◆ MESH_EPSILON

constexpr double carla::geom::MESH_EPSILON = 50.0 * std::numeric_limits<double>::epsilon()
static

Definition at line 27 of file MeshFactory.cpp.