UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FMeshShapeGenerator Class Referenceabstract

#include <MeshShapeGenerator.h>

+ Inheritance diagram for UE::Geometry::FMeshShapeGenerator:

Public Member Functions

virtual ~FMeshShapeGenerator ()
 
virtual FMeshShapeGeneratorGenerate ()=0
 
bool HasAttributes () const
 
void ResetAttributes (bool bResetPolygonIDs=false)
 
void Reset ()
 
void SetBufferSizes (int NumVertices, int NumTriangles, int NumUVs, int NumNormals)
 
void ExtendBufferSizes (int AddVertices, int AddTriangles, int AddUVs, int AddNormals)
 
void SetVertex (int Index, const FVector3d &Position)
 
int AppendVertex (const FVector3d &Position)
 
void SetUV (int Index, const FVector2f &UV, int ParentVertex)
 
int AppendUV (const FVector2f &UV, int ParentVertex)
 
void SetNormal (int Index, const FVector3f &Normal, int ParentVertex)
 
int AppendNormal (const FVector3f &Normal, int ParentVertex)
 
void SetTriangle (int Index, const FIndex3i &Tri)
 
void SetTriangle (int Index, int A, int B, int C)
 
void SetTriangle (int Index, int A, int B, int C, bool bClockwiseOverride)
 
int AppendTriangle (int A, int B, int C)
 
void SetTriangleUVs (int Index, const FIndex3i &Tri)
 
void SetTriangleUVs (int Index, int A, int B, int C)
 
void SetTriangleUVs (int Index, int A, int B, int C, bool bClockwiseOverride)
 
void SetTriangleNormals (int Index, const FIndex3i &Tri)
 
void SetTriangleNormals (int Index, int A, int B, int C)
 
void SetTriangleNormals (int Index, int A, int B, int C, bool bClockwiseOverride)
 
void SetTrianglePolygon (int Index, int PolygonID)
 
void SetTriangleWithMatchedUVNormal (int Index, int A, int B, int C)
 

Static Public Member Functions

static FVector3d BilinearInterp (const FVector3d &v00, const FVector3d &v10, const FVector3d &v11, const FVector3d &v01, double tx, double ty)
 
static FVector2d BilinearInterp (const FVector2d &v00, const FVector2d &v10, const FVector2d &v11, const FVector2d &v01, double tx, double ty)
 
static FVector2f BilinearInterp (const FVector2f &v00, const FVector2f &v10, const FVector2f &v11, const FVector2f &v01, float tx, float ty)
 
static FVector3i LinearInterp (const FVector3i &a, const FVector3i &b, double t)
 

Public Attributes

TArray< FVector3dVertices
 
TArray< FVector2fUVs
 
TArray< int > UVParentVertex
 
TArray< FVector3fNormals
 
TArray< int > NormalParentVertex
 
TArray< FIndex3iTriangles
 
TArray< FIndex3iTriangleUVs
 
TArray< FIndex3iTriangleNormals
 
TArray< int > TrianglePolygonIDs
 
bool bReverseOrientation = false
 

Detailed Description

Base class for triangle mesh generators (eg like to generate sphere, cylinder, etc) Subclasses must implement Generate()

Constructor & Destructor Documentation

◆ ~FMeshShapeGenerator()

virtual UE::Geometry::FMeshShapeGenerator::~FMeshShapeGenerator ( )
inlinevirtual

Member Function Documentation

◆ AppendNormal()

int UE::Geometry::FMeshShapeGenerator::AppendNormal ( const FVector3f Normal,
int  ParentVertex 
)
inline

◆ AppendTriangle()

int UE::Geometry::FMeshShapeGenerator::AppendTriangle ( int  A,
int  B,
int  C 
)
inline

◆ AppendUV()

int UE::Geometry::FMeshShapeGenerator::AppendUV ( const FVector2f UV,
int  ParentVertex 
)
inline

◆ AppendVertex()

int UE::Geometry::FMeshShapeGenerator::AppendVertex ( const FVector3d Position)
inline

Append a new vertex at the given Position

◆ BilinearInterp() [1/3]

static FVector2d UE::Geometry::FMeshShapeGenerator::BilinearInterp ( const FVector2d v00,
const FVector2d v10,
const FVector2d v11,
const FVector2d v01,
double  tx,
double  ty 
)
inlinestatic

◆ BilinearInterp() [2/3]

static FVector2f UE::Geometry::FMeshShapeGenerator::BilinearInterp ( const FVector2f v00,
const FVector2f v10,
const FVector2f v11,
const FVector2f v01,
float  tx,
float  ty 
)
inlinestatic

◆ BilinearInterp() [3/3]

static FVector3d UE::Geometry::FMeshShapeGenerator::BilinearInterp ( const FVector3d v00,
const FVector3d v10,
const FVector3d v11,
const FVector3d v01,
double  tx,
double  ty 
)
inlinestatic

◆ ExtendBufferSizes()

void UE::Geometry::FMeshShapeGenerator::ExtendBufferSizes ( int  AddVertices,
int  AddTriangles,
int  AddUVs,
int  AddNormals 
)
inline

Extends the various internal buffers to the correct sizes for the given additional element counts

