5 #include "CoreMinimal.h" 6 #include "Kismet/BlueprintFunctionLibrary.h" 10 #include "RuntimeMeshShapeGenerator.generated.h" 12 typedef TFunction<void(const FVector& Position, const FVector& Normal, const FRuntimeMeshTangent& Tangent, const FVector2D& UV0)>
FVerticesBuilderFunction;
26 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMesh")
27 static void ConvertQuadToTriangles(UPARAM(
ref) TArray<int32>& Triangles, int32 Vert0, int32 Vert1, int32 Vert2, int32 Vert3);
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);
34 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMesh")
35 static void CreateBoxMeshPacked(FVector BoxRadius, TArray<FRuntimeMeshBlueprintVertexSimple>& Vertices, TArray<int32>& Triangles);
37 static void CreateBoxMesh(FVector BoxRadius, TArray<FRuntimeMeshVertexSimple>& Vertices, TArray<int32>& Triangles);
39 static void CreateBoxMesh(FVector BoxRadius,
const TSharedPtr<FRuntimeMeshAccessor>& MeshBuilder);
50 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMesh")
51 static void CreateGridMeshTriangles(int32 NumX, int32 NumY,
bool bWinding, TArray<int32>& Triangles);
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);
59 UFUNCTION(BlueprintCallable, Category =
"Components|RuntimeMesh")
60 static void CreateGridMeshPacked(
float Width,
float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, TArray<FRuntimeMeshBlueprintVertexSimple>& Vertices, TArray<int32>& Triangles);
62 static void CreateGridMesh(
float Width,
float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY, TArray<FRuntimeMeshVertexSimple>& Vertices, TArray<int32>& Triangles);
64 static void CreateGridMesh(
float Width,
float Height, int32 NumSubdivisionsX, int32 NumSubdivisionsY,
const TSharedPtr<FRuntimeMeshAccessor>& MeshBuilder);
70 static void ConvertQuadToTriangles(TFunction<
void(int32
Index)> TrianglesBuilder, int32 Vert0, int32 Vert1, int32 Vert2, int32 Vert3);
TFunction< void(const FVector &Position, const FVector &Normal, const FRuntimeMeshTangent &Tangent, const FVector2D &UV0)> FVerticesBuilderFunction
TFunction< void(int32 Index)> FTrianglesBuilderFunction