completed support for WedgeColor.

This commit is contained in:
Marco Di Benedetto 2009-06-09 18:23:50 +00:00
parent b066baa686
commit 39156cafe4
1 changed files with 10 additions and 0 deletions

View File

@ -371,6 +371,7 @@ public:
ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
const ColorType &cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } const ColorType &cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
ColorType &WC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } ColorType &WC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
const ColorType &cWC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; } QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; } const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
@ -411,6 +412,7 @@ public:
typedef A ColorType; typedef A ColorType;
ColorType &WC(const int i) { return _color[i]; } ColorType &WC(const int i) { return _color[i]; }
const ColorType &WC(const int i) const { return _color[i]; } const ColorType &WC(const int i) const { return _color[i]; }
const ColorType &cWC(const int i) const { return _color[i]; }
template <class LeftF> template <class LeftF>
void ImportLocal(const LeftF & leftF){ WC() = leftF.cWC();T::ImportLocal(leftF);} void ImportLocal(const LeftF & leftF){ WC() = leftF.cWC();T::ImportLocal(leftF);}
@ -421,6 +423,14 @@ private:
ColorType _color[3]; ColorType _color[3];
}; };
template <class T> class WedgeColor4b: public WedgeColor<vcg::Color4b, T> {
static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeColor4b"));T::Name(name);}
};
template <class T> class WedgeColor4f: public WedgeColor<vcg::Color4f, T> {
static void Name(std::vector<std::string> & name){name.push_back(std::string("WedgeColor4f"));T::Name(name);}
};
template <class T> class Color4b: public Color<vcg::Color4b, T> { template <class T> class Color4b: public Color<vcg::Color4b, T> {
static void Name(std::vector<std::string> & name){name.push_back(std::string("Color4b"));T::Name(name);} static void Name(std::vector<std::string> & name){name.push_back(std::string("Color4b"));T::Name(name);}
}; };