◆ Generate()

◆ HasAttributes()

bool UE::Geometry::FMeshShapeGenerator::HasAttributes ( ) const
inline

◆ LinearInterp()

static FVector3i UE::Geometry::FMeshShapeGenerator::LinearInterp ( const FVector3i a,
const FVector3i b,
double  t 
)
inlinestatic

◆ Reset()

void UE::Geometry::FMeshShapeGenerator::Reset ( )
inline

clear arrays so that Generate() can be run again

◆ ResetAttributes()

void UE::Geometry::FMeshShapeGenerator::ResetAttributes ( bool  bResetPolygonIDs = false)
inline

◆ SetBufferSizes()

void UE::Geometry::FMeshShapeGenerator::SetBufferSizes ( int  NumVertices,
int  NumTriangles,
int  NumUVs,
int  NumNormals 
)
inline

Set the various internal buffers to the correct sizes for the given element counts

◆ SetNormal()

void UE::Geometry::FMeshShapeGenerator::SetNormal ( int  Index,
const FVector3f Normal,
int  ParentVertex 
)
inline

Set Normal at Index to given value with given ParentVertex

◆ SetTriangle() [1/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangle ( int  Index,
const FIndex3i Tri 
)
inline

◆ SetTriangle() [2/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangle ( int  Index,
int  A,
int  B,
int  C 
)
inline

◆ SetTriangle() [3/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangle ( int  Index,
int  A,
int  B,
int  C,
bool  bClockwiseOverride 
)
inline

◆ SetTriangleNormals() [1/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleNormals ( int  Index,
const FIndex3i Tri 
)
inline

◆ SetTriangleNormals() [2/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleNormals ( int  Index,
int  A,
int  B,
int  C 
)
inline

◆ SetTriangleNormals() [3/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleNormals ( int  Index,
int  A,
int  B,
int  C,
bool  bClockwiseOverride 
)
inline

◆ SetTrianglePolygon()

void UE::Geometry::FMeshShapeGenerator::SetTrianglePolygon ( int  Index,
int  PolygonID 
)
inline

◆ SetTriangleUVs() [1/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleUVs ( int  Index,
const FIndex3i Tri 
)
inline

◆ SetTriangleUVs() [2/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleUVs ( int  Index,
int  A,
int  B,
int  C 
)
inline

◆ SetTriangleUVs() [3/3]

void UE::Geometry::FMeshShapeGenerator::SetTriangleUVs ( int  Index,
int  A,
int  B,
int  C,
bool  bClockwiseOverride 
)
inline

◆ SetTriangleWithMatchedUVNormal()

void UE::Geometry::FMeshShapeGenerator::SetTriangleWithMatchedUVNormal ( int  Index,
int  A,
int  B,
int  C 
)
inline

Set triangle and UVs and normals with matching indices Convenience function for shapes with no uv or normal seams

◆ SetUV()

void UE::Geometry::FMeshShapeGenerator::SetUV ( int  Index,
const FVector2f UV,
int  ParentVertex 
)
inline

Set UV at Index to given value with given ParentVertex

◆ SetVertex()

void UE::Geometry::FMeshShapeGenerator::SetVertex ( int  Index,
const FVector3d Position 
)
inline

Set vertex at Index to given Position

Member Data Documentation

◆ bReverseOrientation

bool UE::Geometry::FMeshShapeGenerator::bReverseOrientation = false

If true, reverse orientation of created mesh

◆ NormalParentVertex

TArray<int> UE::Geometry::FMeshShapeGenerator::NormalParentVertex

Parent vertex index for each Normal. Same length as Normals array.

◆ Normals

TArray<FVector3f> UE::Geometry::FMeshShapeGenerator::Normals

Array of Normals. These are completely independent of vertex list (ie not per-vertex unless that's what generator produces)

◆ TriangleNormals

TArray<FIndex3i> UE::Geometry::FMeshShapeGenerator::TriangleNormals

Array of triangle corner Normals, stored as tuples of indices into Normals array. Same length as Triangles array.

◆ TrianglePolygonIDs

TArray<int> UE::Geometry::FMeshShapeGenerator::TrianglePolygonIDs

Array of per-triangle integer polygon IDs. Same length as Triangles array.

◆ Triangles

TArray<FIndex3i> UE::Geometry::FMeshShapeGenerator::Triangles

Array of triangle corner positions, stored as tuples of indices into Vertices array

◆ TriangleUVs

TArray<FIndex3i> UE::Geometry::FMeshShapeGenerator::TriangleUVs

Array of triangle corner UVs, stored as tuples of indices into UVs array. Same length as Triangles array.

◆ UVParentVertex

TArray<int> UE::Geometry::FMeshShapeGenerator::UVParentVertex

Parent vertex index for each UV. Same length as UVs array.

◆ UVs

TArray<FVector2f> UE::Geometry::FMeshShapeGenerator::UVs

Array of UV positions. These are completely independent of vertex list (ie not per-vertex unless that's what generator produces)

◆ Vertices

TArray<FVector3d> UE::Geometry::FMeshShapeGenerator::Vertices

Array of vertex positions


The documentation for this class was generated from the following file: