1 #include <QvTexture2.h> 2 3 QV_NODE_SOURCE(QvTexture2); 4 QvTexture2()5QvTexture2::QvTexture2() 6 { 7 QV_NODE_CONSTRUCTOR(QvTexture2); 8 isBuiltIn = TRUE; 9 10 QV_NODE_ADD_FIELD(filename); 11 QV_NODE_ADD_FIELD(image); 12 QV_NODE_ADD_FIELD(wrapS); 13 QV_NODE_ADD_FIELD(wrapT); 14 15 filename.value = ""; 16 image.size[0] = image.size[1] = (int)0.0; 17 image.numComponents = 0; 18 image.bytes = NULL; 19 wrapS.value = REPEAT; 20 wrapT.value = REPEAT; 21 22 QV_NODE_DEFINE_ENUM_VALUE(Wrap, REPEAT); 23 QV_NODE_DEFINE_ENUM_VALUE(Wrap, CLAMP); 24 25 QV_NODE_SET_SF_ENUM_TYPE(wrapS, Wrap); 26 QV_NODE_SET_SF_ENUM_TYPE(wrapT, Wrap); 27 } 28 ~QvTexture2()29QvTexture2::~QvTexture2() 30 { 31 } 32 33 QvBool readInstance(QvInput * in)34QvTexture2::readInstance(QvInput *in) 35 { 36 QvBool readOK = QvNode::readInstance(in); 37 38 if (readOK && ! filename.isDefault()) { 39 if (! readImage()) 40 readOK = FALSE; 41 image.setDefault(TRUE); 42 } 43 44 return readOK; 45 } 46 47 QvBool readImage()48QvTexture2::readImage() 49 { 50 // ??? 51 // ??? Read image from filename and store results in image field. 52 // ??? 53 54 return TRUE; 55 } 56