Added Initialization of Color in Vertex and Face Components

This commit is contained in:
Paolo Cignoni 2006-01-09 13:58:56 +00:00
parent 07f5fe7d42
commit fa5979e2ac
2 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.6 2005/11/22 15:49:39 cignoni
removed two spurious computenormal
Revision 1.5 2005/11/21 21:44:47 cignoni Revision 1.5 2005/11/21 21:44:47 cignoni
Moved ComputeNormal and ComputeNormalizedNormal out of the face class (no more a member function!) Moved ComputeNormal and ComputeNormalizedNormal out of the face class (no more a member function!)
@ -247,6 +250,7 @@ public:
template <class A, class T> class Color: public T { template <class A, class T> class Color: public T {
public: public:
typedef A ColorType; typedef A ColorType;
Color():_color(vcg::Color4b::White) {}
ColorType &C() { return _color; } ColorType &C() { return _color; }
static bool HasFaceColor() { return true; } static bool HasFaceColor() { return true; }
private: private:

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.16 2005/11/22 23:58:03 cignoni
Added intiailization of flags to zero in the constructor,
Revision 1.15 2005/11/18 15:44:51 cignoni Revision 1.15 2005/11/18 15:44:51 cignoni
Access to constant normal changed from by val to by reference Access to constant normal changed from by val to by reference
@ -222,6 +225,7 @@ public:
}; };
template <class A, class T> class Color: public T { template <class A, class T> class Color: public T {
public: public:
Color():_color(vcg::Color4b::White) {}
typedef A ColorType; typedef A ColorType;
ColorType &C() { return _color; } ColorType &C() { return _color; }
static bool HasColor() { return true; } static bool HasColor() { return true; }
@ -229,7 +233,7 @@ private:
ColorType _color; ColorType _color;
}; };
template <class T> class Color4b: public Color<vcg::Color4b, T> {}; template <class T> class Color4b: public vert::Color<vcg::Color4b, T> {};
/*-------------------------- Quality ----------------------------------*/ /*-------------------------- Quality ----------------------------------*/