RealSenseTestActor.cpp
Go to the documentation of this file.
1 #include "RealSenseTestActor.h"
2 #include "RealSenseUE.h"
3 
4 // wrapper headers
5 #include "RealSensePlugin.h"
6 #include "RealSenseContext.h"
7 #include "RealSenseDevice.h"
8 
9 // native headers (optional)
10 #include "RealSenseNative.h"
11 
13 {
14  PrimaryActorTick.bCanEverTick = true;
15 
16  auto Context = IRealSensePlugin::Get().GetContext();
17  Context->QueryDevices();
18  for (auto Device : Context->Devices)
19  {
20  UE_LOG(LogRealSenseDemo, Display, TEXT("Wrapper device %s"), *(Device->Name));
21  }
22 
23  #if 0
24  rs2::context_ref RsContext(Context->GetHandle());
25  auto DeviceList = RsContext.query_devices();
26  for (auto Device : DeviceList)
27  {
28  FString DevName(ANSI_TO_TCHAR(Device.get_info(RS2_CAMERA_INFO_NAME)));
29  UE_LOG(LogRealSenseDemo, Display, TEXT("Native device %s"), *DevName);
30  }
31  #endif
32 }
33 
35 {
36  Super::BeginPlay();
37 }
38 
39 void ARealSenseTestActor::Tick(float DeltaTime)
40 {
41  Super::Tick(DeltaTime);
42 }
static IRealSensePlugin & Get()
device_list query_devices() const
Definition: rs_context.hpp:112
virtual class URealSenseContext * GetContext()=0
virtual void Tick(float DeltaTime) override
virtual void BeginPlay() override


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:39