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

Detailed Description

Examples
FxEngine.ino.

Definition at line 43 of file xymap.h.

#include <xymap.h>

Public Types

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

Public Member Functions

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

Static Public Member Functions

static XYMap constructRectangularGrid (uint16_t width, uint16_t height, uint16_t offset=0)
 
static XYMap constructSerpentine (uint16_t width, uint16_t height, uint16_t offset=0)
 
static XYMap constructWithLookUpTable (uint16_t width, uint16_t height, const uint16_t *lookUpTable, uint16_t offset=0)
 
static XYMap constructWithUserFunction (uint16_t width, uint16_t height, XYFunction xyFunction, uint16_t offset=0)
 
static XYMap identity (uint16_t width, uint16_t height)
 

Private Member Functions

 XYMap (uint16_t width, uint16_t height, XyMapType type)
 

Private Attributes

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

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