Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MultiLine
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
MultiLine
Commits
b7bac23a
Commit
b7bac23a
authored
4 years ago
by
Kamil Karwacki
Browse files
Options
Downloads
Patches
Plain Diff
see diff for changes that were made
parent
818cd961
Branches
KamilBranch
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/MultiLine/Private/MultiLineActor.cpp
+4
-4
4 additions, 4 deletions
Source/MultiLine/Private/MultiLineActor.cpp
Source/MultiLine/Public/LineProps.h
+2
-2
2 additions, 2 deletions
Source/MultiLine/Public/LineProps.h
with
6 additions
and
6 deletions
Source/MultiLine/Private/MultiLineActor.cpp
+
4
−
4
View file @
b7bac23a
...
@@ -22,7 +22,7 @@ AMultiLineActor::AMultiLineActor()
...
@@ -22,7 +22,7 @@ AMultiLineActor::AMultiLineActor()
#pragma optimize( "", off )
#pragma optimize( "", off )
void
AMultiLineActor
::
CreateMesh
(
TArray
<
LineProps
>
&
lines
,
bool
has_collision_context
)
void
AMultiLineActor
::
CreateMesh
(
TArray
<
LineProps
>
&
lines
,
bool
has_collision_context
)
{
{
TArray
<
F
Linear
Color
>
vertex_colors
;
TArray
<
FColor
>
vertex_colors
;
FOccluderVertexArray
vertices
;
FOccluderVertexArray
vertices
;
TArray
<
int32
>
triangles
;
TArray
<
int32
>
triangles
;
auto
index_offset
=
0
;
auto
index_offset
=
0
;
...
@@ -50,7 +50,7 @@ void AMultiLineActor::CreateMesh(TArray<LineProps> & lines, bool has_collision_c
...
@@ -50,7 +50,7 @@ void AMultiLineActor::CreateMesh(TArray<LineProps> & lines, bool has_collision_c
auto
uv
=
TArray
<
FVector2D
>
();
auto
uv
=
TArray
<
FVector2D
>
();
auto
tangents
=
TArray
<
FProcMeshTangent
>
();
auto
tangents
=
TArray
<
FProcMeshTangent
>
();
FOccluderVertexArray
normals
;
FOccluderVertexArray
normals
;
mesh_
->
CreateMeshSection
_LinearColor
(
0
,
vertices
,
triangles
,
normals
,
uv
,
vertex_colors
,
tangents
,
false
);
mesh_
->
CreateMeshSection
(
0
,
vertices
,
triangles
,
normals
,
uv
,
vertex_colors
,
tangents
,
false
);
mesh_
->
ContainsPhysicsTriMeshData
(
false
);
mesh_
->
ContainsPhysicsTriMeshData
(
false
);
mesh_
->
SetMaterial
(
0
,
dynamic_cast
<
UMaterialInterface
*>
(
material_
));
mesh_
->
SetMaterial
(
0
,
dynamic_cast
<
UMaterialInterface
*>
(
material_
));
...
@@ -58,7 +58,7 @@ void AMultiLineActor::CreateMesh(TArray<LineProps> & lines, bool has_collision_c
...
@@ -58,7 +58,7 @@ void AMultiLineActor::CreateMesh(TArray<LineProps> & lines, bool has_collision_c
void
AMultiLineActor
::
UpdateMesh
(
const
TArray
<
LineProps
>
&
lines
)
void
AMultiLineActor
::
UpdateMesh
(
const
TArray
<
LineProps
>
&
lines
)
{
{
TArray
<
F
Linear
Color
>
vertex_colors
;
TArray
<
FColor
>
vertex_colors
;
FOccluderVertexArray
vertices
;
FOccluderVertexArray
vertices
;
for
(
auto
&
line
:
lines
)
{
for
(
auto
&
line
:
lines
)
{
CreateVertices
(
line
,
vertices
);
CreateVertices
(
line
,
vertices
);
...
@@ -70,7 +70,7 @@ void AMultiLineActor::UpdateMesh(const TArray<LineProps> & lines)
...
@@ -70,7 +70,7 @@ void AMultiLineActor::UpdateMesh(const TArray<LineProps> & lines)
auto
uv
=
TArray
<
FVector2D
>
();
auto
uv
=
TArray
<
FVector2D
>
();
auto
tangents
=
TArray
<
FProcMeshTangent
>
();
auto
tangents
=
TArray
<
FProcMeshTangent
>
();
FOccluderVertexArray
normals
;
FOccluderVertexArray
normals
;
mesh_
->
UpdateMeshSection
_LinearColor
(
0
,
vertices
,
normals
,
uv
,
vertex_colors
,
tangents
);
mesh_
->
UpdateMeshSection
(
0
,
vertices
,
normals
,
uv
,
vertex_colors
,
tangents
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Source/MultiLine/Public/LineProps.h
+
2
−
2
View file @
b7bac23a
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
struct
LineProps
struct
LineProps
{
{
LineProps
(){}
LineProps
(){}
LineProps
(
TArray
<
FVector
>
&
p
,
F
Linear
Color
color
,
float
w
)
:
points
(
p
),
linear_color
(
color
),
width
(
w
)
LineProps
(
TArray
<
FVector
>
&
p
,
FColor
color
,
float
w
)
:
points
(
p
),
linear_color
(
color
),
width
(
w
)
{}
{}
TArray
<
FVector
>
points
;
TArray
<
FVector
>
points
;
F
Linear
Color
linear_color
;
FColor
linear_color
;
float
width
;
float
width
;
};
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment