All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
SumPathLength Struct Reference

Public Member Functions

 SumPathLength (PathInfo *info)
bool operator() (int32_t iX, int32_t iY, C4Object *TransferTarget)

Detailed Description

Definition at line 2043 of file C4GameScript.cpp.

Constructor & Destructor Documentation

SumPathLength::SumPathLength ( PathInfo info)

Definition at line 2045 of file C4GameScript.cpp.

2045 : pPathInfo(info) {}

Member Function Documentation

bool SumPathLength::operator() ( int32_t  iX,
int32_t  iY,
C4Object TransferTarget 

Definition at line 2046 of file C4GameScript.cpp.

References Distance(), PathInfo::ilen, PathInfo::ilx, and PathInfo::ily.

2047  {
2048  pPathInfo->ilen += Distance(pPathInfo->ilx, pPathInfo->ily, iX, iY);
2049  pPathInfo->ilx = iX;
2050  pPathInfo->ily = iY;
2051  return true;
2052  }
int32_t Distance(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2)
Definition: Standard.cpp:24

Here is the call graph for this function:

The documentation for this struct was generated from the following file: