NVIDIA DeepLearning Dataset Synthesizer (NDDS)
 All Classes Namespaces Functions Variables Typedefs Pages
NVSceneMarker.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 "GameFramework/Actor.h"
14 #include "NVSceneMarker.generated.h"
15 
16 DECLARE_LOG_CATEGORY_EXTERN(LogNVSceneMaker, Log, All)
17 ///
18 /// Base interface for object that can be placed in the map as marker for other actors
19 ///
20 UINTERFACE()
21 class NVSCENECAPTURER_API UNVSceneMarkerInterface : public UInterface
22 {
23  GENERATED_UINTERFACE_BODY()
24 };
25 
27 
28 ///
29 /// Base interface for object that can be placed in the map as marker for other actors
30 ///
31 class NVSCENECAPTURER_API INVSceneMarkerInterface
32 {
33  GENERATED_IINTERFACE_BODY()
34 
35 public:
36  virtual FNVSceneMarkerComponent& GetSceneMarkerComponent() = 0;
37  virtual const FNVSceneMarkerComponent& GetSceneMarkerComponent() const;
38 
39  bool IsActive() const;
40  void AddObserver(AActor* NewObserver);
41  void RemoveAllObservers();
42 
43 protected:
44  virtual void OnObserverAdded(AActor* NewObserver);
45  virtual void OnObserverRemoved(AActor* NewObserver);
46 };
47 
48 #define NV_DECLARE_SCENE_MARKER_INTERFACE(ComponentName) \
49  virtual FNVSceneMarkerComponent& GetSceneMarkerComponent() final { return this->ComponentName; } \
50  FNVSceneMarkerComponent const& GetSceneMarkerComponent() const { return this->ComponentName; }
51 
52 //============================================== FNVSceneMarkerComponent ==============================================
53 ///
54 /// Anchor for point of interest in map.
55 ///
56 USTRUCT(BlueprintType)
57 struct NVSCENECAPTURER_API FNVSceneMarkerComponent
58 {
59  GENERATED_BODY()
60 
61 public:
62  FNVSceneMarkerComponent();
63 
64  bool AddObserver(AActor* NewObserver);
65  AActor* RemoveObserver();
66 
67 public: // Editor properties
68  // ToDo: move to protected.
69  /// Scene markers can be manually deactivated via toggling the IsActive attribute to allow the user to control which subset of scene markers gets captured and exported.
70  UPROPERTY(EditAnywhere)
71  bool bIsActive;
72 protected: // Editor properties
73  UPROPERTY(EditAnywhere)
74  FString DisplayName;
75 
76  UPROPERTY(EditAnywhere)
77  FString Description;
78 
79 protected: // Transient properties
80  UPROPERTY(Transient)
81  TArray<AActor*> Observers;
82 };
Base interface for object that can be placed in the map as marker for other actors.
Definition: NVSceneMarker.h:31
Anchor for point of interest in map.
Definition: NVSceneMarker.h:57
Base interface for object that can be placed in the map as marker for other actors.
Definition: NVSceneMarker.h:21