Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Neumann committed Jun 23, 2022
2 parents 9873415 + bbb6a5a commit 591ccf9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
URoboVision
=====

### UE Version: **4.27**

Plugin with a CameraActor that captures RGB-D data and sends it out over TCP.

Usage
Expand Down
10 changes: 6 additions & 4 deletions Source/URoboVision/Private/RGBDCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#else
#include "ConstructorHelpers.h"
#endif

#include "EngineUtils.h"
#include "StopTime.h"
#include "Server.h"
Expand Down Expand Up @@ -485,7 +484,6 @@ void ARGBDCamera::ReadImage(UTextureRenderTarget2D *RenderTarget, TArray<FFloat1

void ARGBDCamera::ReadColorImage(UTextureRenderTarget2D *RenderTarget, TArray<FColor> &ImageData) const
{

int32 RT_Width = RenderTarget->SizeX, RT_Height = RenderTarget->SizeY;
FTextureRenderTargetResource* RenderTargetResource;
ImageData.AddZeroed(RT_Width * RT_Height);
Expand Down Expand Up @@ -618,13 +616,17 @@ bool ARGBDCamera::ColorObject(AActor *Actor, const FString &name)
{
return false;
}
TArray<UActorComponent*> SegmentationComponents = Actor->GetComponentsByClass(USegmentationComponent::StaticClass());
//TArray<UActorComponent*> SegmentationComponents = Actor->GetComponentsByClass(USegmentationComponent::StaticClass());
TArray<UActorComponent*> SegmentationComponents;
Actor->GetComponents(USegmentationComponent::StaticClass(), SegmentationComponents);
if (SegmentationComponents.Num() != 0)
{
return false;
}

TArray<UActorComponent*> MeshComponents = Actor->GetComponentsByClass(UMeshComponent::StaticClass());
//TArray<UActorComponent*> MeshComponents = Actor->GetComponentsByClass(UMeshComponent::StaticClass());
TArray<UActorComponent*> MeshComponents;
Actor->GetComponents(UMeshComponent::StaticClass(), MeshComponents);
for (UActorComponent* Component : MeshComponents)
{
UMeshComponent* MeshComponent = Cast<UMeshComponent>(Component);
Expand Down
3 changes: 1 addition & 2 deletions Source/URoboVision/Private/SegmentationComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#else
#include "ConstructorHelpers.h"
#endif

#include "EngineUtils.h"
#include "StopTime.h"
#include "Server.h"
Expand Down Expand Up @@ -104,7 +103,7 @@ FPrimitiveSceneProxy* USegmentationComponent::CreateSceneProxy(USkeletalMeshComp
ERHIFeatureLevel::Type SceneFeatureLevel = GetWorld()->FeatureLevel;
FSkeletalMeshRenderData* SkelMeshRenderData = SkeletalMeshComponent->GetSkeletalMeshRenderData();
if (SkelMeshRenderData &&
SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->PredictedLODLevel) &&
SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->GetPredictedLODLevel()) &&
SkeletalMeshComponent->MeshObject)
{
return new FSkeletalSegmentationSceneProxy(SkeletalMeshComponent, SkelMeshRenderData, ProxyMaterial);
Expand Down

0 comments on commit 591ccf9

Please sign in to comment.