1 #include <QvMaterial.h> 2 3 QV_NODE_SOURCE(QvMaterial); 4 QvMaterial()5QvMaterial::QvMaterial() 6 { 7 QV_NODE_CONSTRUCTOR(QvMaterial); 8 isBuiltIn = TRUE; 9 10 QV_NODE_ADD_FIELD(ambientColor); 11 QV_NODE_ADD_FIELD(diffuseColor); 12 QV_NODE_ADD_FIELD(specularColor); 13 QV_NODE_ADD_FIELD(emissiveColor); 14 QV_NODE_ADD_FIELD(shininess); 15 QV_NODE_ADD_FIELD(transparency); 16 17 ambientColor.values[0]=ambientColor.values[1]=ambientColor.values[2] = 0.2; 18 diffuseColor.values[0]=diffuseColor.values[1]=diffuseColor.values[2] = 0.2; 19 specularColor.values[0]=specularColor.values[1]=specularColor.values[2]=0.; 20 emissiveColor.values[0]=emissiveColor.values[1]=emissiveColor.values[2]=0.; 21 shininess.values[0] = 0.2; 22 transparency.values[0] = 0.0; 23 } 24 ~QvMaterial()25QvMaterial::~QvMaterial() 26 { 27 } 28