UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TSpatialPhotoSet< PixelType, RealType > Class Template Reference

#include <SpatialPhotoSet.h>

Public Member Functions

void Add (TSpatialPhoto< PixelType > &&Photo)
 
int32 Num () const
 
void Empty ()
 
const TSpatialPhoto< PixelType > & Get (int32 Index) const
 
PixelType ComputeSample (const FVector3d &Position, const FVector3d &Normal, TFunctionRef< bool(const FVector3d &, const FVector3d &)> VisibilityFunction, const PixelType &DefaultValue) const
 
PixelType ComputeSample (const int &PhotoIndex, const FVector2d &PhotoCoords, const PixelType &DefaultValue) const
 
PixelType ComputeSampleNearest (const int &PhotoIndex, const FVector2d &PhotoCoords, const PixelType &DefaultValue) const
 
bool ComputeSampleLocation (const FVector3d &Position, const FVector3d &Normal, TFunctionRef< bool(const FVector3d &, const FVector3d &)> VisibilityFunction, int &PhotoIndex, FVector2d &PhotoCoords) const
 

Protected Attributes

TArray< TSharedPtr< TSpatialPhoto< PixelType >, ESPMode::ThreadSafe > > Photos
 

Detailed Description

template<typename PixelType, typename RealType>
class UE::Geometry::TSpatialPhotoSet< PixelType, RealType >

TSpatialPhotoSet is a set of TSpatialPhotos. The ComputeSample() function can be used to determine the value "seen" by the photo set at a given 3D position/normal, if possible.

Member Function Documentation

◆ Add()

template<typename PixelType , typename RealType >
void UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::Add ( TSpatialPhoto< PixelType > &&  Photo)
inline

Add a photo to the photo set via move operation

◆ ComputeSample() [1/2]

template<typename PixelType , typename RealType >
PixelType UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::ComputeSample ( const FVector3d Position,
const FVector3d Normal,
TFunctionRef< bool(const FVector3d &, const FVector3d &)>  VisibilityFunction,
const PixelType &  DefaultValue 
) const

Estimate a pixel value at the given 3D Position/Normal using the PhotoSet. This is effectively a reprojection process, that tries to find the "best" pixel value in the photo set that projects onto the given Position/Normal.

A position may be visible from multiple photos, in this case the dot-product between the view vector and normal is used to decide which photo pixel to use.

VisibilityFunction is used to determine if a 3D point is visible from the given photo point. Generally the caller would implement some kind of raycast to do this.

Returns
the best valid sample if found, or DefaultValue if no suitable sample is available

◆ ComputeSample() [2/2]

template<typename PixelType , typename RealType >
PixelType UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::ComputeSample ( const int &  PhotoIndex,
const FVector2d PhotoCoords,
const PixelType &  DefaultValue 
) const

◆ ComputeSampleLocation()

template<typename PixelType , typename RealType >
bool UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::ComputeSampleLocation ( const FVector3d Position,
const FVector3d Normal,
TFunctionRef< bool(const FVector3d &, const FVector3d &)>  VisibilityFunction,
int &  PhotoIndex,
FVector2d PhotoCoords 
) const

◆ ComputeSampleNearest()

template<typename PixelType , typename RealType >
PixelType UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::ComputeSampleNearest ( const int &  PhotoIndex,
const FVector2d PhotoCoords,
const PixelType &  DefaultValue 
) const

◆ Empty()

template<typename PixelType , typename RealType >
void UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::Empty ( )
inline
Returns
removes all photos from the photo set

◆ Get()

template<typename PixelType , typename RealType >
const TSpatialPhoto< PixelType > & UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::Get ( int32  Index) const
inline
Returns
the photo at the given index

◆ Num()

template<typename PixelType , typename RealType >
int32 UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::Num ( ) const
inline
Returns
the number of photos in the photo set

Member Data Documentation

◆ Photos

template<typename PixelType , typename RealType >
TArray<TSharedPtr<TSpatialPhoto<PixelType>, ESPMode::ThreadSafe> > UE::Geometry::TSpatialPhotoSet< PixelType, RealType >::Photos
protected

The documentation for this class was generated from the following file: