Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MasterTestProjekt
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
MasterTestProjekt
Commits
912a593d
Commit
912a593d
authored
Apr 18, 2017
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Tile Array to contetn
parent
013f4714
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
Tileset.cpp
Source/MasterTestProject/Tileset.cpp
+9
-0
Tileset.h
Source/MasterTestProject/Tileset.h
+4
-1
No files found.
Source/MasterTestProject/Tileset.cpp
View file @
912a593d
...
...
@@ -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
);
...
...
Source/MasterTestProject/Tileset.h
View file @
912a593d
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment