NVIDIA DeepLearning Dataset Synthesizer (NDDS)
 All Classes Namespaces Functions Variables Typedefs Pages
RandomDataObject.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 "RandomDataObject.generated.h"
15 
16 //====================== URandomDataObject ======================
17 UCLASS(Blueprintable, DefaultToInstanced, editinlinenew, Abstract, ClassGroup = (NVIDIA))
18 class DOMAINRANDOMIZATIONDNN_API URandomDataObject : public UObject
19 {
20  GENERATED_BODY()
21 
22 public:
24 
25  bool ShouldRandomize() const;
26  virtual void OnRandomization();
27 
28 protected:
29  UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Randomization)
30  bool bShouldRandomize;
31 };
32 
33 UCLASS(Blueprintable, DefaultToInstanced, editinlinenew, ClassGroup = (NVIDIA))
34 class DOMAINRANDOMIZATIONDNN_API URandomMovementDataObject : public URandomDataObject
35 {
36  GENERATED_BODY()
37 
38 public:
40 
41  virtual void OnRandomization() override;
42 
43 protected:
44  // If true, the owner will be moving around its original location
45  // Otherwise the random location will be selected in the RandomLocationVolume
46  UPROPERTY(EditAnywhere, Category = Randomization)
47  bool bRelatedToOriginLocation;
48 
49  UPROPERTY(EditAnywhere, meta = (EditCondition = "bRelatedToOriginLocation"), Category = Randomization)
50  FRandomLocationData RandomLocationData;
51 
52  // If true, the location will be picked along the object's axes instead of the world axes
53  UPROPERTY(EditAnywhere, meta = (EditCondition = "bRelatedToOriginLocation"), Category = Randomization)
54  bool bUseObjectAxesInsteadOfWorldAxes;
55 
56  // The volume to choose a random location from
57  UPROPERTY(EditAnywhere, meta = (EditCondition = "!bRelatedToOriginLocation"), Category = Randomization)
58  AVolume* RandomLocationVolume;
59 
60  // If true, the actor will instantly teleport whenever location changed
61  // otherwise the object will move toward the new location with speed in the RandomSpeedRange
62  UPROPERTY(EditAnywhere, Category = Randomization)
63  bool bShouldTeleport;
64 
65  UPROPERTY(EditAnywhere, meta = (EditCondition = "!bShouldTeleport"), Category = Randomization)
66  FFloatInterval RandomSpeedRange;
67 };
68 
69 UCLASS(ClassGroup = (NVIDIA))
70 class DOMAINRANDOMIZATIONDNN_API URandomRotationDataObject : public URandomDataObject
71 {
72  GENERATED_BODY()
73 
74 public:
76 
77  virtual void OnRandomization() override;
78 
79 protected:
80  UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Randomization)
81  FRandomRotationData RandomRotationData;
82 
83  // If true, the owner will be rotated around its original rotation
84  // Otherwise the random rotation will be around the Zero rotation
85  UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Randomization)
86  bool bRelatedToOriginRotation;
87 
88  // TODO: Add support for rotation speed for linear rotation instead of instantly change
89 };