You've already forked LuckyWorld
Optimize code to unreal style
This commit is contained in:
@ -2,124 +2,125 @@
|
||||
|
||||
#include "SharedDef.generated.h"
|
||||
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ERobotsCategories : uint8
|
||||
{
|
||||
Wheeled UMETA(DisplayName = "Wheeled Robots"),
|
||||
FourLegged UMETA(DisplayName = "Four-Legged Robots"),
|
||||
TwoLegged UMETA(DisplayName = "Two-Legged Robots"),
|
||||
Stationary UMETA(DisplayName = "Stationary Robots"),
|
||||
IndoorFlying UMETA(DisplayName = "Indoor Flying Robots"),
|
||||
SwimmingUnderwater UMETA(DisplayName = "Swimming/Underwater Robots"),
|
||||
CrawlingModular UMETA(DisplayName = "Crawling/Modular Robots"),
|
||||
Arm UMETA(DisplayName = "Arm-Robots"),
|
||||
OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots")
|
||||
Wheeled UMETA(DisplayName = "Wheeled Robots"),
|
||||
FourLegged UMETA(DisplayName = "Four-Legged Robots"),
|
||||
TwoLegged UMETA(DisplayName = "Two-Legged Robots"),
|
||||
Stationary UMETA(DisplayName = "Stationary Robots"),
|
||||
IndoorFlying UMETA(DisplayName = "Indoor Flying Robots"),
|
||||
SwimmingUnderwater UMETA(DisplayName = "Swimming/Underwater Robots"),
|
||||
CrawlingModular UMETA(DisplayName = "Crawling/Modular Robots"),
|
||||
Arm UMETA(DisplayName = "Arm-Robots"),
|
||||
OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ERobotsName : uint8
|
||||
{
|
||||
None UMETA(DisplayName = "None"),
|
||||
Luck_e UMETA(DisplayName = "Luck-e"),
|
||||
Stretch UMETA(DisplayName = "Stretch"),
|
||||
LuckyDrone UMETA(DisplayName = "Lucky Drone"),
|
||||
DJIDrone UMETA(DisplayName = "DJI Drone"),
|
||||
ArmLucky UMETA(DisplayName = "Arm Lucky"),
|
||||
UnitreeG1 UMETA(DisplayName = "Unitree G1"),
|
||||
StretchRobotV1 UMETA(DisplayName = "Stretch Robot V1"),
|
||||
PandaArmRobot UMETA(DisplayName = "Panda Arm Robot"),
|
||||
PuralinkRobot UMETA(DisplayName = "Puralink Robot"),
|
||||
UnitreeGo2 UMETA(DisplayName = "Unitree Go 2"),
|
||||
RevoluteRobot UMETA(DisplayName = "Revolute Robot"),
|
||||
BostonSpotRobot UMETA(DisplayName = "Boston Spot Robot")
|
||||
None UMETA(DisplayName = "None"),
|
||||
Luck_e UMETA(DisplayName = "Luck-e"),
|
||||
Stretch UMETA(DisplayName = "Stretch"),
|
||||
LuckyDrone UMETA(DisplayName = "Lucky Drone"),
|
||||
DJIDrone UMETA(DisplayName = "DJI Drone"),
|
||||
ArmLucky UMETA(DisplayName = "Arm Lucky"),
|
||||
UnitreeG1 UMETA(DisplayName = "Unitree G1"),
|
||||
StretchRobotV1 UMETA(DisplayName = "Stretch Robot V1"),
|
||||
PandaArmRobot UMETA(DisplayName = "Panda Arm Robot"),
|
||||
PuralinkRobot UMETA(DisplayName = "Puralink Robot"),
|
||||
UnitreeGo2 UMETA(DisplayName = "Unitree Go 2"),
|
||||
RevoluteRobot UMETA(DisplayName = "Revolute Robot"),
|
||||
BostonSpotRobot UMETA(DisplayName = "Boston Spot Robot")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELevelType : uint8
|
||||
{
|
||||
Home UMETA(DisplayName = "Home"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
Street UMETA(DisplayName = "Street"),
|
||||
TestLevel UMETA(DisplayName = "TestLevel")
|
||||
Home UMETA(DisplayName = "Home"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
Street UMETA(DisplayName = "Street"),
|
||||
TestLevel UMETA(DisplayName = "TestLevel")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELevelEnum : uint8
|
||||
{
|
||||
None UMETA(DisplayName = "None"),
|
||||
TestLevel UMETA(DisplayName = "Test Level"),
|
||||
Loft UMETA(DisplayName = "Loft"),
|
||||
Rome UMETA(DisplayName = "Rome"),
|
||||
Paris UMETA(DisplayName = "Paris"),
|
||||
Marseille UMETA(DisplayName = "Marseille"),
|
||||
Istanbul UMETA(DisplayName = "Istanbul"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
BasicForest UMETA(DisplayName = "Basic Forest"),
|
||||
NaturalForest UMETA(DisplayName = "Natural Forest"),
|
||||
KitchenForArmRobot UMETA(DisplayName = "Kitchen for Arm Robot"),
|
||||
PipeFabric UMETA(DisplayName = "Pipe Fabric")
|
||||
None UMETA(DisplayName = "None"),
|
||||
TestLevel UMETA(DisplayName = "Test Level"),
|
||||
Loft UMETA(DisplayName = "Loft"),
|
||||
Rome UMETA(DisplayName = "Rome"),
|
||||
Paris UMETA(DisplayName = "Paris"),
|
||||
Marseille UMETA(DisplayName = "Marseille"),
|
||||
Istanbul UMETA(DisplayName = "Istanbul"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
BasicForest UMETA(DisplayName = "Basic Forest"),
|
||||
NaturalForest UMETA(DisplayName = "Natural Forest"),
|
||||
KitchenForArmRobot UMETA(DisplayName = "Kitchen for Arm Robot"),
|
||||
PipeFabric UMETA(DisplayName = "Pipe Fabric")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EQualityEnum : uint8
|
||||
{
|
||||
Low UMETA(DisplayName = "Low"),
|
||||
Middle UMETA(DisplayName = "Middle"),
|
||||
High UMETA(DisplayName = "High"),
|
||||
Epic UMETA(DisplayName = "Epic")
|
||||
Low UMETA(DisplayName = "Low"),
|
||||
Middle UMETA(DisplayName = "Middle"),
|
||||
High UMETA(DisplayName = "High"),
|
||||
Epic UMETA(DisplayName = "Epic")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EGoalType : uint8
|
||||
{
|
||||
GrabAndPull UMETA(DisplayName = "Grab and Pull"),
|
||||
GrabAndRotate UMETA(DisplayName = "Grab and Rotate"),
|
||||
GrabAndOpen UMETA(DisplayName = "Grab and Open"),
|
||||
PickAndPlace UMETA(DisplayName = "Pick and Place"),
|
||||
Pick UMETA(DisplayName = "Pick"),
|
||||
GrabAndInsert UMETA(DisplayName = "Grab and Insert"),
|
||||
Find UMETA(DisplayName = "Find"),
|
||||
Point UMETA(DisplayName = "Point"),
|
||||
PointWithLaserPointer UMETA(DisplayName = "Point with Laser Pointer"),
|
||||
RotateHand UMETA(DisplayName = "Rotate Hand"),
|
||||
SliceDice UMETA(DisplayName = "Slice/Dice"),
|
||||
Wipe UMETA(DisplayName = "Wipe"),
|
||||
FoldUnfold UMETA(DisplayName = "Fold/Unfold"),
|
||||
ArrangeOrganize UMETA(DisplayName = "Arrange/Organize"),
|
||||
PressButton UMETA(DisplayName = "Press Button"),
|
||||
PourDispense UMETA(DisplayName = "Pour/Dispense"),
|
||||
NavigateSimpleEnvironments UMETA(DisplayName = "Navigate Simple Environments"),
|
||||
NavigateComplexTerrain UMETA(DisplayName = "Navigate Complex Terrain"),
|
||||
ClimbStairsOrRamps UMETA(DisplayName = "Climb Stairs or Ramps"),
|
||||
BalanceStabilize UMETA(DisplayName = "Balance/Stabilize"),
|
||||
DockingAndCharging UMETA(DisplayName = "Docking and Charging"),
|
||||
ChangeGripper UMETA(DisplayName = "Change Gripper"),
|
||||
Place UMETA(DisplayName = "Place")
|
||||
GrabAndPull UMETA(DisplayName = "Grab and Pull"),
|
||||
GrabAndRotate UMETA(DisplayName = "Grab and Rotate"),
|
||||
GrabAndOpen UMETA(DisplayName = "Grab and Open"),
|
||||
PickAndPlace UMETA(DisplayName = "Pick and Place"),
|
||||
Pick UMETA(DisplayName = "Pick"),
|
||||
GrabAndInsert UMETA(DisplayName = "Grab and Insert"),
|
||||
Find UMETA(DisplayName = "Find"),
|
||||
Point UMETA(DisplayName = "Point"),
|
||||
PointWithLaserPointer UMETA(DisplayName = "Point with Laser Pointer"),
|
||||
RotateHand UMETA(DisplayName = "Rotate Hand"),
|
||||
SliceDice UMETA(DisplayName = "Slice/Dice"),
|
||||
Wipe UMETA(DisplayName = "Wipe"),
|
||||
FoldUnfold UMETA(DisplayName = "Fold/Unfold"),
|
||||
ArrangeOrganize UMETA(DisplayName = "Arrange/Organize"),
|
||||
PressButton UMETA(DisplayName = "Press Button"),
|
||||
PourDispense UMETA(DisplayName = "Pour/Dispense"),
|
||||
NavigateSimpleEnvironments UMETA(DisplayName = "Navigate Simple Environments"),
|
||||
NavigateComplexTerrain UMETA(DisplayName = "Navigate Complex Terrain"),
|
||||
ClimbStairsOrRamps UMETA(DisplayName = "Climb Stairs or Ramps"),
|
||||
BalanceStabilize UMETA(DisplayName = "Balance/Stabilize"),
|
||||
DockingAndCharging UMETA(DisplayName = "Docking and Charging"),
|
||||
ChangeGripper UMETA(DisplayName = "Change Gripper"),
|
||||
Place UMETA(DisplayName = "Place")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ESaveDataType : uint8
|
||||
{
|
||||
file UMETA(DisplayName = "file"),
|
||||
webserver UMETA(DisplayName = "webserver"),
|
||||
http UMETA(DisplayName = "http"),
|
||||
debug UMETA(DisplayName = "debug"),
|
||||
none UMETA(DisplayName = "none")
|
||||
file UMETA(DisplayName = "file"),
|
||||
webserver UMETA(DisplayName = "webserver"),
|
||||
http UMETA(DisplayName = "http"),
|
||||
debug UMETA(DisplayName = "debug"),
|
||||
none UMETA(DisplayName = "none")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELogItemType : uint8
|
||||
{
|
||||
Debug UMETA(DisplayName = "Debug"),
|
||||
War UMETA(DisplayName = "War"),
|
||||
Error UMETA(DisplayName = "Error"),
|
||||
Consol UMETA(DisplayName = "Consol")
|
||||
Debug UMETA(DisplayName = "Debug"),
|
||||
War UMETA(DisplayName = "War"),
|
||||
Error UMETA(DisplayName = "Error"),
|
||||
Consol UMETA(DisplayName = "Consol")
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FRobotData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ERobotsName Name;
|
||||
@ -147,9 +148,10 @@ USTRUCT(BlueprintType)
|
||||
struct FLevelData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int ID;
|
||||
int32 ID;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ELevelEnum LevelEnum;
|
||||
@ -157,7 +159,6 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ELevelType LevelType;
|
||||
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSoftObjectPtr<UWorld> LevelObject;
|
||||
|
||||
@ -178,12 +179,12 @@ public:
|
||||
LevelObject == Other.LevelObject &&
|
||||
LevelImage == Other.LevelImage &&
|
||||
bActive == Other.bActive &&
|
||||
RobotTypeList == Other.RobotTypeList;
|
||||
RobotTypeList == Other.RobotTypeList;
|
||||
}
|
||||
|
||||
FLevelData& operator=(const FLevelData& Other)
|
||||
{
|
||||
if (this != &Other)
|
||||
if (this != &Other)
|
||||
{
|
||||
ID = Other.ID;
|
||||
LevelEnum = Other.LevelEnum;
|
||||
@ -201,6 +202,7 @@ USTRUCT(BlueprintType)
|
||||
struct FGoalsTaskData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
EGoalType GoalType;
|
||||
@ -215,13 +217,13 @@ public:
|
||||
TSoftObjectPtr<UObject> TargetActor;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bIsComplate;
|
||||
bool bIsComplete;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FVector DropOffLocation;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString ObjectName;
|
||||
FString ObjectName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bActive;
|
||||
@ -230,9 +232,9 @@ public:
|
||||
{
|
||||
return GoalType == Other.GoalType &&
|
||||
bIsStart == Other.bIsStart &&
|
||||
TargetLocation.Equals(Other.TargetLocation, 0.01f) &&
|
||||
TargetLocation.Equals(Other.TargetLocation, 0.01f) &&
|
||||
TargetActor == Other.TargetActor &&
|
||||
bIsComplate == Other.bIsComplate &&
|
||||
bIsComplete == Other.bIsComplete &&
|
||||
DropOffLocation.Equals(Other.DropOffLocation, 0.01f) &&
|
||||
ObjectName == Other.ObjectName &&
|
||||
bActive == Other.bActive;
|
||||
@ -240,13 +242,13 @@ public:
|
||||
|
||||
FGoalsTaskData& operator=(const FGoalsTaskData& Other)
|
||||
{
|
||||
if (this != &Other)
|
||||
if (this != &Other)
|
||||
{
|
||||
GoalType = Other.GoalType;
|
||||
bIsStart = Other.bIsStart;
|
||||
TargetLocation = Other.TargetLocation;
|
||||
TargetActor = Other.TargetActor;
|
||||
bIsComplate = Other.bIsComplate;
|
||||
bIsComplete = Other.bIsComplete;
|
||||
DropOffLocation = Other.DropOffLocation;
|
||||
ObjectName = Other.ObjectName;
|
||||
bActive = Other.bActive;
|
||||
@ -259,6 +261,7 @@ USTRUCT(BlueprintType)
|
||||
struct FCaptureSettingsData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FText FolderName = FText::FromString("robotdata");
|
||||
@ -306,7 +309,7 @@ public:
|
||||
TArray<TSoftObjectPtr<UStaticMeshComponent>> RandomMeshes;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bInfiniteCapture;
|
||||
bool bInfiniteCapture;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FText NumberOfCaptures = FText::FromString("1");
|
||||
@ -317,7 +320,7 @@ public:
|
||||
FileName.EqualTo(Other.FileName) &&
|
||||
WritesPerSec.EqualTo(Other.WritesPerSec) &&
|
||||
IsScenario == Other.IsScenario &&
|
||||
TaskList == Other.TaskList &&
|
||||
TaskList == Other.TaskList &&
|
||||
bLight == Other.bLight &&
|
||||
bMaterials == Other.bMaterials &&
|
||||
bRobotPosition == Other.bRobotPosition &&
|
||||
@ -327,14 +330,14 @@ public:
|
||||
NumberOfPeople.EqualTo(Other.NumberOfPeople) &&
|
||||
bObjects == Other.bObjects &&
|
||||
NumberOfObjects.EqualTo(Other.NumberOfObjects) &&
|
||||
RandomMeshes == Other.RandomMeshes &&
|
||||
RandomMeshes == Other.RandomMeshes &&
|
||||
bInfiniteCapture == Other.bInfiniteCapture &&
|
||||
NumberOfCaptures.EqualTo(Other.NumberOfCaptures);
|
||||
}
|
||||
|
||||
FCaptureSettingsData& operator=(const FCaptureSettingsData& Other)
|
||||
{
|
||||
if (this != &Other)
|
||||
if (this != &Other)
|
||||
{
|
||||
FolderName = Other.FolderName;
|
||||
FileName = Other.FileName;
|
||||
@ -362,6 +365,7 @@ USTRUCT(BlueprintType)
|
||||
struct FAllGoalListData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
EGoalType GoalType;
|
||||
@ -380,9 +384,10 @@ USTRUCT(BlueprintType)
|
||||
struct FLuckyCode : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int ID;
|
||||
int32 ID;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString Code;
|
||||
|
Reference in New Issue
Block a user