Files
UnrealEngineUWP/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionCreationParameters.cpp
Max Chen 4561801a81 Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor) @7119039
#rb none

[CL 7120528 by Max Chen in Dev-Editor branch]
2019-06-21 01:21:43 -04:00

28 lines
875 B
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "GeometryCollection/GeometryCollectionCreationParameters.h"
#include "GeometryCollection/GeometryCollection.h"
#include "GeometryCollection/GeometryCollectionEngineUtility.h"
FGeometryCollectionCreationParameters::FGeometryCollectionCreationParameters(FGeometryCollection& GeometryCollectioIn, bool ReCalculateNormalsIn /*= false*/, bool ReCalculateTangetsIn /*= false*/)
: ReCalculateNormals(ReCalculateNormalsIn)
, ReCalculateTangents(ReCalculateTangetsIn),
GeometryCollection(GeometryCollectioIn)
{
}
FGeometryCollectionCreationParameters::~FGeometryCollectionCreationParameters()
{
if (ReCalculateNormals)
{
GeometryCollectionEngineUtility::ComputeNormals(&GeometryCollection);
}
if (ReCalculateTangents)
{
GeometryCollectionEngineUtility::ComputeTangents(&GeometryCollection);
}
}