Files
UnrealEngineUWP/Engine/Source/Programs/UnrealLightmass/Public/MeshExport.h
yujiang wang d30fed9551 Fix CPU Lightmass by coverting LWC types to single precision
#rb juan.canada
#preflight 619c5386fa0b360c407f9573

#ROBOMERGE-AUTHOR: yujiang.wang
#ROBOMERGE-SOURCE: CL 18266488 in //UE5/Release-5.0/... via CL 18266508
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18266515 by yujiang wang in ue5-release-engine-test branch]
2021-11-22 22:06:39 -05:00

112 lines
2.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreTypes.h"
#include "Math/Vector2D.h"
#include "Math/Vector4.h"
#include "CoreMinimal.h"
#include "Misc/Guid.h"
//#include "Math/Vector2D.h"
//#include "Math/Vector4.h"
namespace Lightmass
{
enum { MAX_TEXCOORDS=4 };
#if !PLATFORM_MAC && !PLATFORM_LINUX
#pragma pack(push, 1)
#endif
//----------------------------------------------------------------------------
// Helper definitions
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Mesh export file header
//----------------------------------------------------------------------------
struct FMeshFileHeader
{
/** FourCC cookie: 'MESH' */
uint32 Cookie;
FGuid FormatVersion;
// These structs follow immediately after this struct.
//
// FBaseMeshData BaseMeshData;
// FStaticMeshData MeshData;
// StaticMeshLODAggregate MeshLODs[ MeshData.NumLODs ];
//
// Where:
//
// struct StaticMeshLODAggregate
// {
// FStaticMeshLODData LOD;
// FStaticMeshElementData MeshElements[ LOD.NumElements ];
// UINT16 Indices[ LOD.NumIndices ];
// FStaticMeshVertex Vertices[ LOD.NumVertices ];
// };
};
//----------------------------------------------------------------------------
// Base mesh
//----------------------------------------------------------------------------
struct FBaseMeshData
{
FGuid Guid;
};
//----------------------------------------------------------------------------
// Static mesh, builds upon FBaseMeshData
//----------------------------------------------------------------------------
struct FStaticMeshData
{
uint32 LightmapCoordinateIndex;
uint32 NumLODs;
};
//----------------------------------------------------------------------------
// Static mesh LOD
//----------------------------------------------------------------------------
struct FStaticMeshLODData
{
uint32 NumElements;
/** Total number of triangles for all elements in the LOD. */
uint32 NumTriangles;
/** Total number of indices in the LOD. */
uint32 NumIndices;
/** Total number of vertices in the LOD. */
uint32 NumVertices;
};
//----------------------------------------------------------------------------
// Static mesh element
//----------------------------------------------------------------------------
struct FStaticMeshElementData
{
uint32 FirstIndex;
uint32 NumTriangles;
uint32 bEnableShadowCasting : 1;
};
//----------------------------------------------------------------------------
// Static mesh vertex
//----------------------------------------------------------------------------
struct FStaticMeshVertex
{
FVector4f Position;
FVector4f TangentX;
FVector4f TangentY;
FVector4f TangentZ;
FVector2f UVs[MAX_TEXCOORDS];
};
#if !PLATFORM_MAC && !PLATFORM_LINUX
#pragma pack(pop)
#endif
} // namespace Lightmass