Agrarsense
|
#include <SensorFactory.h>
Static Public Member Functions | |
static USensorMapDataAsset * | GetSensorMapDataAsset () |
static ALidar * | SpawnLidarSensor (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FLidarParameters lidarParameters, bool SimulateSensor=true) |
static ACamera * | SpawnCamera (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FCameraBaseParameters cameraParameters, bool SimulateSensor=true) |
static AThermalCamera * | SpawnThermalCamera (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FThermalCameraParameters thermalCameraParameters, bool SimulateSensor=true) |
static ADepthCamera * | SpawnDepthCamera (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FDepthCameraParameters depthCameraParameters, bool SimulateSensor=true) |
static ASemanticSegmentationCamera * | SpawnSegmentationCamera (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FCameraBaseParameters cameraParameters, bool SimulateSensor=true) |
static ADVSCamera * | SpawnDVSCamera (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FDVSCameraParameters DVSCameraParameters, bool SimulateSensor) |
static ARadar * | SpawnRadar (const FTransform &transform, const FString sensorIdentifier, const FString sensorName, FRadarParameters radarParameters, bool SimulateSensor=true) |
static ACollisionSensor * | SpawnCollisionSensor (const FTransform &transform, AActor *Owner, const FString sensorIdentifier, const FString sensorName, bool SimulateSensor=true) |
static ATransformSensor * | SpawnTransformSensor (const FTransform &transform, AActor *Owner, const FString sensorIdentifier, const FString sensorName, bool SimulateSensor=true) |
static AOverlapSensor * | SpawnOverlapSensor (const FTransform &transform, FOverlapSensorParameters Parameters, const FString sensorIdentifier, const FString sensorName) |
Static Private Member Functions | |
template<typename T > | |
static T * | SpawnSensor (const FTransform &transform, const FString &sensorIdentifier, const FString &sensorName, bool SpawnSensorModel=true) |
static void | SetSensorIdentifierAndNameWithFallbacks (ASensor *sensor, const FString &sensorIdentifier, const FString &sensorName) |
static ASensorModel * | SpawnModelClassForSensor (ASensor *attachTo) |
static ASensorModel * | SpawnModelClass (TSubclassOf< ASensorModel > modelClass, ASensor *attachTo) |
static void | Initialize () |
Static Private Attributes | |
static TWeakObjectPtr< USensorMapDataAsset > | SensorMapDataAsset |
SensorFactory is a UBlueprintFunctionLibrary based class in charge of spawning sensors. Sensors should not be spawned in any other way. Note. This Factory only works during runtime, don't call these functions in Editor without play mode on.
Definition at line 42 of file SensorFactory.h.
|
static |
Definition at line 49 of file SensorFactory.cpp.
References Initialize(), and SensorMapDataAsset.
Referenced by SpawnModelClassForSensor().
|
staticprivate |
Initialize the factory. Should be called before using data or calling functions
Definition at line 26 of file SensorFactory.cpp.
References SensorMapDataAsset.
Referenced by GetSensorMapDataAsset().
|
staticprivate |
Set sensor name and identifier but fallback to default values if sensor name and/or sensor identifier are empty.
sensor | Sensor which name and identifier to change |
sensorIdentifier | Sensor new identifier (empty identifier not accepted) |
sensorName | Sensor new name (empty name not accepted) |
Definition at line 63 of file SensorFactory.cpp.
References UEnumUtilities::ConvertSensorTypeToString(), ASensor::GetSensorIdentifier(), ASensor::GetSensorType(), ASensor::SetSensorIdentifier(), and ASensor::SetSensorName().
Referenced by SpawnSensor().
|
static |
Spawn new Camera sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FCameraBaseParameters | FCameraBaseParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 104 of file SensorFactory.cpp.
References ACamera::Init().
|
static |
Spawn new Collision sensor. BlueprintCallable.
FTransform | location to spawn sensor |
AActor* | Owning actor |
bool | Should the sensor start simulating after spawn |
Definition at line 176 of file SensorFactory.cpp.
References ACollisionSensor::Init().
Referenced by AVehicle::BeginPlay().
|
static |
Spawn new Camera sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FCameraBaseParameters | FCameraBaseParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 128 of file SensorFactory.cpp.
References ADepthCamera::DepthInit().
|
static |
Spawn new Camera sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FCameraBaseParameters | FCameraBaseParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 152 of file SensorFactory.cpp.
References ADVSCamera::DVSInit().
|
static |
Spawn new Lidar sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FLidarParameters | FLidarParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 92 of file SensorFactory.cpp.
References ALidar::Init().
|
staticprivate |
Spawn sensor model (3D model) class attaching it to the given actor
ModelClass | ASensorModel class for the sensor's model's class |
attachTo | Attach to this sensor |
Definition at line 247 of file SensorFactory.cpp.
References ASensorModel::InitAfterSpawn(), ASensorModel::SetAttachedToSensor(), and ASensor::SetSensorModel().
Referenced by SpawnModelClassForSensor().
|
staticprivate |
Spawn sensor model (3D model) class attaching it to the given actor
attachTo | Sensor to attach to |
Definition at line 212 of file SensorFactory.cpp.
References USensorMapDataAsset::GetAssetDataBySensorType(), GetSensorMapDataAsset(), ASensor::GetSensorType(), USensorDataAsset::ModelClass, and SpawnModelClass().
Referenced by SpawnSensor().
|
static |
Spawn new Overlap sensor. BlueprintCallable. This is spawned by default on every vehicle
FTransform | location to spawn sensor |
FOverlapSensorParameters* | Overlap sensor parameters |
Definition at line 200 of file SensorFactory.cpp.
References AOverlapSensor::Init().
Referenced by AVehicle::BeginPlay().
|
static |
Spawn new Radar sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FRadarParameters | FRadarParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 164 of file SensorFactory.cpp.
References ARadar::Init().
|
static |
Spawn new Camera sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FCameraBaseParameters | FCameraBaseParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 140 of file SensorFactory.cpp.
References ASemanticSegmentationCamera::Init().
|
staticprivate |
Definition at line 281 of file SensorFactory.cpp.
References SetSensorIdentifierAndNameWithFallbacks(), and SpawnModelClassForSensor().
|
static |
Spawn new Camera sensor. BlueprintCallable.
FTransform | location to spawn sensor |
FString | Sensor's unique identifier |
FString | Sensor's name |
FCameraBaseParameters | FCameraBaseParameters parameters struct |
bool | Should the sensor start simulating after spawn |
Definition at line 116 of file SensorFactory.cpp.
References AThermalCamera::ThermalInit().
|
static |
Spawn new Tranform sensor. BlueprintCallable. This is spawned by default on every vehicle
FTransform | location to spawn sensor |
AActor* | Owning actor |
bool | Should the sensor start simulating after spawn |
Definition at line 188 of file SensorFactory.cpp.
References ATransformSensor::Init().
Referenced by AVehicle::BeginPlay().
|
staticprivate |
Sensor map data asset to hold sensor specific base data
Definition at line 213 of file SensorFactory.h.
Referenced by GetSensorMapDataAsset(), and Initialize().