NVIDIA DeepLearning Dataset Synthesizer (NDDS)
 All Classes Namespaces Functions Variables Typedefs Pages
RandomRotationComponent.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 "RandomRotationComponent.generated.h"
16 
17 /// @cond DOXYGEN_SUPPRESSED_CODE
18 UCLASS(Blueprintable, ClassGroup = (NVIDIA), meta = (BlueprintSpawnableComponent))
19 /// @endcond DOXYGEN_SUPPRESSED_CODE
20 class DOMAINRANDOMIZATIONDNN_API URandomRotationComponent : public URandomComponentBase
21 {
22  GENERATED_BODY()
23 
24 public:
26 
27 protected: // Editor properties
28  UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Randomization)
29  FRandomRotationData RandomRotationData;
30 
31  // If true, the owner will be rotated around its original rotation
32  // Otherwise the random rotation will be around the Zero rotation
33  UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Randomization)
34  bool bRelatedToOriginRotation;
35 
36 protected:
37  void BeginPlay() override;
38  void OnRandomization_Implementation() override;
39 
40 protected:
41  UPROPERTY(Transient)
42  FRotator OriginalRotation;
43 };