You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
ADDED Support for importing GeometryCache assets from Alembic files ADDED CalculateRawMeshTangets function that only calculates the tangents without building the RawMesh [CL 2591762 by Jurre DeBaare in Main branch]
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "GeometryCacheModulePrivatePCH.h"
|
|
#include "GeometryCacheTrackTransformAnimation.h"
|
|
|
|
|
|
GEOMETRYCACHE_API UGeometryCacheTrack_TransformAnimation::UGeometryCacheTrack_TransformAnimation(const FObjectInitializer& ObjectInitializer /*= FObjectInitializer::Get()*/) : UGeometryCacheTrack(ObjectInitializer)
|
|
{
|
|
}
|
|
|
|
SIZE_T UGeometryCacheTrack_TransformAnimation::GetResourceSize(EResourceSizeMode::Type Mode)
|
|
{
|
|
SIZE_T ResourceSize = 0;
|
|
ResourceSize += UGeometryCacheTrack::GetResourceSize(Mode);
|
|
ResourceSize += MeshData.GetResourceSize();
|
|
|
|
return ResourceSize;
|
|
}
|
|
|
|
void UGeometryCacheTrack_TransformAnimation::Serialize(FArchive& Ar)
|
|
{
|
|
UGeometryCacheTrack::Serialize(Ar);
|
|
Ar << MeshData;
|
|
}
|
|
|
|
const bool UGeometryCacheTrack_TransformAnimation::UpdateMeshData(const float Time, const bool bLooping, int32& InOutMeshSampleIndex, FGeometryCacheMeshData*& OutMeshData)
|
|
{
|
|
// If InOutMeshSampleIndex equals -1 (first creation) update the OutVertices and InOutMeshSampleIndex
|
|
if (InOutMeshSampleIndex == -1)
|
|
{
|
|
OutMeshData = &MeshData;
|
|
InOutMeshSampleIndex = 0;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void UGeometryCacheTrack_TransformAnimation::SetMesh(const FGeometryCacheMeshData& NewMeshData)
|
|
{
|
|
MeshData = NewMeshData;
|
|
NumMaterials = NewMeshData.BatchesInfo.Num();
|
|
}
|