Static Public Member Functions | Static Private Member Functions | List of all members
URuntimeMeshLibrary Class Reference

#include <RuntimeMeshLibrary.h>

Inheritance diagram for URuntimeMeshLibrary:
Inheritance graph
[legend]

Static Public Member Functions

static void CalculateTangentsForMesh (const TArray< FVector > &Vertices, const TArray< int32 > &Triangles, TArray< FVector > &Normals, const TArray< FVector2D > &UVs, TArray< FRuntimeMeshTangent > &Tangents, bool bCreateSmoothNormals=true)
 
static void CalculateTangentsForMesh (TArray< FRuntimeMeshVertexSimple > &Vertices, const TArray< int32 > &Triangles, bool bCreateSmoothNormals=true)
 
static void CalculateTangentsForMesh (const TSharedPtr< FRuntimeMeshAccessor > &MeshAccessor, bool bCreateSmoothNormals=true)
 
static void CalculateTangentsForMeshPacked (TArray< FRuntimeMeshBlueprintVertexSimple > &Vertices, const TArray< int32 > &Triangles, bool bCreateSmoothNormals=true)
 
static void CopyCollisionFromStaticMesh (UStaticMesh *StaticMesh, URuntimeMesh *RuntimeMesh)
 
static void CopyCollisionFromStaticMesh (UStaticMeshComponent *StaticMeshComponent, URuntimeMesh *RuntimeMesh)
 
static void CopyStaticMeshToRuntimeMesh (UStaticMeshComponent *StaticMeshComponent, int32 LODIndex, URuntimeMesh *RuntimeMesh, bool bCreateCollision)
 
static void CopyStaticMeshToRuntimeMeshComponent (UStaticMeshComponent *StaticMeshComponent, int32 LODIndex, URuntimeMeshComponent *RuntimeMeshComponent, bool bCreateCollision)
 
static TArray< int32 > GenerateTessellationIndexBuffer (const TArray< FVector > &Vertices, const TArray< int32 > &Triangles, TArray< FVector > &Normals, const TArray< FVector2D > &UVs, TArray< FRuntimeMeshTangent > &Tangents)
 
static TArray< int32 > GenerateTessellationIndexBuffer (const TArray< FRuntimeMeshVertexSimple > &Vertices, const TArray< int32 > &Triangles)
 
static TArray< int32 > GenerateTessellationIndexBuffer (const TSharedPtr< FRuntimeMeshAccessor > &MeshAccessor)
 
static void GenerateTessellationIndexBuffer (const TSharedPtr< FRuntimeMeshAccessor > &MeshAccessor, const TSharedPtr< FRuntimeMeshIndicesAccessor > &OutTessellationIndices)
 
static TArray< int32 > GenerateTessellationIndexBufferPacked (const TArray< FRuntimeMeshBlueprintVertexSimple > &Vertices, const TArray< int32 > &Triangles)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, TArray< FVector > &Vertices, TArray< int32 > &Triangles, TArray< FVector > &Normals, TArray< FVector2D > &UVs, TArray< FColor > &Colors, TArray< FRuntimeMeshTangent > &Tangents)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, TArray< FRuntimeMeshVertexSimple > &Vertices, TArray< int32 > &Triangles)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, TArray< FRuntimeMeshVertexSimple > &Vertices, TArray< int32 > &Triangles, TArray< int32 > &AdjacencyTriangles)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, const TSharedPtr< FRuntimeMeshAccessor > &MeshAccessor)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, const TSharedPtr< FRuntimeMeshAccessor > &MeshAccessor, const TSharedPtr< FRuntimeMeshIndicesAccessor > &TessellationIndicesAccessor)
 
template<typename VertexType0 , typename IndexType >
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, TArray< VertexType0 > &Vertices, TArray< IndexType > &Triangles)
 
static void GetStaticMeshSectionPacked (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, TArray< FRuntimeMeshBlueprintVertexSimple > &Vertices, TArray< int32 > &Triangles)
 

Static Private Member Functions

static void CalculateTangentsForMesh (TFunction< int32(int32 Index)> IndexAccessor, TFunction< FVector(int32 Index)> VertexAccessor, TFunction< FVector2D(int32 Index)> UVAccessor, TFunction< void(int32 Index, FVector TangentX, FVector TangentY, FVector TangentZ)> TangentSetter, int32 NumVertices, int32 NumUVs, int32 NumIndices, bool bCreateSmoothNormals)
 
