Language:
Discover
By Skill Level
By Category

FRawMesh

Choose your OS:

Syntax

struct FRawMesh

Remarks

Raw mesh data used to construct optimized runtime rendering streams.

A note 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

Color. 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

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

Public variable

TArray < FVector ...

 

WedgeTexCoords

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

Functions

Name Description

Public function

RAWMESH_API ...

 

CompactMaterialIndices()

Compacts materials by removing any that have no associated triangles.

Public function

RAWMESH_API ...

 

Empty()

Empties all data streams.

FRawMesh

Public function

FVector

 

GetWedgePosition

(
    int32 WedgeIndex
)

Helper for getting the position of a wedge.

Public function

RAWMESH_API ...

 

IsValid()

Returns true if the mesh contains valid information.

Public function

RAWMESH_API ...

 

IsValidOrFixable()

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

References

Module

RawMesh

Header

Developer/RawMesh/Public/RawMesh.h