首先,让我向您展示结构体:
struct HPOLY
{
HPOLY() : m_nWorldIndex(0xFFFFFFFF), m_nPolyIndex(0xFFFFFFFF) {}
HPOLY(__int32 nWorldIndex, __int32 nPolyIndex) : m_nWorldIndex(nWorldIndex), m_nPolyIndex(nPolyIndex) {}
HPOLY(const HPOLY& hPoly) : m_nWorldIndex(hPoly.m_nWorldIndex), m_nPolyIndex(hPoly.m_nPolyIndex) {}
HPOLY &operator=(const HPOLY &hOther)
{
m_nWorldIndex = hOther.m_nWorldIndex;
m_nPolyIndex = hOther.m_nPolyIndex;
return *this;
}
bool operator==(const HPOLY &hOther) const
{
return (m_nWorldIndex == hOther.m_nWorldIndex) && (m_nPolyIndex == hOther.m_nPolyIndex);
}
bool operator!=(const HPOLY &hOther) const
{
return (m_nWorldIndex != hOther.m_nWorldIndex) || (m_nPolyIndex != hOther.m_nPolyIndex);
}
__int32 m_nPolyIndex, m_nWorldIndex;
};
有些事情我不太明白。
结构体中 HPOLY 的重复是什么意思?如何将结构体转换为 Delphi 代码?
感谢您的帮助。