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

Detailed Description

#include <screenmap.h>

+ Collaboration diagram for fl::ScreenMap:

Public Member Functions

 ScreenMap () FL_NOEXCEPT
 
 ScreenMap (const ScreenMap &other) FL_NOEXCEPT
 
 ScreenMap (const vec2f *lut, u32 length, float diameter=-1.0) FL_NOEXCEPT
 
template<u32 N>
 ScreenMap (const vec2f(&lut)[N], float diameter=-1.0) FL_NOEXCEPT
 
 ScreenMap (int count, float diameter, fl::function< void(int, vec2f &pt_out)> func) FL_NOEXCEPT
 
 ScreenMap (ScreenMap &&other) FL_NOEXCEPT
 
 ScreenMap (u32 length, float mDiameter=-1.0f) FL_NOEXCEPT
 
 ~ScreenMap () FL_NOEXCEPT
 
void addOffset (const vec2f &p) FL_NOEXCEPT
 
ScreenMapaddOffsetX (float x) FL_NOEXCEPT
 
ScreenMapaddOffsetY (float y) FL_NOEXCEPT
 
vec2f getBounds () const FL_NOEXCEPT
 
float getDiameter () const FL_NOEXCEPT
 
u32 getLength () const FL_NOEXCEPT
 
const XYMapPtrgetSourceXYMapPtr () const FL_NOEXCEPT
 Get the source XYMap shared pointer if available.
 
const XYMapgetXYMap () const FL_NOEXCEPT
 Get the source XYMap as a raw const pointer.
 
bool hasSourceXYMap () const FL_NOEXCEPT
 Check if source XYMap is available.
 
vec2f mapToIndex (u32 x) const FL_NOEXCEPT
 
ScreenMapoperator= (const ScreenMap &other) FL_NOEXCEPT
 
ScreenMapoperator= (ScreenMap &&other) FL_NOEXCEPT
 
const vec2foperator[] (u32 x) const FL_NOEXCEPT
 
vec2foperator[] (u32 x) FL_NOEXCEPT
 
void set (u16 index, const vec2f &p) FL_NOEXCEPT
 
void setDiameter (float diameter) FL_NOEXCEPT
 
void setSourceXYMap (const fl::shared_ptr< XYMap > &xymap) FL_NOEXCEPT
 Set the source XYMap (used for pixel transformation during encoding)
 

Static Public Member Functions

static ScreenMap Circle (int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.5f, float completion=1.0f) FL_NOEXCEPT
 
static ScreenMap DefaultStrip (int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.2f, float completion=.9f) FL_NOEXCEPT
 
static bool ParseJson (const char *jsonStrScreenMap, const char *screenMapName, ScreenMap *screenmap, string *err=nullptr) FL_NOEXCEPT
 
static bool ParseJson (const char *jsonStrScreenMap, fl::flat_map< string, ScreenMap > *segmentMaps, string *err=nullptr) FL_NOEXCEPT
 
static void toJson (const fl::flat_map< string, ScreenMap > &, fl::json *doc) FL_NOEXCEPT
 
static void toJsonStr (const fl::flat_map< string, ScreenMap > &, string *jsonBuffer) FL_NOEXCEPT
 

Static Private Member Functions

static const vec2fempty () FL_NOEXCEPT
 

Private Attributes

u32 length = 0
 
float mDiameter = -1.0f
 
LUTXYFLOATPtr mLookUpTable
 
XYMapPtr mSourceXYMap
 

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