Commit 6dd2f7f2 by Kai Westerkamp

fixed some bugs with point clouds

parent 45adf7e6
This source diff could not be displayed because it is too large. You can view the blob instead.
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://puu.sh/wkPHs/52fede8ede.png
......@@ -11,8 +11,9 @@ APointCloudActor::APointCloudActor(const FObjectInitializer& ObjectInitializer)
PrimaryActorTick.bCanEverTick = true;
//Create Static Mesh
//static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMeshOb_AW2(TEXT("StaticMesh'/Game/PointClouds/quadchain-2-20.quadchain-2-20'"));
static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMeshOb_AW2(TEXT("StaticMesh'/Game/FirstPersonBP/Blueprints/quadchain-2-20.quadchain-2-20'"));
static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMeshOb_AW2(TEXT("StaticMesh'/Game/PointClouds/quadchain-2-20.quadchain-2-20'"));
//static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMeshOb_AW2(TEXT("StaticMesh'/Game/PointClouds/quadchain.quadchain'"));
//static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMeshOb_AW2(TEXT("StaticMesh'/Game/PointClouds/square.square'"));
StaticMesh = StaticMeshOb_AW2.Object;
StaticMeshComponent = ObjectInitializer.CreateDefaultSubobject < UStaticMeshComponent >(this, TEXT("Poins"));
......
......@@ -408,10 +408,7 @@ void ATilesetActor::parsePointCloudTile(const TArray<uint8> data, FTile * tile)
z = (z - minz) / (maxz - minz);
FLinearColor point = FLinearColor(x,y, z, 1.0f);
Points->Add(point);
//UE_LOG(TILES, Warning, TEXT("%s"),*Points->Last().ToString());
pos += 12;
}
......@@ -425,10 +422,11 @@ void ATilesetActor::parsePointCloudTile(const TArray<uint8> data, FTile * tile)
UE_LOG(TILES, Warning, TEXT("Created Position Texture Number Points %d, TextureSize: %d, Fill: %d"), instances_length, TextureSize, fill);
UE_LOG(TILES, Error, TEXT("Boundig %f Box: Min [%f/%f/%f] Max [%f/%f/%f]"), TNumericLimits< float >::Min(), minx, miny, minz,maxx, maxy, maxz );
if(tstTexture)
/* if(tstTexture)
PointCloud->setPoints(tstTexture);
else*/
PointCloud->setPoints(Texture);
//PointCloud->setPoints(Texture);
//ass texture to mAterial
if (TextureTest) {
UMaterialInstanceDynamic *Material = UMaterialInstanceDynamic::Create(TextureTest->GetStaticMeshComponent()->GetMaterial(0), nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment