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