FastLED 3.9.15
Loading...
Searching...
No Matches
fl::XYMap Class Reference

Detailed Description

#include <xymap.h>

Public Types

enum  XyMapType { kSerpentine = 0 , kLineByLine , kFunction , kLookUpTable }
 

Public Member Functions

 XYMap (const XYMap &other) FL_NOEXCEPT=default
 
 XYMap (u16 width, u16 height, bool is_serpentine=true, u16 offset=0) FL_NOEXCEPT
 
void convertToLookUpTable () FL_NOEXCEPT
 
u16 getHeight () const FL_NOEXCEPT
 
u16 getTotal () const FL_NOEXCEPT
 
XyMapType getType () const FL_NOEXCEPT
 
u16 getWidth () const FL_NOEXCEPT
 
bool has (int x, int y) const FL_NOEXCEPT
 
bool has (u16 x, u16 y) const FL_NOEXCEPT
 
bool isFunction () const FL_NOEXCEPT
 
bool isLineByLine () const FL_NOEXCEPT
 
bool isLUT () const FL_NOEXCEPT
 
bool isRectangularGrid () const FL_NOEXCEPT
 
bool isSerpentine () const FL_NOEXCEPT
 
bool isSerpentineOrLineByLine () const FL_NOEXCEPT
 
void mapPixels (const CRGB *input, CRGB *output) const FL_NOEXCEPT
 
u16 mapToIndex (const u16 &x, const u16 &y) const FL_NOEXCEPT
 
template<typename IntType, typename = fl::enable_if_t<!fl::is_integral<IntType>::value>>
u16 mapToIndex (IntType x, IntType y) const FL_NOEXCEPT
 
u16 operator() (u16 x, u16 y) const FL_NOEXCEPT
 
XYMapoperator= (const XYMap &other) FL_NOEXCEPT=default
 
void setRectangularGrid () FL_NOEXCEPT
 
fl::ScreenMap toScreenMap () const FL_NOEXCEPT
 

Static Public Member Functions

static XYMap constructRectangularGrid (u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
 
static XYMap constructSerpentine (u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
 
static XYMap constructWithLookUpTable (u16 width, u16 height, const u16 *lookUpTable, u16 offset=0) FL_NOEXCEPT
 
static XYMap constructWithUserFunction (u16 width, u16 height, XYFunction xyFunction, u16 offset=0) FL_NOEXCEPT
 
static XYMap fromXMap (const XMap &xmap) FL_NOEXCEPT
 Create an XYMap from an XMap (treats 1D as 2D with height=1)
 
static XYMap identity (u16 width, u16 height) FL_NOEXCEPT
 

Private Member Functions

 XYMap (u16 width, u16 height, XyMapType type) FL_NOEXCEPT
 

Private Attributes

u16 height
 
fl::LUT16Ptr mLookUpTable
 
u16 mOffset = 0
 
XyMapType type
 
u16 width
 
XYFunction xyFunction = nullptr
 

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