Files
UnrealEngineUWP/Engine/Source/Developer/MeshUtilities/Public/MeshMergeData.h
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

63 lines
1.6 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Engine/StaticMesh.h"
#include "RawMesh.h"
#include "PhysicsEngine/AggregateGeom.h"
/** Structure holding intermediate mesh merging data that is used throughout the mesh merging and proxy creation processes */
struct FMeshMergeData
{
FMeshMergeData()
: RawMesh(nullptr)
, SourceStaticMesh(nullptr)
, bIsClippingMesh(false)
{}
void ReleaseData()
{
if (RawMesh != nullptr)
{
delete RawMesh;
RawMesh = nullptr;
}
}
/** Raw mesh data from the source static mesh */
FRawMesh* RawMesh;
/** Contains the original texture bounds, if the material requires baking down per-vertex data */
TArray<FBox2D> TexCoordBounds;
/** Will contain non-overlapping texture coordinates, if the material requires baking down per-vertex data */
TArray<FVector2D> NewUVs;
/** Pointer to the source static mesh instance */
class UStaticMesh* SourceStaticMesh;
/** If set, the raw mesh should be used as clipping geometry */
bool bIsClippingMesh;
};
/** Structure for encapsulating per LOD mesh merging data */
struct FRawMeshExt
{
FRawMeshExt()
: SourceStaticMesh(nullptr)
{
FMemory::Memzero(bShouldExportLOD);
}
FMeshMergeData MeshLODData[MAX_STATIC_MESH_LODS];
FKAggregateGeom AggGeom;
/** Pointer to the source static mesh instance */
class UStaticMesh* SourceStaticMesh;
/** Specific LOD index that is being exported */
int32 ExportLODIndex;
/** Whether or not a specific LOD should be exported */
bool bShouldExportLOD[MAX_STATIC_MESH_LODS];
/** Max LOD index that is exported */
int32 MaxLODExport;
};