Пример #1
0
KeyFrame::KeyFrame(const KeyFrame &keyframe)
{
	const vector<Mesh*> &m = keyframe.getMeshes();
	for(vector<Mesh*>::const_iterator i = m.begin(); i != m.end(); ++i)
	{
		Mesh *mesh = new Mesh(*i);
		meshes.push_back(mesh);
	}
}
Пример #2
0
void ModelLoaderSingle::setPolygonWinding(KeyFrame &keyFrame,
										  const string &polygonWinding)
{
	vector<Mesh*> &meshes = keyFrame.getMeshes();
	for(vector<Mesh*>::iterator i=meshes.begin(); i!=meshes.end(); ++i)
	{
		(*i)->polygonWinding = polygonWinding=="CCW" ? GL_CCW : GL_CW;
	}
}
Пример #3
0
bool KeyFrame::merge(const KeyFrame &o)
{
	if(getMeshes().size() == 0)
	{
		meshes = o.getMeshes();
	}
	else
	{
		if(getMeshes().size() != o.getMeshes().size())
			return false;

		for(vector<Mesh*>::const_iterator iter=o.getMeshes().begin();
            iter != o.getMeshes().end();
            ++iter)
		{
			meshes.push_back(*iter);
		}
	}

	return true;
}