2019-12-27 09:26:59 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-06-04 15:42:48 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "VectorTypes.h"
|
|
|
|
|
|
2021-03-09 19:33:56 -04:00
|
|
|
namespace UE
|
|
|
|
|
{
|
|
|
|
|
namespace Geometry
|
|
|
|
|
{
|
|
|
|
|
|
2019-06-04 15:42:48 -04:00
|
|
|
/**
|
|
|
|
|
* 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<FVector3<RealType>(int32)> GetPoint;
|
|
|
|
|
/** Returns a timestamp. If point set changes, timestamp should also change. */
|
|
|
|
|
TFunction<int32()> Timestamp;
|
|
|
|
|
|
|
|
|
|
/** 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;
|
|
|
|
|
|
2021-03-09 19:33:56 -04:00
|
|
|
|
|
|
|
|
} // end namespace UE::Geometry
|
|
|
|
|
} // end namespace UE
|