7#include <SimoxUtility/color/Color.h>
9#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
15 struct DrawColor24Bit;
33 static DrawColor
at(std::size_t
id,
float alpha = 1.f);
34 static DrawColor24Bit
atByte(std::size_t
id);
41 template <typename UIntT, std::enable_if_t<std::is_unsigned<UIntT>::value,
int> = 0>
43 at(UIntT
id,
float alpha = 1.f)
45 return at(
static_cast<std::size_t
>(
id), alpha);
49 template <typename IntT, std::enable_if_t<std::is_signed<IntT>::value,
int> = 0>
51 at(IntT
id,
float alpha = 1.f)
53 return at(
static_cast<std::size_t
>(
id >= 0 ?
id : std::abs(
id)), alpha);
61 template <typename UIntT, std::enable_if_t<std::is_unsigned<UIntT>::value,
int> = 0>
65 return atByte(
static_cast<std::size_t
>(
id));
68 template <typename IntT, std::enable_if_t<std::is_signed<IntT>::value,
int> = 0>
72 return atByte(
static_cast<std::size_t
>(
id >= 0 ?
id : std::abs(
id)));
76 static std::size_t
size();
79 static const std::vector<unsigned char>&
data();
"Color lookup table consisting of 256 colors structured in a maximally discontinuous manner.
static DrawColor at(IntT id, float alpha=1.f)
static DrawColor at(std::size_t id, float alpha=1.f)
static DrawColor24Bit atByte(UIntT id)
Get a color from the lookup table with given ID (with integer values).
static DrawColor24Bit atByte(std::size_t id)
static const std::vector< unsigned char > & data()
Get the raw lookup table (flat).
static std::size_t size()
Get the number of colors in the lookup table.;.
static DrawColor24Bit atByte(IntT id)
static DrawColor at(UIntT id, float alpha=1.f)
Get a color from the lookup table with given ID (with float values).
This file offers overloads of toIce() and fromIce() functions for STL container types.
DrawColor toDrawColor(Eigen::Vector4f c)
DrawColor24Bit toDrawColor24Bit(simox::Color c)