XLE  v0.02.0
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
XLEMath::VectorField2DSeparate< Store > Class Template Reference

A 2D field of 2D vectors More...

#include <RegularNumberField.h>

Public Types

using ValueType = Float2
 
using Coord = UInt2
 
using FloatCoord = Float2
 

Public Member Functions

UInt2 Dimensions () const
 
ValueType Load (Coord c) const
 
void Write (Coord x, ValueType value)
 
template<unsigned SamplingFlags = RNFSample::ClampX|RNFSample::ClampY|RNFSample::ClampZ>
ValueType Sample (FloatCoord c) const
 
void GatherNeighbors (ValueType neighbours[9], float weights[4], FloatCoord coord, unsigned samplingFlags) const
 
 VectorField2DSeparate (Store *u, Store *v, UInt2 dims)
 
template<unsigned SamplingFlags>
auto Sample (FloatCoord c) const -> ValueType
 

Public Attributes

Store * _u
 
Store * _v
 
UInt2 _dims
 

Static Public Attributes

static const unsigned NeighborCount = 9
 
static const unsigned BilinearWeightCount = 4
 

Detailed Description

template<typename Store>
class XLEMath::VectorField2DSeparate< Store >

A 2D field of 2D vectors

This is an abstraction of a field of vectors. It provides a simple interface that is independent of the underlying storage implementation. This allows us to implement general math operations on fields of data without too many restriction on how the data is stored in memory (and whether the calling code is using vector implementations from Eigen, CML, or some other library).

This implementation is a square grid of vectors. X and Y components of the vectors are not interleaved (ie, they are stored separately in memory)


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