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
d60d7614
Commit
d60d7614
authored
Mar 21, 2017
by
wester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests
parent
e766759e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
Minimal_Default.umap
Content/MobileStarterContent/Maps/Minimal_Default.umap
+0
-0
Minimal_Default_BuiltData.uasset
...obileStarterContent/Maps/Minimal_Default_BuiltData.uasset
+0
-0
TileDownloader.cpp
Source/MasterTestProject/TileDownloader.cpp
+1
-0
Tileset.cpp
Source/MasterTestProject/Tileset.cpp
+15
-5
Tileset.h
Source/MasterTestProject/Tileset.h
+1
-1
No files found.
Content/MobileStarterContent/Maps/Minimal_Default.umap
View file @
d60d7614
No preview for this file type
Content/MobileStarterContent/Maps/Minimal_Default_BuiltData.uasset
View file @
d60d7614
No preview for this file type
Source/MasterTestProject/TileDownloader.cpp
View file @
d60d7614
...
...
@@ -23,6 +23,7 @@ void UTileDownloader::OnResponseReceived(FHttpRequestPtr Request, FHttpResponseP
UE_LOG
(
TILES
,
Warning
,
TEXT
(
"Parsed Tilset: %s Scucess: %s "
),
*
Request
->
GetURL
(),
bWasSuccessful
?
TEXT
(
"True"
)
:
TEXT
(
"False"
));
}
else
{
FString
url
=
Request
->
GetURL
();
actor
->
parseTile
(
Response
->
GetContent
(),
parentTile
);
UE_LOG
(
TILES
,
Warning
,
TEXT
(
"Parsed Tile: %s Scucess: %s "
),
*
Request
->
GetURL
(),
bWasSuccessful
?
TEXT
(
"True"
)
:
TEXT
(
"False"
));
...
...
Source/MasterTestProject/Tileset.cpp
View file @
d60d7614
...
...
@@ -33,7 +33,7 @@ FTileset* ATilesetActor::parseTileset(FString JsonString, FString BaseURL)
TSharedPtr
<
FJsonObject
>
root
=
JsonParsed
->
GetObjectField
(
"root"
);
ATilesetActor
::
parseTile
(
root
,
&
tileset
->
root
,
tileset
);
//UE_LOG(TILES, Warning, TEXT("Parsed: Success:%s Version:\"%s\" geometricError:%f"), success ? TEXT("True") : TEXT("False"), *tileset.asset.version, tileset.
geometricError);
UE_LOG
(
TILES
,
Warning
,
TEXT
(
"Parsed: Success:%s Version:
\"
%s
\"
geometricError:%f"
),
success
?
TEXT
(
"True"
)
:
TEXT
(
"False"
),
*
tileset
->
asset
.
version
,
tileset
->
geometricError
);
return
tileset
;
}
...
...
@@ -54,12 +54,22 @@ void ATilesetActor::parseTile(const TArray<uint8> data, FTile *tile)
UWorld
*
const
World
=
GetWorld
();
if
(
World
)
{
UE_LOG
(
TILES
,
Log
,
TEXT
(
"TileUrL %s"
),
*
tile
->
content
.
url
);
//FString path = tile->content.url
/* FString path = tile->content.url.Replace(TEXT("\\"), TEXT("/"));
FString basePath, name;
if (!path.Split(TEXT("/"), &basePath, &name, ESearchCase::IgnoreCase, ESearchDir::FromEnd)) {
name = FString(TEXT("Error"));
}*/
//FName(*name);
AProceduralEntity
*
gltf
=
World
->
SpawnActor
<
AProceduralEntity
>
(
AProceduralEntity
::
StaticClass
());
if
(
tile
)
{
for
(
int32
b
=
0
;
b
<
tile
->
transform
.
Num
()
&&
b
<
20
;
b
++
)
{
UE_LOG
(
TILES
,
Log
,
TEXT
(
"Transform %
.2f"
),
tile
->
transform
[
b
]
);
}
//
for (int32 b = 0; b < tile->transform.Num() && b < 20; b++)
//
{
UE_LOG
(
TILES
,
Log
,
TEXT
(
"Transform %
d %s"
),
tile
->
transform
.
Num
(),
*
gltf
->
GetName
()
);
//
}
}
gltf
->
AttachToActor
(
this
,
FAttachmentTransformRules
::
KeepWorldTransform
);
...
...
Source/MasterTestProject/Tileset.h
View file @
d60d7614
...
...
@@ -131,7 +131,7 @@ struct FTile
FTile
()
{
float
transformDefault
[]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
1
.
0
};
transform
.
Empty
();
transform
.
Append
(
transformDefault
,
16
);
//
transform.Append(transformDefault, 16);
}
};
...
...
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