コード例 #1
0
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);
            }
        }
    }

}
コード例 #2
0
ファイル: Mesh.cpp プロジェクト: arnaudgelas/MeshDev
//--
//
// ClearAll
//
//--
void Mesh::ClearAll()
{
	// Initialize mesh
	// Clear all data
	ClearVertices();
	ClearFaces();
	ClearColors();
	ClearTextures();
	ClearFaceNormals();
	ClearVertexNormals();
	ClearTextureName();
}