TSampledScalarField2

[TSampledScalarField2](API\Plugins\GeometricObjects\Spatial\TSampledScalarField2) implements a generic 2D grid of values that can be interpolated in various ways.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Spatial/SampledScalarField2.h

Include

#include "Spatial/SampledScalarField2.h"

Syntax

template<typename RealType, typename ValueType>
class TSampledScalarField2

Remarks

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)

Variables

Name Description

Public variable

FVector2< RealT...

 

CellDimensions

Public variable

FVector2< RealT...

 

GridOrigin

Public variable

TDenseGrid2< Va...

 

GridValues

Constructors

Name Description

Public function

TSampledScalarField2()

Create empty grid, defaults to 2x2 grid of whatever default value of ValueType is

Functions

Name Description

Public function Const

ValueType

 

BilinearSampleClamped

(
    const FVector2< RealType >& Positi...
)

Sample scalar field with bilinear interpolation at given Position

Public function Const

void

 

BilinearSampleGradientClamped

(
    const FVector2< RealType >& Positi...,
    ValueType& GradXOut,
    ValueType& GradYOut
)

Sample scalar field gradient with bilinear interpolation at given Position

Public function

void

 

CopyConfiguration

(
    const TSampledScalarField2< RealTyp...
)

Public function Const

int32

 

Height()

Public function Const

int64

 

Num()

Public function

void

 

Resize

(
    int64 Width,
    int64 Height,
    const ValueType& InitValue
)

Resize the grid to given Width/Height, and initialize w/ given InitValue

Public function

void

 

SetCellSize

(
    RealType CellSize
)

Set the size of the grid cells to uniform CellSize

Public function

void

 

SetPosition

(
    const FVector2< RealType >& Origin
)

Set the 2D origin of the grid

Public function Const

int32

 

Width()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss