Merge branch 'nestor' into dev

This commit is contained in:
nsubiron 2017-06-19 10:50:21 +01:00
commit 9a189d8d25
11 changed files with 55 additions and 59 deletions

View File

@ -6,7 +6,7 @@
#include "ModuleManager.h" #include "ModuleManager.h"
#include "NonCopyable.h" #include "Util/NonCopyable.h"
DECLARE_LOG_CATEGORY_EXTERN(LogCarla, Log, All); DECLARE_LOG_CATEGORY_EXTERN(LogCarla, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogCarlaServer, Log, All); DECLARE_LOG_CATEGORY_EXTERN(LogCarlaServer, Log, All);

View File

@ -3,7 +3,7 @@
#include "Carla.h" #include "Carla.h"
#include "DynamicWeather.h" #include "DynamicWeather.h"
#include "IniFile.h" #include "Util/IniFile.h"
#include "Components/ArrowComponent.h" #include "Components/ArrowComponent.h"

View File

@ -5,7 +5,7 @@
#include "CommandLine.h" #include "CommandLine.h"
#include "DynamicWeather.h" #include "DynamicWeather.h"
#include "IniFile.h" #include "Util/IniFile.h"
// INI file sections. // INI file sections.
#define S_CARLA_SERVER TEXT("CARLA/Server") #define S_CARLA_SERVER TEXT("CARLA/Server")

View File

@ -3,8 +3,8 @@
#pragma once #pragma once
#include "GraphTypes.h" #include "GraphTypes.h"
#include "ListView.h"
#include "Position.h" #include "Position.h"
#include "Util/ListView.h"
#include <array> #include <array>
#include <list> #include <list>

View File

@ -1,43 +0,0 @@
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
#pragma once
namespace MapGen {
template<typename IT>
class CARLA_API ListView
{
public:
using iterator = IT;
explicit ListView(iterator begin, iterator end) : Begin(begin), End(end) {}
template <typename STL_CONTAINER>
explicit ListView(STL_CONTAINER &StlContainer) :
Begin(iterator(StlContainer.begin())),
End(iterator(StlContainer.end())) {}
ListView(const ListView &) = default;
ListView &operator=(const ListView &) = delete;
iterator begin() const {
return Begin;
}
iterator end() const {
return End;
}
bool empty() const {
return Begin == End;
}
private:
const iterator Begin;
const iterator End;
};
} // namespace MapGen

View File

@ -14,9 +14,9 @@
#define LOCTEXT_NAMESPACE "CarlaRoadMap" #define LOCTEXT_NAMESPACE "CarlaRoadMap"
/// ============================================================================ // =============================================================================
/// -- Static local methods ---------------------------------------------------- // -- Static local methods -----------------------------------------------------
/// ============================================================================ // =============================================================================
static uint32 ClampFloatToUInt(const float Value, int32 Min, int32 Max) static uint32 ClampFloatToUInt(const float Value, int32 Min, int32 Max)
{ {
@ -31,9 +31,9 @@ static float GetRotatedAzimuthAngle(const FVector &Direction)
return SphericalCoords.Y + PI; return SphericalCoords.Y + PI;
} }
/// ============================================================================ // =============================================================================
/// -- FRoadMapPixelData ------------------------------------------------------- // -- FRoadMapPixelData --------------------------------------------------------
/// ============================================================================ // =============================================================================
uint16 FRoadMapPixelData::Encode(bool IsRoad, bool HasDirection, const FVector &Direction) uint16 FRoadMapPixelData::Encode(bool IsRoad, bool HasDirection, const FVector &Direction)
{ {
@ -58,9 +58,9 @@ FColor FRoadMapPixelData::EncodeAsColor() const
} }
} }
/// ============================================================================ // =============================================================================
/// -- URoadMap ---------------------------------------------------------------- // -- URoadMap -----------------------------------------------------------------
/// ============================================================================ // =============================================================================
URoadMap::URoadMap(const FObjectInitializer& ObjectInitializer) : URoadMap::URoadMap(const FObjectInitializer& ObjectInitializer) :
Super(ObjectInitializer), Super(ObjectInitializer),

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "GraphTypes.h" #include "GraphTypes.h"
#include "NonCopyable.h" #include "Util/NonCopyable.h"
#include <vector> #include <vector>

View File

@ -0,0 +1,39 @@
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
#pragma once
template<typename IT>
class CARLA_API ListView
{
public:
using iterator = IT;
explicit ListView(iterator begin, iterator end) : Begin(begin), End(end) {}
template <typename STL_CONTAINER>
explicit ListView(STL_CONTAINER &StlContainer) :
Begin(iterator(StlContainer.begin())),
End(iterator(StlContainer.end())) {}
ListView(const ListView &) = default;
ListView &operator=(const ListView &) = delete;
iterator begin() const {
return Begin;
}
iterator end() const {
return End;
}
bool empty() const {
return Begin == End;
}
private:
const iterator Begin;
const iterator End;
};

View File

@ -7,5 +7,5 @@ public:
NonCopyable(const NonCopyable &) = delete; NonCopyable(const NonCopyable &) = delete;
void operator=(const NonCopyable &x) = delete; void operator=(const NonCopyable &) = delete;
}; };

View File

@ -3,7 +3,7 @@
#include "Carla.h" #include "Carla.h"
#include "WeatherDescription.h" #include "WeatherDescription.h"
#include "IniFile.h" #include "Util/IniFile.h"
static FString PrecipitationTypeToString(EPrecipitationType PrecipitationType) static FString PrecipitationTypeToString(EPrecipitationType PrecipitationType)
{ {