【发布时间】:2011-02-08 15:30:42
【问题描述】:
首先,让我展示一下结构:
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代码?
感谢您的帮助。
【问题讨论】:
-
我建议你可能需要阅读一些关于 C++ 的入门书籍...
-
您是否想通过 Delphi 模块和 C++ 模块之间的边界传递这些结构之一?