void ColorAttributeList::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ColorAttributeList"); if(searchNode == 0) return; DataNode *node; DataNode **children; // Clear all the ColorAttributes. ClearColors(); // Go through all of the children and construct a new // ColorAttribute for each one of them. children = searchNode->GetChildren(); if(children != 0) { for(int i = 0; i < searchNode->GetNumChildren(); ++i) { if(children[i]->GetKey() == std::string("ColorAttribute")) { ColorAttribute temp; temp.SetFromNode(children[i]); AddColors(temp); } } } }
//-- // // ClearAll // //-- void Mesh::ClearAll() { // Initialize mesh // Clear all data ClearVertices(); ClearFaces(); ClearColors(); ClearTextures(); ClearFaceNormals(); ClearVertexNormals(); ClearTextureName(); }