FRawMesh

Raw mesh data used to construct optimized runtime rendering streams.

Choose your operating system:

Windows

macOS

Linux

References

Module

RawMesh

Header

/Engine/Source/Runtime/RawMesh/Public/RawMesh.h

Include

#include "RawMesh.h"

Syntax

struct FRawMesh

Remarks

Raw mesh data used to construct optimized runtime rendering streams.

A

on terminology. Information is stored at various frequencies as defined here: Face - A single polygon in the mesh. Currently all code assumes this is a triangle but conceptually any polygon would do. Corner - Each face has N corners. As all faces are currently triangles, N=3. Wedge - Properties stored for each corner of each face. Index with FaceIndex * NumCorners + CornerIndex. Vertex - Properties shared by overlapping wedges of adjacent polygons. Typically these properties relate to position. Index with VertexIndices[WedgeIndex]. Additionally, to ease in backwards compatibility all properties should use only primitive types!

Variables

Name Description

Public variable

TArray< int32 >

 

FaceMaterialIndices

Material index. Array[FaceId] = int32

Public variable

TArray< uint32 ...

 

FaceSmoothingMasks

Smoothing mask. Array[FaceId] = uint32

Public variable

TArray< int32 >

 

MaterialIndexToImportIndex

Map from material index -> original material index at import time.

Public variable

TArray< FVector...

 

VertexPositions

Position in local space. Array[VertexId] = float3(x,y,z)

Public variable

TArray< FColor ...

 

WedgeColors

  1. Array[WedgeId]=float3(r,g,b,a)

Public variable

TArray< uint32 ...

 

WedgeIndices

Index of the vertex at this wedge. Array[WedgeId] = VertexId

Public variable

TArray< FVector...

 

WedgeTangentX

Tangent, U direction. Array[WedgeId] = float3(x,y,z)

Public variable

TArray< FVector...

 

WedgeTangentY

Tangent, V direction. Array[WedgeId] = float3(x,y,z)

Public variable

TArray< FVector...

 

WedgeTangentZ

  1. Array[WedgeId] = float3(x,y,z)

Public variable

TArray< FVector...

 

WedgeTexCoords

Texture coordinates. Array[UVId][WedgeId]=float2(u,v)

Functions

Name Description

Public function

void

 

CompactMaterialIndices()

Compacts materials by removing any that have no associated triangles.

Public function

void

 

Empty()

Empties all data streams.

Public function Const

FVector3f

 

GetWedgePosition

(
    int32 WedgeIndex
)

Helper for getting the position of a wedge.

Public function Const

bool

 

IsValid()

Returns true if the mesh contains valid information.

Public function Const

bool

 

IsValidOrFixable()

Returns true if the mesh contains valid information or slightly invalid information that we can fix.