|
Agrarsense
|
#include <AssetLibrary.h>


Static Public Member Functions | |
| static AActor * | SpawnFoliage (EFoliageTypes FoliageType, FTransform Transform, FString ActorName="", FString ActorID="", bool RandomZRotation=true, bool SnapToGround=true) |
| static AVehicle * | SpawnVehicle (EVehicleTypes VehicleType, FTransform SpawnTransform, const FString &ActorName, const FString &ActorID, bool SnapAboveGround=false, float AboveOffset=150.0f, bool DestroyOverlappingActors=false) |
| static AActor * | SpawnProp (EPropTypes PropType, FTransform Transform, FString ActorName="", FString ActorID="", bool RandomZRotation=false, bool SnapToGround=false) |
| static AWalker * | SpawnWalker (FWalkerParameters Parameters, const FString &ActorName="", const FString &ActorID="", bool StartAutomatically=true) |
| static UPropActorAssetMapDataAsset * | GetPropActorAssetMapDataAsset () |
| static EPropTypes | GetRandomPropType () |
| static TArray< AInstancedActor * > | GetAllAddedPropActors () |
| static UFoliageActorAssetMapDataAsset * | GetFoliageActorAssetMapDataAsset () |
| static EFoliageTypes | GetRandomFoliageType () |
| static TArray< AInstancedActor * > | GetAllAddedFoliageActors () |
| static TArray< FVehicleData > | GetSpawnedVehicles () |
| static void | DestroyAllWalkers () |
| static TArray< AWalker * > | GetAllWalkers () |
| static UWalkerActorAssetMapDataAsset * | GetWalkerActorAssetMapDataAsset () |
Static Private Member Functions | |
| static AActor * | TrySpawnActor (TSubclassOf< AActor > ActorClass, FTransform &Transform, FString ActorName, FString ActorID, bool SnapToGround, bool RandomZRotation, ESpawnActorCollisionHandlingMethod CollisionMethod=ESpawnActorCollisionHandlingMethod::Undefined) |
| static AActor * | TrySpawnActorDeferred (TSubclassOf< AActor > ActorClass, FTransform &Transform, FString ActorName, FString ActorID, bool SnapToGround, bool RandomZRotation, ESpawnActorCollisionHandlingMethod CollisionMethod=ESpawnActorCollisionHandlingMethod::Undefined) |
| static void | DestroyOverlappingActorsSphere (AActor *SpawnedActor) |
| static void | SetupVehicleDataAsset () |
| static void | SetupFoliageDataAsset () |
| static void | SetupPropDataAsset () |
| static void | SetupWalkerDataAsset () |
Static Private Attributes | |
| static TWeakObjectPtr< UVehicleActorAssetMapDataAsset > | VehicleDataAsset |
| static TArray< FVehicleData > | SpawnedVehicles |
| static TWeakObjectPtr< UFoliageActorAssetMapDataAsset > | FoliageActorAssetMapDataAsset |
| static TMap< EFoliageTypes, FString > | FoliageTypeMap |
| static TArray< FInstancedActorData > | AddedFoliageActors |
| static TArray< EFoliageTypes > | FoliageKeys |
| static TWeakObjectPtr< UPropActorAssetMapDataAsset > | PropActorAssetMapDataAsset |
| static TArray< FInstancedActorData > | SpawnedPropActors |
| static TMap< EPropTypes, FString > | PropTypeMap |
| static TArray< EPropTypes > | PropKeys |
| static TWeakObjectPtr< UWalkerActorAssetMapDataAsset > | WalkerActorAssetMapDataAsset |
| static TArray< TWeakObjectPtr< AWalker > > | SpawnedWalkers |
Library for spawning Vehicles, Foliage, Props and Walkers assets into the World.
Definition at line 53 of file AssetLibrary.h.
|
static |
Destroy all Walkers from the World.
Definition at line 510 of file AssetLibrary.cpp.
References GetAllWalkers(), SimulatorLog::Log(), and Walker.
Referenced by UROSCommands::HandleDestroyAllWalkers().
|
staticprivate |
Definition at line 351 of file AssetLibrary.cpp.
Referenced by SpawnVehicle().
|
static |
Retrieve a list of all added foliage actors within this Foliage Factory.
Definition at line 418 of file AssetLibrary.cpp.
References FInstancedActorData::Actor, and AddedFoliageActors.
Referenced by UROSCommands::HandleExportFoliage().
|
static |
Retrieve a list of all added Prop actors within this Prop Factory.
Definition at line 460 of file AssetLibrary.cpp.
References FInstancedActorData::Actor, and SpawnedPropActors.
Referenced by UROSCommands::HandleExportProps().
|
static |
Get All Walkers from the World.
Definition at line 488 of file AssetLibrary.cpp.
References SpawnedWalkers.
Referenced by DestroyAllWalkers(), and UROSCommands::HandleExportWalkers().
|
static |
Definition at line 397 of file AssetLibrary.cpp.
References FoliageActorAssetMapDataAsset, and SetupFoliageDataAsset().
|
static |
Definition at line 439 of file AssetLibrary.cpp.
References PropActorAssetMapDataAsset, and SetupPropDataAsset().
|
static |
Definition at line 404 of file AssetLibrary.cpp.
References FoliageKeys, NONE, and SetupFoliageDataAsset().
|
static |
Definition at line 446 of file AssetLibrary.cpp.
References NONE, PropKeys, and SetupPropDataAsset().
|
static |
Retrieves an array of spawned vehicles.
Definition at line 387 of file AssetLibrary.cpp.
References SpawnedVehicles, and FVehicleData::Vehicle.
Referenced by UROSCommands::HandleExportVehicles().
|
static |
Definition at line 481 of file AssetLibrary.cpp.
References SetupWalkerDataAsset(), and WalkerActorAssetMapDataAsset.
|
staticprivate |
Definition at line 543 of file AssetLibrary.cpp.
References FOLIAGE_ASSET_PATH, FoliageActorAssetMapDataAsset, FoliageKeys, and FoliageTypeMap.
Referenced by GetFoliageActorAssetMapDataAsset(), GetRandomFoliageType(), and SpawnFoliage().
|
staticprivate |
Definition at line 562 of file AssetLibrary.cpp.
References PROP_ASSET_PATH, PropActorAssetMapDataAsset, PropKeys, PropTypeMap, and SpawnedPropActors.
Referenced by GetPropActorAssetMapDataAsset(), GetRandomPropType(), and SpawnProp().
|
staticprivate |
Definition at line 533 of file AssetLibrary.cpp.
References VEHICLE_ASSET_PATH, and VehicleDataAsset.
Referenced by SpawnVehicle().
|
staticprivate |
Definition at line 582 of file AssetLibrary.cpp.
References WALKER_ASSET_PATH, and WalkerActorAssetMapDataAsset.
Referenced by GetWalkerActorAssetMapDataAsset(), and SpawnWalker().
|
static |
Spawns a foliage actor at the specified transform. Returns a pointer to the spawned actor or nullptr.
Definition at line 51 of file AssetLibrary.cpp.
References FActorAsset::Actor, FInstancedActorData::Actor, UActorAssetDataAsset::ActorAsset, AddedFoliageActors, FoliageActorAssetMapDataAsset, FoliageTypeMap, AInstancedActor::SetTypeAndModel(), SetupFoliageDataAsset(), Transform, and TrySpawnActor().
Referenced by USimulatorJsonParser::ParsePropOrFoliage().
|
static |
Spawns a prop at the specified location. Returns a pointer to the spawned actor or nullptr.
Definition at line 147 of file AssetLibrary.cpp.
References FActorAsset::Actor, FInstancedActorData::Actor, UActorAssetDataAsset::ActorAsset, PropActorAssetMapDataAsset, PropTypeMap, AInstancedActor::SetTypeAndModel(), SetupPropDataAsset(), SpawnedPropActors, Transform, and TrySpawnActor().
Referenced by USimulatorJsonParser::ParsePropOrFoliage().
|
static |
Spawns a vehicle at the specified transform. Returns a pointer to the spawned vehicle or nullptr.
Definition at line 86 of file AssetLibrary.cpp.
References FActorAsset::Actor, UActorAssetDataAsset::ActorAsset, UEnumUtilities::ConvertVehicleTypeToString(), DestroyOverlappingActorsSphere(), Drone, SetupVehicleDataAsset(), UPhysicsUtilities::SnapActorAboveGround(), SpawnedVehicles, TrySpawnActor(), Vehicle, FVehicleData::Vehicle, VehicleDataAsset, and FVehicleData::VehicleType.
Referenced by USimulatorJsonParser::ParseVehicle().
|
static |
Spawns a walker based on the provided parameters. Returns a pointer to the spawned walker or nullptr.
Definition at line 187 of file AssetLibrary.cpp.
References FActorAsset::Actor, UActorAssetDataAsset::ActorAsset, UEnumUtilities::ConvertWalkerTypeToString(), FollowPath, SimulatorLog::Log(), FWalkerParameters::Points, SetupWalkerDataAsset(), SpawnedWalkers, TrySpawnActorDeferred(), Walker, FWalkerParameters::WalkerAction, WalkerActorAssetMapDataAsset, and FWalkerParameters::WalkerType.
Referenced by USimulatorJsonParser::SpawnWalker().
|
staticprivate |
Definition at line 234 of file AssetLibrary.cpp.
References UPhysicsUtilities::SnapActorToGround(), and Transform.
Referenced by SpawnFoliage(), SpawnProp(), and SpawnVehicle().
|
staticprivate |
Definition at line 295 of file AssetLibrary.cpp.
References UPhysicsUtilities::SnapActorToGround(), and Transform.
Referenced by SpawnWalker().
|
staticprivate |
Definition at line 187 of file AssetLibrary.h.
Referenced by GetAllAddedFoliageActors(), and SpawnFoliage().
|
staticprivate |
Definition at line 185 of file AssetLibrary.h.
Referenced by GetFoliageActorAssetMapDataAsset(), SetupFoliageDataAsset(), and SpawnFoliage().
|
staticprivate |
Definition at line 188 of file AssetLibrary.h.
Referenced by GetRandomFoliageType(), and SetupFoliageDataAsset().
|
staticprivate |
Definition at line 186 of file AssetLibrary.h.
Referenced by SetupFoliageDataAsset(), and SpawnFoliage().
|
staticprivate |
Definition at line 191 of file AssetLibrary.h.
Referenced by GetPropActorAssetMapDataAsset(), SetupPropDataAsset(), and SpawnProp().
|
staticprivate |
Definition at line 194 of file AssetLibrary.h.
Referenced by GetRandomPropType(), and SetupPropDataAsset().
|
staticprivate |
Definition at line 193 of file AssetLibrary.h.
Referenced by SetupPropDataAsset(), and SpawnProp().
|
staticprivate |
Definition at line 192 of file AssetLibrary.h.
Referenced by GetAllAddedPropActors(), SetupPropDataAsset(), and SpawnProp().
|
staticprivate |
Definition at line 182 of file AssetLibrary.h.
Referenced by GetSpawnedVehicles(), and SpawnVehicle().
|
staticprivate |
Definition at line 198 of file AssetLibrary.h.
Referenced by GetAllWalkers(), and SpawnWalker().
|
staticprivate |
Definition at line 181 of file AssetLibrary.h.
Referenced by SetupVehicleDataAsset(), and SpawnVehicle().
|
staticprivate |
Definition at line 197 of file AssetLibrary.h.
Referenced by GetWalkerActorAssetMapDataAsset(), SetupWalkerDataAsset(), and SpawnWalker().