
extern "C" 
{
//------------------------------------------------------------------------------------
// irr::scene::IMesh wrappers
//------------------------------------------------------------------------------------

	// do not delete this pointer
	aabbox3d<f32>* IrrScene_IMesh_getBoundingBox(IMesh* mesh)
	{
		if (mesh)
			return new aabbox3d<f32>(mesh->getBoundingBox());
		else return 0;
	}
	
	// do not delete this pointer
	IMeshBuffer* IrrScene_IMesh_getMeshBuffer(IMesh* mesh,u32 nr)
	{
		if (mesh)
			return mesh->getMeshBuffer(nr);
		else return 0;
	}
	
	u32 IrrScene_IMesh_getMeshBufferCount(IMesh* mesh)
	{
		if (mesh)
			return mesh->getMeshBufferCount();
		else return 0;
	}

	void IrrScene_IMesh_setBoundingBox(IMesh* mesh, const core::aabbox3df& box)
	{
		if (mesh)
			mesh->setBoundingBox(box);
	}
	
	void IrrScene_IMesh_setMaterialFlag(IMesh* mesh,E_MATERIAL_FLAG flag,bool newvalue)
	{
		if (mesh)
			mesh->setMaterialFlag(flag,newvalue);
	}

	bool IrrScene_IMesh_drop(IMesh* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrScene_IMesh_getDebugName(IMesh* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrScene_IMesh_grab(IMesh* unk)
	{
		if (unk)
			unk->grab();
	}
	
	void IrrScene_IMesh_setHardwareMappingHint(IMesh* mesh, E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX)
	{
		if (mesh)
			mesh->setHardwareMappingHint(newMappingHint, buffer);
	}

	void IrrScene_IMesh_setDirty(IMesh* mesh, E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX)
	{
		if (mesh)
			mesh->setDirty(buffer);
	}
	
}



