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
6e1ee0e8
Commit
6e1ee0e8
authored
Apr 20, 2017
by
wester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i3dm start
parent
c87f5748
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
8 deletions
+17
-8
Minimal_Default.umap
Content/MobileStarterContent/Maps/Minimal_Default.umap
+0
-0
Minimal_Default_BuiltData.uasset
...obileStarterContent/Maps/Minimal_Default_BuiltData.uasset
+0
-0
melted-ice-surface-darker-texture-4096x2048.uasset
...erials/melted-ice-surface-darker-texture-4096x2048.uasset
+0
-0
Tileset.cpp
Source/MasterTestProject/Tileset.cpp
+14
-5
ProceduralEntity.cpp
Source/MasterTestProject/ue4-assimp/ProceduralEntity.cpp
+3
-3
No files found.
Content/MobileStarterContent/Maps/Minimal_Default.umap
View file @
6e1ee0e8
No preview for this file type
Content/MobileStarterContent/Maps/Minimal_Default_BuiltData.uasset
View file @
6e1ee0e8
No preview for this file type
Content/materials/melted-ice-surface-darker-texture-4096x2048.uasset
View file @
6e1ee0e8
No preview for this file type
Source/MasterTestProject/Tileset.cpp
View file @
6e1ee0e8
...
@@ -67,7 +67,7 @@ void ATilesetActor::Tick(float DeltaSeconds)
...
@@ -67,7 +67,7 @@ void ATilesetActor::Tick(float DeltaSeconds)
double
SSE2
=
tile
->
geometricError
*
C
;
double
SSE2
=
tile
->
geometricError
*
C
;
//UE_LOG(TILES, Error, TEXT("SSError= %f,SSE2= %f, GeoError = %f, Dist %f"), ScreenSpaceError1, SSE2, tile.geometricError, dist);
}
}
...
@@ -78,8 +78,16 @@ double FTile::getScreenSpaceError(double lambda, FVector CamLocation)
...
@@ -78,8 +78,16 @@ double FTile::getScreenSpaceError(double lambda, FVector CamLocation)
FVector
ActorPos
=
FTransform
(
*
this
->
getAbsoluteTransform
()).
GetTranslation
();
FVector
ActorPos
=
FTransform
(
*
this
->
getAbsoluteTransform
()).
GetTranslation
();
double
dist
=
(
CamLocation
-
ActorPos
).
Size
();
double
dist
=
(
CamLocation
-
ActorPos
).
Size
();
if
(
content
.
url
.
EndsWith
(
"i3d"
))
{
}
//SSE http://folk.uio.no/inftt/Div/visualization2.pdf
//SSE http://folk.uio.no/inftt/Div/visualization2.pdf
return
lambda
*
this
->
geometricError
/
dist
;
double
sse
=
lambda
*
this
->
geometricError
/
dist
;
//UE_LOG(TILES, Error, TEXT("sse = %f, geoE = %f Dist %f"), sse, this->geometricError, dist);
return
sse
;
}
}
void
FTile
::
setVisible
(
bool
visible
)
void
FTile
::
setVisible
(
bool
visible
)
...
@@ -87,6 +95,7 @@ void FTile::setVisible(bool visible)
...
@@ -87,6 +95,7 @@ void FTile::setVisible(bool visible)
if
(
content
.
tiles
.
Num
()
==
0
&&
!
content
.
tileset
)
{
if
(
content
.
tiles
.
Num
()
==
0
&&
!
content
.
tileset
)
{
if
(
!
content
.
loadingStarted
&&
visible
&&
!
content
.
url
.
IsEmpty
())
{
if
(
!
content
.
loadingStarted
&&
visible
&&
!
content
.
url
.
IsEmpty
())
{
if
(
parentTilset
)
{
if
(
parentTilset
)
{
UTileDownloader
*
downloader
=
NewObject
<
UTileDownloader
>
(
UTileDownloader
::
StaticClass
());
UTileDownloader
*
downloader
=
NewObject
<
UTileDownloader
>
(
UTileDownloader
::
StaticClass
());
downloader
->
GetTileContent
(
parentTilset
->
parentActor
,
&
content
,
parentTilset
->
absoluteURL
,
this
);
downloader
->
GetTileContent
(
parentTilset
->
parentActor
,
&
content
,
parentTilset
->
absoluteURL
,
this
);
...
@@ -112,16 +121,13 @@ void FTile::setVisible(bool visible)
...
@@ -112,16 +121,13 @@ void FTile::setVisible(bool visible)
void
ATilesetActor
::
updateScreenSpaceError
(
FTile
*
current
,
double
currentSSE
,
double
constant
,
FVector
CamLocation
)
void
ATilesetActor
::
updateScreenSpaceError
(
FTile
*
current
,
double
currentSSE
,
double
constant
,
FVector
CamLocation
)
{
{
double
ScreenSpaceError1
=
current
->
getScreenSpaceError
(
constant
,
CamLocation
);
double
ScreenSpaceError1
=
current
->
getScreenSpaceError
(
constant
,
CamLocation
);
if
(
ScreenSpaceError1
>
LODtreshold
&&
current
->
children
.
Num
()
>
0
)
{
if
(
ScreenSpaceError1
>
LODtreshold
&&
current
->
children
.
Num
()
>
0
)
{
for
(
FTile
*
child
:
current
->
children
)
for
(
FTile
*
child
:
current
->
children
)
{
{
updateScreenSpaceError
(
child
,
0
,
constant
,
CamLocation
);
updateScreenSpaceError
(
child
,
0
,
constant
,
CamLocation
);
}
}
current
->
setVisible
(
false
);
current
->
setVisible
(
false
);
}
}
else
{
else
{
...
@@ -203,6 +209,8 @@ void ATilesetActor::parseTile(TSharedPtr<FJsonObject> json, FTile *targetTile, F
...
@@ -203,6 +209,8 @@ void ATilesetActor::parseTile(TSharedPtr<FJsonObject> json, FTile *targetTile, F
UE_LOG
(
TILES
,
Log
,
TEXT
(
"Parsed Tile %s: Success:%s Version:
\"
%s
\"
no Childs "
),
*
targetTile
->
content
.
url
,
success
?
TEXT
(
"True"
)
:
TEXT
(
"False"
),
*
targetTile
->
content
.
url
);
UE_LOG
(
TILES
,
Log
,
TEXT
(
"Parsed Tile %s: Success:%s Version:
\"
%s
\"
no Childs "
),
*
targetTile
->
content
.
url
,
success
?
TEXT
(
"True"
)
:
TEXT
(
"False"
),
*
targetTile
->
content
.
url
);
}
}
}
}
void
ATilesetActor
::
parseBatched3DTile
(
const
TArray
<
uint8
>
data
,
FTile
*
tile
)
void
ATilesetActor
::
parseBatched3DTile
(
const
TArray
<
uint8
>
data
,
FTile
*
tile
)
...
@@ -304,6 +312,7 @@ void ATilesetActor::parseInstanced3DTile(const TArray<uint8> data, FTile * tile)
...
@@ -304,6 +312,7 @@ void ATilesetActor::parseInstanced3DTile(const TArray<uint8> data, FTile * tile)
void
ATilesetActor
::
parse3DTile
(
const
TArray
<
uint8
>
data
,
FTile
*
tile
)
void
ATilesetActor
::
parse3DTile
(
const
TArray
<
uint8
>
data
,
FTile
*
tile
)
{
{
TileHeader
*
header
=
(
TileHeader
*
)
data
.
GetData
();
TileHeader
*
header
=
(
TileHeader
*
)
data
.
GetData
();
tile
->
content
.
content
=
data
;
UE_LOG
(
TILES
,
Warning
,
TEXT
(
"Shared Tile Header: Magic: %s Version %d lenght %d, array lenght %d "
),
*
header
->
getMagicAsFString
(),
header
->
version
,
header
->
byteLength
,
data
.
Num
());
UE_LOG
(
TILES
,
Warning
,
TEXT
(
"Shared Tile Header: Magic: %s Version %d lenght %d, array lenght %d "
),
*
header
->
getMagicAsFString
(),
header
->
version
,
header
->
byteLength
,
data
.
Num
());
...
...
Source/MasterTestProject/ue4-assimp/ProceduralEntity.cpp
View file @
6e1ee0e8
...
@@ -307,9 +307,9 @@ AProceduralEntity* AProceduralEntity::clone(const FVector position)
...
@@ -307,9 +307,9 @@ AProceduralEntity* AProceduralEntity::clone(const FVector position)
void
AProceduralEntity
::
setActorDisabled
(
bool
disabled
)
void
AProceduralEntity
::
setActorDisabled
(
bool
disabled
)
{
{
this
->
SetActorHiddenInGame
(
disabled
);
this
->
SetActorHiddenInGame
(
disabled
);
this
->
SetActorEnableCollision
(
!
disabled
);
this
->
SetActorEnableCollision
(
!
disabled
);
this
->
SetActorTickEnabled
(
!
disabled
);
this
->
SetActorTickEnabled
(
!
disabled
);
}
}
UMaterialInterface
*
AProceduralEntity
::
GetMaterialForIndex
(
unsigned
int
index
,
const
aiScene
*
scene
){
UMaterialInterface
*
AProceduralEntity
::
GetMaterialForIndex
(
unsigned
int
index
,
const
aiScene
*
scene
){
...
...
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