NVIDIA DeepLearning Dataset Synthesizer (NDDS)
 All Classes Namespaces Functions Variables Typedefs Pages
RandomMeshComponent.h
1 /*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10 
11 #pragma once
12 
13 #include "DomainRandomizationDNNPCH.h"
14 #include "RandomComponentBase.h"
15 #include "DRUtils.h"
16 #include "RandomMeshComponent.generated.h"
17 
18 /// @cond DOXYGEN_SUPPRESSED_CODE
19 UCLASS(Blueprintable, ClassGroup = (NVIDIA), meta = (BlueprintSpawnableComponent))
20 /// @endcond DOXYGEN_SUPPRESSED_CODE
21 class DOMAINRANDOMIZATIONDNN_API URandomMeshComponent : public URandomComponentBase
22 {
23  GENERATED_BODY()
24 
25 public:
27 
28 protected:
29  virtual void BeginPlay() override;
30  virtual void OnRandomization_Implementation() override;
31  bool HasMeshToRandomize() const;
32 
33 protected: // Editor properties
34  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization)
35  bool bUseAllMeshInDirectories;
36 
37  // List of directories where we want to use the static meshes from
38  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization, meta = (EditCondition = "bUseAllMeshInDirectories", RelativeToGameContentDir))
39  TArray<FDirectoryPath> MeshDirectories;
40 
41  // List of the StaticMesh that the actor will change through
42  UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Randomization, meta = (EditCondition = "!bUseAllMeshInDirectories"))
43  TArray<UStaticMesh*> StaticMeshList;
44 
45 protected: // Transient properties
46  UPROPERTY(Transient)
47  FRandomAssetStreamer MeshStreamer;
48 };