Bazaar developer reference

CvSparseIDInfoGrid::Get(int, int) const

Defined in
CvPlotManager.cpp, line 47
Class
CvSparseIDInfoGrid
Hook name
CivHooks::CvSparseIDInfoGrid_Get

Hooks

static bool BeforeCvSparseIDInfoGrid_Get(const CvSparseIDInfoGrid* self, int iX, int iY, const CvIDInfoFixedVector *& result);static void AfterCvSparseIDInfoGrid_Get(const CvSparseIDInfoGrid* self, int iX, int iY, const CvIDInfoFixedVector *& result);static const CvIDInfoFixedVector * ReplaceCvSparseIDInfoGrid_Get(const CvIDInfoFixedVector * (*original)(const CvSparseIDInfoGrid*, int, int), const CvSparseIDInfoGrid* self, int iX, int iY);CivRegisterBefore<CivHooks::CvSparseIDInfoGrid_Get>(host, &BeforeCvSparseIDInfoGrid_Get);CivRegisterAfter<CivHooks::CvSparseIDInfoGrid_Get>(host, &AfterCvSparseIDInfoGrid_Get);CivRegisterReplace<CivHooks::CvSparseIDInfoGrid_Get>(host, &ReplaceCvSparseIDInfoGrid_Get);

Code

47const CvIDInfoFixedVector *CvSparseIDInfoGrid::Get(int iX, int iY) const48{49	uint uiIndex = ((uint) iY * m_uiWidth) + (uint) iX;50	if (uiIndex < m_uiMaxIndex)51	{52		CvIDInfoFixedVector* pkEntry = m_paEntries[uiIndex];53		if (pkEntry)54			return pkEntry;55	}5657	return NULL;58}

Called by