Skip to content
Snippets Groups Projects
Commit b7bac23a authored by Kamil Karwacki's avatar Kamil Karwacki
Browse files

see diff for changes that were made

parent 818cd961
Branches KamilBranch
No related tags found
No related merge requests found
...@@ -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<FLinearColor> 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<FLinearColor> 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);
} }
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
struct LineProps struct LineProps
{ {
LineProps(){} LineProps(){}
LineProps(TArray<FVector> & p, FLinearColor 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;
FLinearColor linear_color; FColor linear_color;
float width; float width;
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment