//------------------------------------------------------------------------------------
// irr::scene::IQ3LevelMesh wrappers (parent is IAnimatedMesh)
//------------------------------------------------------------------------------------

extern "C" 
{
	const IShader* IrrScene_IQ3LevelMesh_getShader(IQ3LevelMesh* mesh, const c8 * filename, s32 fileNameIsValid = true)
	{
		if (mesh)
			return mesh->getShader(filename,fileNameIsValid);
		else return 0;
	}

	const IShader* IrrScene_IQ3LevelMesh_getShaderByIdx(IQ3LevelMesh* mesh, u32 index)
	{
		if (mesh)
			return mesh->getShader(index);
		else return 0;
	}

/*
	typedef IShader SEntity;
	typedef core::array < SEntity > tQ3EntityList;
*/
	s32 IrrScene_IQ3LevelMesh_getEntityList(IQ3LevelMesh* mesh,u32** entities)
	{
		if (mesh)	{
			Irr_ptrarray_allocate(entities,mesh->getEntityList().size());
			for (u32 i=0; i<mesh->getEntityList().size(); i++) {
				((u32*)*entities)[i]=(u32)&(mesh->getEntityList()[i]);
			}

			return mesh->getEntityList().size();
		} else return 0;
	}
}