RuntimeMeshShapeGenerator.h
Go to the documentation of this file.
1 // Copyright 2016-2018 Chris Conway (Koderz). All Rights Reserved.
2 
3 #pragma once
4 
5 #include "CoreMinimal.h"
6 #include "Kismet/BlueprintFunctionLibrary.h"
8 #include "RuntimeMeshBlueprint.h"
9 #include "RuntimeMeshBuilder.h"
10 #include "RuntimeMeshShapeGenerator.generated.h"
11 
12 typedef TFunction<void(const FVector& Position, const FVector& Normal, const FRuntimeMeshTangent& Tangent, const FVector2D& UV0)> FVerticesBuilderFunction;
13 typedef TFunction<void(int32 Index)> FTrianglesBuilderFunction;
14 
18 UCLASS()
19 class RUNTIMEMESHCOMPONENT_API URuntimeMeshShapeGenerator : public UBlueprintFunctionLibrary
20 {
21  GENERATED_BODY()
22 
23 public:
24 
26  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
27  static void ConvertQuadToTriangles(UPARAM(ref) TArray<int32>& Triangles, int32 Vert0, int32 Vert1, int32 Vert2, int32 Vert3);
28 
29 
31  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
32  static void CreateBoxMesh(FVector BoxRadius, TArray<FVector>& Vertices, TArray<int32>& Triangles, TArray<FVector>& Normals, TArray<FVector2D>& UVs, TArray<FRuntimeMeshTangent>& Tangents);
33 
34  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
35  static void CreateBoxMeshPacked(FVector BoxRadius, TArray<FRuntimeMeshBlueprintVertexSimple>& Vertices, TArray<int32>& Triangles);
36 
37  static void CreateBoxMesh(FVector BoxRadius, TArray<FRuntimeMeshVertexSimple>& Vertices, TArray<int32>& Triangles);
38 
39  static void CreateBoxMesh(FVector BoxRadius, const TSharedPtr<FRuntimeMeshAccessor>& MeshBuilder);
40 
41  static void CreateBoxMesh(FVector BoxRadius, FRuntimeMeshAccessor& MeshBuilder);
42 
50  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
51  static void CreateGridMeshTriangles(int32 NumX, int32 NumY, bool bWinding, TArray<int32>& Triangles);
52 
56  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
57  static void CreateGridMesh(float Width, float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, TArray<FVector>& Vertices, TArray<int32>& Triangles, TArray<FVector>& Normals, TArray<FVector2D>& UVs, TArray<FRuntimeMeshTangent>& Tangents);
58 
59  UFUNCTION(BlueprintCallable, Category = "Components|RuntimeMesh")
60  static void CreateGridMeshPacked(float Width, float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, TArray<FRuntimeMeshBlueprintVertexSimple>& Vertices, TArray<int32>& Triangles);
61 
62  static void CreateGridMesh(float Width, float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, TArray<FRuntimeMeshVertexSimple>& Vertices, TArray<int32>& Triangles);
63 
64  static void CreateGridMesh(float Width, float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, const TSharedPtr<FRuntimeMeshAccessor>& MeshBuilder);
65 
66 
67 
68 public:
69 
70  static void ConvertQuadToTriangles(TFunction<void(int32 Index)> TrianglesBuilder, int32 Vert0, int32 Vert1, int32 Vert2, int32 Vert3);
71 
72  static void CreateBoxMesh(FVector BoxRadius, FVerticesBuilderFunction VerticesBuilder, FTrianglesBuilderFunction TrianglesBuilder);
73 
74  static void CreateGridMeshTriangles(int32 NumX, int32 NumY, bool bWinding, FTrianglesBuilderFunction TrianglesBuilder);
75 
76  static void CreateGridMesh(float Width, float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, FVerticesBuilderFunction VerticesBuilder, FTrianglesBuilderFunction TrianglesBuilder);
77 
78 };
TFunction< void(const FVector &Position, const FVector &Normal, const FRuntimeMeshTangent &Tangent, const FVector2D &UV0)> FVerticesBuilderFunction
TFunction< void(int32 Index)> FTrianglesBuilderFunction
GLint ref


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:41