Пример #1
0
MeshModel* Loader_3DS::load(const std::string& filename, const Transform& t, int hint)
{
	conv_tform = t;
	conv = flip_tris = false;
	if (conv_tform != Transform()) {
		conv = true;
		if (conv_tform.m.i.cross(conv_tform.m.j).dot(conv_tform.m.k) < 0)
			flip_tris = true;
	}

	collapse = !!(hint & MeshLoader::HINT_COLLAPSE);
	animonly = !!(hint & MeshLoader::HINT_ANIMONLY);

	if (!in.open(filename.c_str(), std::ios_base::in | std::ios_base::binary)) {
		return 0;
	}

	MeshModel* root = parseFile();
	in.close();

	materials_map.clear();
	name_map.clear();
	id_map.clear();

	return root;
}
Пример #2
0
 void pluginUnload()
 {
     if(fileBuf.is_open()){
         fileBuf.close();
     }
     /* called when plugin is unloaded, cleanup here */
 }
void ImageFileRecorder::stop()
{
	if ( m_running )
	{
		filebuffer.close();
		m_running = false;
	}
}