static int32 GetNewIndexForOldVertIndex (const FPositionVertexBuffer *PosBuffer, const FStaticMeshVertexBuffer *VertBuffer, const FColorVertexBuffer *ColorBuffer, TMap< int32, int32 > &MeshToSectionVertMap, int32 VertexIndex, int32 NumUVChannels, TFunction< int32(FVector Position, FVector TangentX, FVector TangentY, FVector TangentZ)> VertexCreator, TFunction< void(int32 VertexIndex, int32 UVIndex, FVector2D UV)> UVSetter, TFunction< void(int32 VertexIndex, FColor Color)> ColorSetter)
 
static void GetStaticMeshSection (UStaticMesh *InMesh, int32 LODIndex, int32 SectionIndex, int32 NumSupportedUVs, TFunction< int32(FVector Position, FVector TangentX, FVector TangentY, FVector TangentZ)> VertexCreator, TFunction< void(int32 VertexIndex, int32 UVIndex, FVector2D UV)> UVSetter, TFunction< void(int32 VertexIndex, FColor Color)> ColorSetter, TFunction< void(int32)> IndexCreator, TFunction< void(int32)> AdjacencyIndexCreator)
 

Detailed Description

Definition at line 16 of file RuntimeMeshLibrary.h.

Member Function Documentation

void URuntimeMeshLibrary::CalculateTangentsForMesh ( const TArray< FVector > &  Vertices,
const TArray< int32 > &  Triangles,
TArray< FVector > &  Normals,
const TArray< FVector2D > &  UVs,
TArray< FRuntimeMeshTangent > &  Tangents,
bool  bCreateSmoothNormals = true 
)
static

Automatically generate normals and tangent vectors for a mesh UVs are required for correct tangent generation.

Definition at line 23 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CalculateTangentsForMesh ( TArray< FRuntimeMeshVertexSimple > &  Vertices,
const TArray< int32 > &  Triangles,
bool  bCreateSmoothNormals = true 
)
static

Definition at line 56 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CalculateTangentsForMesh ( const TSharedPtr< FRuntimeMeshAccessor > &  MeshAccessor,
bool  bCreateSmoothNormals = true 
)
static

Definition at line 70 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CalculateTangentsForMesh ( TFunction< int32(int32 Index)>  IndexAccessor,
TFunction< FVector(int32 Index)>  VertexAccessor,
TFunction< FVector2D(int32 Index)>  UVAccessor,
TFunction< void(int32 Index, FVector TangentX, FVector TangentY, FVector TangentZ)>  TangentSetter,
int32  NumVertices,
int32  NumUVs,
int32  NumIndices,
bool  bCreateSmoothNormals 
)
staticprivate

Definition at line 420 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CalculateTangentsForMeshPacked ( TArray< FRuntimeMeshBlueprintVertexSimple > &  Vertices,
const TArray< int32 > &  Triangles,
bool  bCreateSmoothNormals = true 
)
static

Definition at line 41 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CopyCollisionFromStaticMesh ( UStaticMesh *  StaticMesh,
URuntimeMesh RuntimeMesh 
)
static

Definition at line 401 of file RuntimeMeshLibrary.cpp.

static void URuntimeMeshLibrary::CopyCollisionFromStaticMesh ( UStaticMeshComponent *  StaticMeshComponent,
URuntimeMesh RuntimeMesh 
)
inlinestatic

Definition at line 110 of file RuntimeMeshLibrary.h.

void URuntimeMeshLibrary::CopyStaticMeshToRuntimeMesh ( UStaticMeshComponent *  StaticMeshComponent,
int32  LODIndex,
URuntimeMesh RuntimeMesh,
bool  bCreateCollision 
)
static

Copy sections from a static mesh to a runtime mesh

Definition at line 346 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::CopyStaticMeshToRuntimeMeshComponent ( UStaticMeshComponent *  StaticMeshComponent,
int32  LODIndex,
URuntimeMeshComponent *  RuntimeMeshComponent,
bool  bCreateCollision 
)
static

Copy sections from a static mesh to a runtime mesh

Definition at line 396 of file RuntimeMeshLibrary.cpp.

TArray< int32 > URuntimeMeshLibrary::GenerateTessellationIndexBuffer ( const TArray< FVector > &  Vertices,
const TArray< int32 > &  Triangles,
TArray< FVector > &  Normals,
const TArray< FVector2D > &  UVs,
TArray< FRuntimeMeshTangent > &  Tangents 
)
static

