Commit 912a593d by Kai Westerkamp

added Tile Array to contetn

parent 013f4714
......@@ -19,6 +19,12 @@ void ATilesetActor::BeginPlay()
downloader->GetTileContent(this, rootTileset, host);
}
void ATilesetActor::Tick(float DeltaSeconds)
{
}
FTileset* ATilesetActor::parseTileset(FString JsonString, FString BaseURL)
{
//TODO error Handling
......@@ -88,6 +94,7 @@ void ATilesetActor::parseBatched3DTile(const TArray<uint8> data, FTile * tile)
int GLTFstart = b3dmheader->getGLTFStart();
gltf->loadModel(&data.GetData()[GLTFstart], (data.Num() - GLTFstart));
tile->content.tiles.Add(gltf);
}
}
......@@ -144,7 +151,9 @@ void ATilesetActor::parseInstanced3DTile(const TArray<uint8> data, FTile * tile)
clone->SetActorTransform(FTransform(NEU));
}
tile->content.tiles.Add(clone);
}
tile->content.tiles.Add(gltf);
gltf->SetActorTransform(FTransform(positons[0]));
outputString += "]";
UE_LOG(TILES, Warning, TEXT("InStanced 3D Model Positions %s"), *outputString);
......
......@@ -3,7 +3,6 @@
#pragma once
#include "UObject/NoExportTypes.h"
#include "Tileset.generated.h"
......@@ -90,6 +89,7 @@ struct FTileContent
TArray<uint8> content;
struct FTileset *tileset;
TArray<class AProceduralEntity*> tiles;
FTileContent() {
tileset = nullptr;
......@@ -288,6 +288,9 @@ public:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick(float DeltaSeconds) override;
FTileset* parseTileset(FString JsonString, FString BaseURL);
void parse3DTile(const TArray<uint8> data, FTile *tile);
......
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