Navigation
API > API/Runtime > API/Runtime/RawMesh
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!
| Name | FRawMesh |
| Type | struct |
| Header File | /Engine/Source/Runtime/RawMesh/Public/RawMesh.h |
| Include Path | #include "RawMesh.h" |
Syntax
struct FRawMesh
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FaceMaterialIndices | TArray< int32 > | Material index. Array[FaceId] = int32 | RawMesh.h | |
| FaceSmoothingMasks | TArray< uint32 > | Smoothing mask. Array[FaceId] = uint32 | RawMesh.h | |
| MaterialIndexToImportIndex | TArray< int32 > | Map from material index -> original material index at import time. | RawMesh.h | |
| VertexPositions | TArray< FVector3f > | Position in local space. Array[VertexId] = float3(x,y,z) | RawMesh.h | |
| WedgeColors | TArray< FColor > | Color. Array[WedgeId]=float3(r,g,b,a) | RawMesh.h | |
| WedgeIndices | TArray< uint32 > | Index of the vertex at this wedge. Array[WedgeId] = VertexId | RawMesh.h | |
| WedgeTangentX | TArray< FVector3f > | Tangent, U direction. Array[WedgeId] = float3(x,y,z) | RawMesh.h | |
| WedgeTangentY | TArray< FVector3f > | Tangent, V direction. Array[WedgeId] = float3(x,y,z) | RawMesh.h | |
| WedgeTangentZ | TArray< FVector3f > | Normal. Array[WedgeId] = float3(x,y,z) | RawMesh.h | |
| WedgeTexCoords | TArray< FVector2f > | Texture coordinates. Array[UVId][WedgeId]=float2(u,v) | RawMesh.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CompactMaterialIndices () |
Compacts materials by removing any that have no associated triangles. | RawMesh.h | |
void Empty() |
Empties all data streams. | RawMesh.h | |
FVector3f GetWedgePosition
(
int32 WedgeIndex |
Helper for getting the position of a wedge. | RawMesh.h | |
bool IsValid () |
Returns true if the mesh contains valid information. | RawMesh.h | |
bool IsValidOrFixable () |
Returns true if the mesh contains valid information or slightly invalid information that we can fix. | RawMesh.h |