engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FRawMesh结构体 参考

Raw mesh data used to construct optimized runtime rendering streams. 更多...

#include <RawMesh.h>

Public 成员函数

RAWMESH_API void CompactMaterialIndices ()
 Compacts materials by removing any that have no associated triangles. 更多...
 
RAWMESH_API void Empty ()
 Empties all data streams.
 
FORCEINLINE FVector GetWedgePosition (int32 WedgeIndex) const
 Helper for getting the position of a wedge.
 
RAWMESH_API bool IsValid () const
 Returns true if the mesh contains valid information. 更多...
 
RAWMESH_API bool IsValidOrFixable () const
 Returns true if the mesh contains valid information or slightly invalid information that we can fix. 更多...
 

Public 属性

TArray< int32 > FaceMaterialIndices
 Material index. 更多...
 
TArray< uint32 > FaceSmoothingMasks
 Smoothing mask. 更多...
 
TArray< int32 > MaterialIndexToImportIndex
 Map from material index -> original material index at import time. 更多...
 
TArray< FVector > VertexPositions
 Position in local space. 更多...
 
TArray< FColor > WedgeColors
 Color. 更多...
 
TArray< uint32 > WedgeIndices
 Index of the vertex at this wedge. 更多...
 
TArray< FVector > WedgeTangentX
 Tangent, U direction. 更多...
 
TArray< FVector > WedgeTangentY
 Tangent, V direction. 更多...
 
TArray< FVector > WedgeTangentZ
 Normal. 更多...
 
TArray< FVector2D > WedgeTexCoords [MAX_MESH_TEXTURE_COORDS]
 Texture coordinates. 更多...
 

详细描述

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!

成员函数说明

◆ CompactMaterialIndices()

RAWMESH_API void FRawMesh::CompactMaterialIndices ( )

Compacts materials by removing any that have no associated triangles.

Also updates the material index map.

◆ IsValid()

RAWMESH_API bool FRawMesh::IsValid ( ) const

Returns true if the mesh contains valid information.

  • Validates that stream sizes match.
  • Validates that there is at least one texture coordinate.
  • Validates that indices are valid positions in the vertex stream.

◆ IsValidOrFixable()

RAWMESH_API bool FRawMesh::IsValidOrFixable ( ) const

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

  • Validates that stream sizes match.
  • Validates that there is at least one texture coordinate.
  • Validates that indices are valid positions in the vertex stream.

类成员变量说明

◆ FaceMaterialIndices

TArray<int32> FRawMesh::FaceMaterialIndices

Material index.

Array[FaceId] = int32

◆ FaceSmoothingMasks

TArray<uint32> FRawMesh::FaceSmoothingMasks

Smoothing mask.

Array[FaceId] = uint32

◆ MaterialIndexToImportIndex

TArray<int32> FRawMesh::MaterialIndexToImportIndex

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

It's valid for this to be empty in which case material index == original material index.

◆ VertexPositions

TArray<FVector> FRawMesh::VertexPositions

Position in local space.

Array[VertexId] = float3(x,y,z)

◆ WedgeColors

TArray<FColor> FRawMesh::WedgeColors

Color.

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

◆ WedgeIndices

TArray<uint32> FRawMesh::WedgeIndices

Index of the vertex at this wedge.

Array[WedgeId] = VertexId

◆ WedgeTangentX

TArray<FVector> FRawMesh::WedgeTangentX

Tangent, U direction.

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

◆ WedgeTangentY

TArray<FVector> FRawMesh::WedgeTangentY

Tangent, V direction.

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

◆ WedgeTangentZ

TArray<FVector> FRawMesh::WedgeTangentZ

Normal.

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

◆ WedgeTexCoords

TArray<FVector2D> FRawMesh::WedgeTexCoords[MAX_MESH_TEXTURE_COORDS]

Texture coordinates.

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


该结构体的文档由以下文件生成: