HPOLY is a structure with two 32-bit integer fields: m_nPolyIndex and m_nWorldIndex .
The first three lines are called contructors: code that runs whenever a new instance of HPOLY . Then, writing the variable names after the colon means initializing the contents of the variable.
For example, creating an empty HPOLY:
HPOLY x;
The first empty constructor is called on x. The value of x.m_nWorldIndex is 0xFFFFFFFF, and the value of x.m_nPolyIndex is 0xFFFFFFFF.
Two other constructors manually initialize the values ββof two fields:
XPOLY y( 1, 2 ); XPOLY z( y );
The value of y.m_nWorldIndex is 1, and the value of y.m_nPolyIndex is 2.
The value of z.m_nWorldIndex is y.m_nWorldIndex , and the value of z.m_nPolyIndex is y.m_nPolyIndex .
In Delphi, the TPOLY structure can be translated into the following entry:
TPOLY = Record m_nWorldIndex : Integer; m_nPolyIndex : Integer; end;
source share