Definition at line 86 of file RuntimeMeshLibrary.cpp.

TArray< int32 > URuntimeMeshLibrary::GenerateTessellationIndexBuffer ( const TArray< FRuntimeMeshVertexSimple > &  Vertices,
const TArray< int32 > &  Triangles 
)
static

Definition at line 114 of file RuntimeMeshLibrary.cpp.

TArray< int32 > URuntimeMeshLibrary::GenerateTessellationIndexBuffer ( const TSharedPtr< FRuntimeMeshAccessor > &  MeshAccessor)
static

Definition at line 128 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GenerateTessellationIndexBuffer ( const TSharedPtr< FRuntimeMeshAccessor > &  MeshAccessor,
const TSharedPtr< FRuntimeMeshIndicesAccessor > &  OutTessellationIndices 
)
static

Definition at line 142 of file RuntimeMeshLibrary.cpp.

TArray< int32 > URuntimeMeshLibrary::GenerateTessellationIndexBufferPacked ( const TArray< FRuntimeMeshBlueprintVertexSimple > &  Vertices,
const TArray< int32 > &  Triangles 
)
static

Definition at line 100 of file RuntimeMeshLibrary.cpp.

int32 URuntimeMeshLibrary::GetNewIndexForOldVertIndex ( const FPositionVertexBuffer *  PosBuffer,
const FStaticMeshVertexBuffer *  VertBuffer,
const FColorVertexBuffer *  ColorBuffer,
TMap< int32, int32 > &  MeshToSectionVertMap,
int32  VertexIndex,
int32  NumUVChannels,
TFunction< int32(FVector Position, FVector TangentX, FVector TangentY, FVector TangentZ)>  VertexCreator,
TFunction< void(int32 VertexIndex, int32 UVIndex, FVector2D UV)>  UVSetter,
TFunction< void(int32 VertexIndex, FColor Color)>  ColorSetter 
)
staticprivate

Definition at line 605 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
TArray< FVector > &  Vertices,
TArray< int32 > &  Triangles,
TArray< FVector > &  Normals,
TArray< FVector2D > &  UVs,
TArray< FColor > &  Colors,
TArray< FRuntimeMeshTangent > &  Tangents 
)
static

Grab geometry data from a StaticMesh asset.

Definition at line 158 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
TArray< FRuntimeMeshVertexSimple > &  Vertices,
TArray< int32 > &  Triangles 
)
static

Definition at line 224 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
TArray< FRuntimeMeshVertexSimple > &  Vertices,
TArray< int32 > &  Triangles,
TArray< int32 > &  AdjacencyTriangles 
)
static

Definition at line 252 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
const TSharedPtr< FRuntimeMeshAccessor > &  MeshAccessor 
)
static

Definition at line 282 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
const TSharedPtr< FRuntimeMeshAccessor > &  MeshAccessor,
const TSharedPtr< FRuntimeMeshIndicesAccessor > &  TessellationIndicesAccessor 
)
static

Definition at line 311 of file RuntimeMeshLibrary.cpp.

template<typename VertexType0 , typename IndexType >
static void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
TArray< VertexType0 > &  Vertices,
TArray< IndexType > &  Triangles 
)
inlinestatic

Definition at line 69 of file RuntimeMeshLibrary.h.

void URuntimeMeshLibrary::GetStaticMeshSection ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
int32  NumSupportedUVs,
TFunction< int32(FVector Position, FVector TangentX, FVector TangentY, FVector TangentZ)>  VertexCreator,
TFunction< void(int32 VertexIndex, int32 UVIndex, FVector2D UV)>  UVSetter,
TFunction< void(int32 VertexIndex, FColor Color)>  ColorSetter,
TFunction< void(int32)>  IndexCreator,
TFunction< void(int32)>  AdjacencyIndexCreator 
)
staticprivate

Definition at line 638 of file RuntimeMeshLibrary.cpp.

void URuntimeMeshLibrary::GetStaticMeshSectionPacked ( UStaticMesh *  InMesh,
int32  LODIndex,
int32  SectionIndex,
TArray< FRuntimeMeshBlueprintVertexSimple > &  Vertices,
TArray< int32 > &  Triangles 
)
static

Definition at line 196 of file RuntimeMeshLibrary.cpp.


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


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