Files
UnrealEngineUWP/Engine/Source/Runtime/GeometryCore/Public/PointSetAdapter.h
ryan schmidt 6437ecc4a1 GeometryCore: replace all usage of GeometryCore FVector3<T> with TVector<T>, remove FVector3<T> and GVector4<T>
#rb none
#rnx
#jira none
#preflight 614ce33574f7e70001ea822b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17617027 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17617043 by ryan schmidt in ue5-release-engine-test branch]
2021-09-23 19:38:55 -04:00

41 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "VectorTypes.h"
namespace UE
{
namespace Geometry
{
using namespace UE::Math;
/**
* TPointSetAdapter provides a very generic interface to an indexable list of points.
* The list may be sparse, ie some indices may be invalid.
*/
template<typename RealType>
struct TPointSetAdapter
{
/** Maximum point index */
TFunction<int32()> MaxPointID;
/** Number of points. If PointCount == MaxPointID, then there are no gaps in the index list */
TFunction<int32()> PointCount;
/** Returns true if this index valid */
TFunction<bool(int32)> IsPoint;
/** Get point at this index */
TFunction<TVector<RealType>(int32)> GetPoint;
/** Returns true if this point set has per-point normals */
TFunction<bool()> HasNormals;
/** Get the normal at a point index */
TFunction<FVector3f(int32)> GetPointNormal;
};
typedef TPointSetAdapter<double> FPointSetAdapterd;
typedef TPointSetAdapter<float> FPointSetAdapterf;
} // end namespace UE::Geometry
} // end namespace UE