![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SampledScalarField2.h>
Public Member Functions | |
| TSampledScalarField2 () | |
| void | CopyConfiguration (const TSampledScalarField2< RealType, ValueType > &OtherField) |
| void | Resize (int64 Width, int64 Height, const ValueType &InitValue) |
| int32 | Width () const |
| int32 | Height () const |
| int64 | Num () const |
| void | SetPosition (const TVector2< RealType > &Origin) |
| void | SetCellSize (RealType CellSize) |
| ValueType | BilinearSampleClamped (const TVector2< RealType > &Position) const |
| void | BilinearSampleGradientClamped (const TVector2< RealType > &Position, ValueType &GradXOut, ValueType &GradYOut) const |
Public Attributes | |
| TDenseGrid2< ValueType > | GridValues |
| TVector2< RealType > | GridOrigin |
| TVector2< RealType > | CellDimensions |
TSampledScalarField2 implements a generic 2D grid of values that can be interpolated in various ways. The grid is treated as a set of sample points in 2D space, IE a grid origin and x/y point-spacing is part of this class.
The class is templated on two types: RealType: the real type used for spatial calculations, ie 2D grid origin, cell dimensions, and sample positions ValueType: the type of value stored in the grid. Could be real or vector-typed, needs to support multiplication by RealType (for interpolation)
|
inline |
Create empty grid, defaults to 2x2 grid of whatever default value of ValueType is
|
inline |
Sample scalar field with bilinear interpolation at given Position
| Position | sample point relative to grid origin/dimensions |
|
inline |
Sample scalar field gradient with bilinear interpolation at given Position
| Position | sample point relative to grid origin/dimensions |
|
inline |
|
inline |
|
inline |
|
inline |
Resize the grid to given Width/Height, and initialize w/ given InitValue
|
inline |
Set the size of the grid cells to uniform CellSize
|
inline |
Set the 2D origin of the grid
|
inline |
| TVector2<RealType> UE::Geometry::TSampledScalarField2< RealType, ValueType >::CellDimensions |
| TVector2<RealType> UE::Geometry::TSampledScalarField2< RealType, ValueType >::GridOrigin |
| TDenseGrid2<ValueType> UE::Geometry::TSampledScalarField2< RealType, ValueType >::GridValues |